@devran-ai/kit 4.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/.agent/CheatSheet.md +350 -0
- package/.agent/README.md +76 -0
- package/.agent/agents/README.md +155 -0
- package/.agent/agents/architect.md +185 -0
- package/.agent/agents/backend-specialist.md +276 -0
- package/.agent/agents/build-error-resolver.md +207 -0
- package/.agent/agents/code-reviewer.md +162 -0
- package/.agent/agents/database-architect.md +138 -0
- package/.agent/agents/devops-engineer.md +144 -0
- package/.agent/agents/doc-updater.md +229 -0
- package/.agent/agents/e2e-runner.md +145 -0
- package/.agent/agents/explorer-agent.md +143 -0
- package/.agent/agents/frontend-specialist.md +144 -0
- package/.agent/agents/go-reviewer.md +128 -0
- package/.agent/agents/knowledge-agent.md +197 -0
- package/.agent/agents/mobile-developer.md +150 -0
- package/.agent/agents/performance-optimizer.md +175 -0
- package/.agent/agents/planner.md +133 -0
- package/.agent/agents/pr-reviewer.md +148 -0
- package/.agent/agents/python-reviewer.md +123 -0
- package/.agent/agents/refactor-cleaner.md +201 -0
- package/.agent/agents/reliability-engineer.md +156 -0
- package/.agent/agents/security-reviewer.md +141 -0
- package/.agent/agents/sprint-orchestrator.md +124 -0
- package/.agent/agents/tdd-guide.md +179 -0
- package/.agent/agents/typescript-reviewer.md +110 -0
- package/.agent/checklists/README.md +102 -0
- package/.agent/checklists/pre-commit.md +93 -0
- package/.agent/checklists/session-end.md +99 -0
- package/.agent/checklists/session-start.md +102 -0
- package/.agent/checklists/task-complete.md +81 -0
- package/.agent/commands/README.md +130 -0
- package/.agent/commands/adr.md +29 -0
- package/.agent/commands/ask.md +28 -0
- package/.agent/commands/build.md +30 -0
- package/.agent/commands/changelog.md +40 -0
- package/.agent/commands/checkpoint.md +28 -0
- package/.agent/commands/code-review.md +65 -0
- package/.agent/commands/compact.md +28 -0
- package/.agent/commands/cook.md +30 -0
- package/.agent/commands/db.md +30 -0
- package/.agent/commands/debug.md +31 -0
- package/.agent/commands/deploy.md +37 -0
- package/.agent/commands/design.md +29 -0
- package/.agent/commands/doc.md +30 -0
- package/.agent/commands/eval.md +30 -0
- package/.agent/commands/fix.md +32 -0
- package/.agent/commands/git.md +32 -0
- package/.agent/commands/help.md +273 -0
- package/.agent/commands/implement.md +30 -0
- package/.agent/commands/integrate.md +32 -0
- package/.agent/commands/learn.md +29 -0
- package/.agent/commands/perf.md +31 -0
- package/.agent/commands/plan.md +56 -0
- package/.agent/commands/pr-describe.md +65 -0
- package/.agent/commands/pr-fix.md +45 -0
- package/.agent/commands/pr-merge.md +45 -0
- package/.agent/commands/pr-review.md +50 -0
- package/.agent/commands/pr-split.md +54 -0
- package/.agent/commands/pr-status.md +56 -0
- package/.agent/commands/pr.md +58 -0
- package/.agent/commands/refactor.md +32 -0
- package/.agent/commands/research.md +28 -0
- package/.agent/commands/scout.md +30 -0
- package/.agent/commands/security-scan.md +33 -0
- package/.agent/commands/setup.md +31 -0
- package/.agent/commands/status.md +59 -0
- package/.agent/commands/tdd.md +73 -0
- package/.agent/commands/verify.md +58 -0
- package/.agent/contexts/brainstorm.md +26 -0
- package/.agent/contexts/debug.md +28 -0
- package/.agent/contexts/implement.md +29 -0
- package/.agent/contexts/plan-quality-log.md +30 -0
- package/.agent/contexts/review.md +27 -0
- package/.agent/contexts/ship.md +28 -0
- package/.agent/decisions/001-trust-grade-governance.md +46 -0
- package/.agent/decisions/002-cross-ide-generation.md +15 -0
- package/.agent/engine/identity.json +4 -0
- package/.agent/engine/loading-rules.json +193 -0
- package/.agent/engine/marketplace-index.json +29 -0
- package/.agent/engine/mcp-servers/filesystem.json +9 -0
- package/.agent/engine/mcp-servers/github.json +11 -0
- package/.agent/engine/mcp-servers/postgres.json +11 -0
- package/.agent/engine/mcp-servers/supabase.json +11 -0
- package/.agent/engine/mcp-servers/vercel.json +11 -0
- package/.agent/engine/reliability-config.json +14 -0
- package/.agent/engine/sdlc-map.json +50 -0
- package/.agent/engine/workflow-state.json +167 -0
- package/.agent/hooks/README.md +101 -0
- package/.agent/hooks/hooks.json +104 -0
- package/.agent/hooks/templates/session-end.md +110 -0
- package/.agent/hooks/templates/session-start.md +95 -0
- package/.agent/manifest.json +466 -0
- package/.agent/rules/agent-upgrade-policy.md +56 -0
- package/.agent/rules/architecture.md +111 -0
- package/.agent/rules/coding-style.md +75 -0
- package/.agent/rules/documentation.md +74 -0
- package/.agent/rules/git-workflow.md +140 -0
- package/.agent/rules/quality-gate.md +117 -0
- package/.agent/rules/security.md +67 -0
- package/.agent/rules/sprint-tracking.md +103 -0
- package/.agent/rules/testing.md +80 -0
- package/.agent/rules/workflow-standards.md +30 -0
- package/.agent/rules.md +293 -0
- package/.agent/session-context.md +69 -0
- package/.agent/session-state.json +27 -0
- package/.agent/skills/README.md +135 -0
- package/.agent/skills/api-patterns/SKILL.md +117 -0
- package/.agent/skills/app-builder/SKILL.md +202 -0
- package/.agent/skills/architecture/SKILL.md +101 -0
- package/.agent/skills/behavioral-modes/SKILL.md +295 -0
- package/.agent/skills/brainstorming/SKILL.md +156 -0
- package/.agent/skills/clean-code/SKILL.md +142 -0
- package/.agent/skills/context-budget/SKILL.md +78 -0
- package/.agent/skills/continuous-learning/SKILL.md +145 -0
- package/.agent/skills/database-design/SKILL.md +303 -0
- package/.agent/skills/debugging-strategies/SKILL.md +158 -0
- package/.agent/skills/deployment-procedures/SKILL.md +191 -0
- package/.agent/skills/docker-patterns/SKILL.md +161 -0
- package/.agent/skills/eval-harness/SKILL.md +89 -0
- package/.agent/skills/frontend-patterns/SKILL.md +141 -0
- package/.agent/skills/git-workflow/SKILL.md +159 -0
- package/.agent/skills/i18n-localization/SKILL.md +191 -0
- package/.agent/skills/intelligent-routing/SKILL.md +180 -0
- package/.agent/skills/mcp-integration/SKILL.md +240 -0
- package/.agent/skills/mobile-design/SKILL.md +191 -0
- package/.agent/skills/nodejs-patterns/SKILL.md +164 -0
- package/.agent/skills/parallel-agents/SKILL.md +200 -0
- package/.agent/skills/performance-profiling/SKILL.md +134 -0
- package/.agent/skills/plan-validation/SKILL.md +192 -0
- package/.agent/skills/plan-writing/SKILL.md +183 -0
- package/.agent/skills/plan-writing/domain-enhancers.md +184 -0
- package/.agent/skills/plan-writing/plan-retrospective.md +116 -0
- package/.agent/skills/plan-writing/plan-schema.md +119 -0
- package/.agent/skills/pr-toolkit/SKILL.md +174 -0
- package/.agent/skills/production-readiness/SKILL.md +126 -0
- package/.agent/skills/security-practices/SKILL.md +109 -0
- package/.agent/skills/shell-conventions/SKILL.md +92 -0
- package/.agent/skills/strategic-compact/SKILL.md +62 -0
- package/.agent/skills/testing-patterns/SKILL.md +141 -0
- package/.agent/skills/typescript-expert/SKILL.md +160 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +137 -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/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/verification-loop/SKILL.md +89 -0
- package/.agent/skills/webapp-testing/SKILL.md +175 -0
- package/.agent/templates/adr-template.md +32 -0
- package/.agent/templates/bug-report.md +37 -0
- package/.agent/templates/feature-request.md +32 -0
- package/.agent/workflows/README.md +101 -0
- package/.agent/workflows/brainstorm.md +86 -0
- package/.agent/workflows/create.md +85 -0
- package/.agent/workflows/debug.md +83 -0
- package/.agent/workflows/deploy.md +114 -0
- package/.agent/workflows/enhance.md +85 -0
- package/.agent/workflows/orchestrate.md +106 -0
- package/.agent/workflows/plan.md +105 -0
- package/.agent/workflows/pr-fix.md +163 -0
- package/.agent/workflows/pr-merge.md +117 -0
- package/.agent/workflows/pr-review.md +178 -0
- package/.agent/workflows/pr-split.md +118 -0
- package/.agent/workflows/pr.md +184 -0
- package/.agent/workflows/preflight.md +107 -0
- package/.agent/workflows/preview.md +95 -0
- package/.agent/workflows/quality-gate.md +103 -0
- package/.agent/workflows/retrospective.md +100 -0
- package/.agent/workflows/review.md +104 -0
- package/.agent/workflows/status.md +89 -0
- package/.agent/workflows/test.md +98 -0
- package/.agent/workflows/ui-ux-pro-max.md +93 -0
- package/.agent/workflows/upgrade.md +97 -0
- package/LICENSE +21 -0
- package/README.md +218 -0
- package/bin/kit.js +773 -0
- package/lib/agent-registry.js +228 -0
- package/lib/agent-reputation.js +343 -0
- package/lib/circuit-breaker.js +195 -0
- package/lib/cli-commands.js +322 -0
- package/lib/config-validator.js +274 -0
- package/lib/conflict-detector.js +252 -0
- package/lib/constants.js +47 -0
- package/lib/engineering-manager.js +336 -0
- package/lib/error-budget.js +370 -0
- package/lib/hook-system.js +256 -0
- package/lib/ide-generator.js +434 -0
- package/lib/identity.js +240 -0
- package/lib/io.js +146 -0
- package/lib/learning-engine.js +163 -0
- package/lib/loading-engine.js +421 -0
- package/lib/logger.js +118 -0
- package/lib/marketplace.js +321 -0
- package/lib/plugin-system.js +604 -0
- package/lib/plugin-verifier.js +197 -0
- package/lib/rate-limiter.js +113 -0
- package/lib/security-scanner.js +312 -0
- package/lib/self-healing.js +468 -0
- package/lib/session-manager.js +264 -0
- package/lib/skill-sandbox.js +244 -0
- package/lib/task-governance.js +522 -0
- package/lib/task-model.js +332 -0
- package/lib/updater.js +240 -0
- package/lib/verify.js +279 -0
- package/lib/workflow-engine.js +373 -0
- package/lib/workflow-events.js +166 -0
- package/lib/workflow-persistence.js +160 -0
- package/package.json +57 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
UI/UX Pro Max Search - BM25 search engine for UI/UX style guides
|
|
5
|
+
Usage: python search.py "<query>" [--domain <domain>] [--stack <stack>] [--max-results 3]
|
|
6
|
+
python search.py "<query>" --design-system [-p "Project Name"]
|
|
7
|
+
python search.py "<query>" --design-system --persist [-p "Project Name"] [--page "dashboard"]
|
|
8
|
+
|
|
9
|
+
Domains: style, prompt, color, chart, landing, product, ux, typography
|
|
10
|
+
Stacks: html-tailwind, react, nextjs
|
|
11
|
+
|
|
12
|
+
Persistence (Master + Overrides pattern):
|
|
13
|
+
--persist Save design system to design-system/MASTER.md
|
|
14
|
+
--page Also create a page-specific override file in design-system/pages/
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
import argparse
|
|
18
|
+
import sys
|
|
19
|
+
import io
|
|
20
|
+
from core import CSV_CONFIG, AVAILABLE_STACKS, MAX_RESULTS, search, search_stack
|
|
21
|
+
from design_system import generate_design_system, persist_design_system
|
|
22
|
+
|
|
23
|
+
# Force UTF-8 for stdout/stderr to handle emojis on Windows (cp1252 default)
|
|
24
|
+
if sys.stdout.encoding and sys.stdout.encoding.lower() != 'utf-8':
|
|
25
|
+
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
26
|
+
if sys.stderr.encoding and sys.stderr.encoding.lower() != 'utf-8':
|
|
27
|
+
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def format_output(result):
|
|
31
|
+
"""Format results for Claude consumption (token-optimized)"""
|
|
32
|
+
if "error" in result:
|
|
33
|
+
return f"Error: {result['error']}"
|
|
34
|
+
|
|
35
|
+
output = []
|
|
36
|
+
if result.get("stack"):
|
|
37
|
+
output.append(f"## UI Pro Max Stack Guidelines")
|
|
38
|
+
output.append(f"**Stack:** {result['stack']} | **Query:** {result['query']}")
|
|
39
|
+
else:
|
|
40
|
+
output.append(f"## UI Pro Max Search Results")
|
|
41
|
+
output.append(f"**Domain:** {result['domain']} | **Query:** {result['query']}")
|
|
42
|
+
output.append(f"**Source:** {result['file']} | **Found:** {result['count']} results\n")
|
|
43
|
+
|
|
44
|
+
for i, row in enumerate(result['results'], 1):
|
|
45
|
+
output.append(f"### Result {i}")
|
|
46
|
+
for key, value in row.items():
|
|
47
|
+
value_str = str(value)
|
|
48
|
+
if len(value_str) > 300:
|
|
49
|
+
value_str = value_str[:300] + "..."
|
|
50
|
+
output.append(f"- **{key}:** {value_str}")
|
|
51
|
+
output.append("")
|
|
52
|
+
|
|
53
|
+
return "\n".join(output)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
if __name__ == "__main__":
|
|
57
|
+
parser = argparse.ArgumentParser(description="UI Pro Max Search")
|
|
58
|
+
parser.add_argument("query", help="Search query")
|
|
59
|
+
parser.add_argument("--domain", "-d", choices=list(CSV_CONFIG.keys()), help="Search domain")
|
|
60
|
+
parser.add_argument("--stack", "-s", choices=AVAILABLE_STACKS, help="Stack-specific search (html-tailwind, react, nextjs)")
|
|
61
|
+
parser.add_argument("--max-results", "-n", type=int, default=MAX_RESULTS, help="Max results (default: 3)")
|
|
62
|
+
parser.add_argument("--json", action="store_true", help="Output as JSON")
|
|
63
|
+
# Design system generation
|
|
64
|
+
parser.add_argument("--design-system", "-ds", action="store_true", help="Generate complete design system recommendation")
|
|
65
|
+
parser.add_argument("--project-name", "-p", type=str, default=None, help="Project name for design system output")
|
|
66
|
+
parser.add_argument("--format", "-f", choices=["ascii", "markdown"], default="ascii", help="Output format for design system")
|
|
67
|
+
# Persistence (Master + Overrides pattern)
|
|
68
|
+
parser.add_argument("--persist", action="store_true", help="Save design system to design-system/MASTER.md (creates hierarchical structure)")
|
|
69
|
+
parser.add_argument("--page", type=str, default=None, help="Create page-specific override file in design-system/pages/")
|
|
70
|
+
parser.add_argument("--output-dir", "-o", type=str, default=None, help="Output directory for persisted files (default: current directory)")
|
|
71
|
+
|
|
72
|
+
args = parser.parse_args()
|
|
73
|
+
|
|
74
|
+
# Design system takes priority
|
|
75
|
+
if args.design_system:
|
|
76
|
+
result = generate_design_system(
|
|
77
|
+
args.query,
|
|
78
|
+
args.project_name,
|
|
79
|
+
args.format,
|
|
80
|
+
persist=args.persist,
|
|
81
|
+
page=args.page,
|
|
82
|
+
output_dir=args.output_dir
|
|
83
|
+
)
|
|
84
|
+
print(result)
|
|
85
|
+
|
|
86
|
+
# Print persistence confirmation
|
|
87
|
+
if args.persist:
|
|
88
|
+
project_slug = args.project_name.lower().replace(' ', '-') if args.project_name else "default"
|
|
89
|
+
print("\n" + "=" * 60)
|
|
90
|
+
print(f"✅ Design system persisted to design-system/{project_slug}/")
|
|
91
|
+
print(f" 📄 design-system/{project_slug}/MASTER.md (Global Source of Truth)")
|
|
92
|
+
if args.page:
|
|
93
|
+
page_filename = args.page.lower().replace(' ', '-')
|
|
94
|
+
print(f" 📄 design-system/{project_slug}/pages/{page_filename}.md (Page Overrides)")
|
|
95
|
+
print("")
|
|
96
|
+
print(f"📖 Usage: When building a page, check design-system/{project_slug}/pages/[page].md first.")
|
|
97
|
+
print(f" If exists, its rules override MASTER.md. Otherwise, use MASTER.md.")
|
|
98
|
+
print("=" * 60)
|
|
99
|
+
# Stack search
|
|
100
|
+
elif args.stack:
|
|
101
|
+
result = search_stack(args.query, args.stack, args.max_results)
|
|
102
|
+
if args.json:
|
|
103
|
+
import json
|
|
104
|
+
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
105
|
+
else:
|
|
106
|
+
print(format_output(result))
|
|
107
|
+
# Domain search
|
|
108
|
+
else:
|
|
109
|
+
result = search(args.query, args.domain, args.max_results)
|
|
110
|
+
if args.json:
|
|
111
|
+
import json
|
|
112
|
+
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
113
|
+
else:
|
|
114
|
+
print(format_output(result))
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verification-loop
|
|
3
|
+
description: Comprehensive verification running all quality gates
|
|
4
|
+
triggers: [manual, pre-commit]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Verification Loop Skill
|
|
8
|
+
|
|
9
|
+
> **Purpose**: Continuous quality assurance through automated verification
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
The verification loop runs all quality gates to ensure code meets professional standards before committing or deploying.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Workflow
|
|
20
|
+
|
|
21
|
+
### 1. Build Check
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm run build
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Pass Criteria**: Exit code 0, no TypeScript errors
|
|
28
|
+
|
|
29
|
+
### 2. Lint Check
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm run lint
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Pass Criteria**: No errors (warnings acceptable)
|
|
36
|
+
|
|
37
|
+
### 3. Type Check
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx tsc --noEmit
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Pass Criteria**: Zero type errors
|
|
44
|
+
|
|
45
|
+
### 4. Unit Tests
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm run test
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Pass Criteria**: All tests pass
|
|
52
|
+
|
|
53
|
+
### 5. Coverage Check
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm run test:coverage
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Pass Criteria**: ≥80% coverage
|
|
60
|
+
|
|
61
|
+
### 6. Security Scan
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm audit --audit-level=high
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Pass Criteria**: No high/critical vulnerabilities
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Configuration
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"verification": {
|
|
76
|
+
"coverageThreshold": 80,
|
|
77
|
+
"allowWarnings": true,
|
|
78
|
+
"securityLevel": "high"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Integration
|
|
86
|
+
|
|
87
|
+
- Invoked by `/verify` command
|
|
88
|
+
- Can be used as pre-commit hook
|
|
89
|
+
- Reports to Code Reviewer agent
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: webapp-testing
|
|
3
|
+
description: Web application testing principles. E2E, Playwright, component testing, and deep audit strategies.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
allowed-tools: Read, Write, Edit, Glob, Grep, Bash
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Web App Testing
|
|
9
|
+
|
|
10
|
+
> Discover and test everything. Leave no route untested.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. Deep Audit Approach
|
|
15
|
+
|
|
16
|
+
### Discovery First
|
|
17
|
+
|
|
18
|
+
| Target | How to Find |
|
|
19
|
+
| ------------- | ------------------------------- |
|
|
20
|
+
| Routes | Scan app/, pages/, router files |
|
|
21
|
+
| API endpoints | Grep for HTTP methods |
|
|
22
|
+
| Components | Find component directories |
|
|
23
|
+
| Features | Read documentation |
|
|
24
|
+
|
|
25
|
+
### Systematic Testing
|
|
26
|
+
|
|
27
|
+
1. **Map** - List all routes/APIs
|
|
28
|
+
2. **Scan** - Verify they respond
|
|
29
|
+
3. **Test** - Cover critical paths
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 2. Testing Pyramid
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
/\ E2E (Few)
|
|
37
|
+
/ \ Critical user flows
|
|
38
|
+
/----\
|
|
39
|
+
/ \ Integration (Some)
|
|
40
|
+
/--------\ API, data flow
|
|
41
|
+
/ \
|
|
42
|
+
/------------\ Unit/Component (Many)
|
|
43
|
+
Individual pieces
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 3. E2E Test Principles
|
|
49
|
+
|
|
50
|
+
### What to Test
|
|
51
|
+
|
|
52
|
+
| Priority | Tests |
|
|
53
|
+
| -------- | ------------------------- |
|
|
54
|
+
| 1 | Happy path user flows |
|
|
55
|
+
| 2 | Authentication flows |
|
|
56
|
+
| 3 | Critical business actions |
|
|
57
|
+
| 4 | Error handling |
|
|
58
|
+
|
|
59
|
+
### Best Practices
|
|
60
|
+
|
|
61
|
+
| Practice | Why |
|
|
62
|
+
| ------------------ | ------------------ |
|
|
63
|
+
| Use data-testid | Stable selectors |
|
|
64
|
+
| Wait for elements | Avoid flaky tests |
|
|
65
|
+
| Clean state | Independent tests |
|
|
66
|
+
| Avoid impl details | Test user behavior |
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 4. Playwright Configuration
|
|
71
|
+
|
|
72
|
+
### Recommended Settings
|
|
73
|
+
|
|
74
|
+
| Setting | Recommendation |
|
|
75
|
+
| ----------- | ----------------- |
|
|
76
|
+
| Retries | 2 on CI |
|
|
77
|
+
| Trace | on-first-retry |
|
|
78
|
+
| Screenshots | on-failure |
|
|
79
|
+
| Video | retain-on-failure |
|
|
80
|
+
|
|
81
|
+
### Core Concepts
|
|
82
|
+
|
|
83
|
+
| Concept | Use |
|
|
84
|
+
| ----------------- | ---------------------- |
|
|
85
|
+
| Page Object Model | Encapsulate page logic |
|
|
86
|
+
| Fixtures | Reusable test setup |
|
|
87
|
+
| Assertions | Built-in auto-wait |
|
|
88
|
+
| Trace Viewer | Debug failures |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 5. Test Organization
|
|
93
|
+
|
|
94
|
+
### File Structure
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
tests/
|
|
98
|
+
├── e2e/ # Full user flows
|
|
99
|
+
├── integration/ # API, data
|
|
100
|
+
├── component/ # UI units
|
|
101
|
+
└── fixtures/ # Shared data
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Naming Convention
|
|
105
|
+
|
|
106
|
+
| Pattern | Example |
|
|
107
|
+
| ------------- | --------------------------- |
|
|
108
|
+
| Feature-based | `login.spec.ts` |
|
|
109
|
+
| Descriptive | `user-can-checkout.spec.ts` |
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 6. API Testing
|
|
114
|
+
|
|
115
|
+
### Coverage Areas
|
|
116
|
+
|
|
117
|
+
| Area | Tests |
|
|
118
|
+
| -------------- | --------------------------- |
|
|
119
|
+
| Status codes | 200, 400, 404, 500 |
|
|
120
|
+
| Response shape | Matches schema |
|
|
121
|
+
| Error messages | User-friendly |
|
|
122
|
+
| Edge cases | Empty, large, special chars |
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 7. CI Integration
|
|
127
|
+
|
|
128
|
+
### Pipeline Steps
|
|
129
|
+
|
|
130
|
+
1. Install dependencies
|
|
131
|
+
2. Install browsers (`npx playwright install`)
|
|
132
|
+
3. Run tests
|
|
133
|
+
4. Upload artifacts (traces, screenshots)
|
|
134
|
+
|
|
135
|
+
### Parallelization
|
|
136
|
+
|
|
137
|
+
| Strategy | Use |
|
|
138
|
+
| -------- | ------------------ |
|
|
139
|
+
| Per file | Playwright default |
|
|
140
|
+
| Sharding | Large suites |
|
|
141
|
+
| Workers | Multiple browsers |
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## 8. Anti-Patterns
|
|
146
|
+
|
|
147
|
+
| ❌ Don't | ✅ Do |
|
|
148
|
+
| ------------------- | -------------- |
|
|
149
|
+
| Test implementation | Test behavior |
|
|
150
|
+
| Hardcode waits | Use auto-wait |
|
|
151
|
+
| Skip cleanup | Isolate tests |
|
|
152
|
+
| Ignore flaky tests | Fix root cause |
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## 9. Recommended Testing Standards
|
|
157
|
+
|
|
158
|
+
### Required Coverage
|
|
159
|
+
|
|
160
|
+
| Vertical | Minimum Coverage |
|
|
161
|
+
| ------------- | ---------------- |
|
|
162
|
+
| Auth | 90%+ |
|
|
163
|
+
| Payment | 95%+ |
|
|
164
|
+
| Core Features | 80%+ |
|
|
165
|
+
|
|
166
|
+
### Test Types Required
|
|
167
|
+
|
|
168
|
+
- [ ] Unit tests (Jest/Vitest)
|
|
169
|
+
- [ ] Integration tests (Supertest)
|
|
170
|
+
- [ ] E2E tests (Playwright)
|
|
171
|
+
- [ ] Visual regression (optional)
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
> **Remember:** E2E tests are expensive. Use them for critical paths only.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# ADR Template
|
|
2
|
+
|
|
3
|
+
Use this template for all Architecture Decision Records.
|
|
4
|
+
|
|
5
|
+
## ADR-NNN: [Decision Title]
|
|
6
|
+
|
|
7
|
+
### Status
|
|
8
|
+
|
|
9
|
+
**[Proposed / Accepted / Deprecated / Superseded]** — [Date]
|
|
10
|
+
|
|
11
|
+
### Context
|
|
12
|
+
|
|
13
|
+
[What is the issue that we're seeing that is motivating this decision or change?]
|
|
14
|
+
|
|
15
|
+
### Decision
|
|
16
|
+
|
|
17
|
+
[What is the change that we're proposing and/or doing?]
|
|
18
|
+
|
|
19
|
+
### Consequences
|
|
20
|
+
|
|
21
|
+
#### Positive
|
|
22
|
+
- [Benefit 1]
|
|
23
|
+
- [Benefit 2]
|
|
24
|
+
|
|
25
|
+
#### Negative
|
|
26
|
+
- [Trade-off 1]
|
|
27
|
+
- [Trade-off 2]
|
|
28
|
+
|
|
29
|
+
### Alternatives Considered
|
|
30
|
+
|
|
31
|
+
1. **[Alternative 1]** — [Why rejected]
|
|
32
|
+
2. **[Alternative 2]** — [Why rejected]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Bug Report Template
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
[Clear description of the bug]
|
|
6
|
+
|
|
7
|
+
## Steps to Reproduce
|
|
8
|
+
|
|
9
|
+
1. [Step 1]
|
|
10
|
+
2. [Step 2]
|
|
11
|
+
3. [Step 3]
|
|
12
|
+
|
|
13
|
+
## Expected Behavior
|
|
14
|
+
|
|
15
|
+
[What should happen]
|
|
16
|
+
|
|
17
|
+
## Actual Behavior
|
|
18
|
+
|
|
19
|
+
[What actually happens]
|
|
20
|
+
|
|
21
|
+
## Environment
|
|
22
|
+
|
|
23
|
+
- **OS**: [e.g., Windows 11, macOS 15, Ubuntu 24.04]
|
|
24
|
+
- **Node.js**: [e.g., 20.x]
|
|
25
|
+
- **Devran AI Kit version**: [e.g., 2.1.0]
|
|
26
|
+
- **IDE**: [e.g., VS Code 1.95, Cursor 0.45]
|
|
27
|
+
|
|
28
|
+
## Screenshots / Logs
|
|
29
|
+
|
|
30
|
+
[Attach any relevant screenshots or error logs]
|
|
31
|
+
|
|
32
|
+
## Severity
|
|
33
|
+
|
|
34
|
+
- [ ] Critical (system unusable)
|
|
35
|
+
- [ ] High (major feature broken)
|
|
36
|
+
- [ ] Medium (workaround exists)
|
|
37
|
+
- [ ] Low (cosmetic issue)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Feature Request Template
|
|
2
|
+
|
|
3
|
+
## Feature Description
|
|
4
|
+
|
|
5
|
+
[Clear, concise description of the desired feature]
|
|
6
|
+
|
|
7
|
+
## Problem Statement
|
|
8
|
+
|
|
9
|
+
[What problem does this feature solve? Why is it needed?]
|
|
10
|
+
|
|
11
|
+
## Proposed Solution
|
|
12
|
+
|
|
13
|
+
[High-level description of how this could be implemented]
|
|
14
|
+
|
|
15
|
+
## Acceptance Criteria
|
|
16
|
+
|
|
17
|
+
- [ ] [Criterion 1]
|
|
18
|
+
- [ ] [Criterion 2]
|
|
19
|
+
- [ ] [Criterion 3]
|
|
20
|
+
|
|
21
|
+
## Technical Considerations
|
|
22
|
+
|
|
23
|
+
- **Complexity**: [Low / Medium / High]
|
|
24
|
+
- **Breaking Changes**: [Yes / No]
|
|
25
|
+
- **Dependencies**: [List any new dependencies needed]
|
|
26
|
+
|
|
27
|
+
## Priority
|
|
28
|
+
|
|
29
|
+
- [ ] Critical (blocks production)
|
|
30
|
+
- [ ] High (needed this sprint)
|
|
31
|
+
- [ ] Medium (next sprint)
|
|
32
|
+
- [ ] Low (backlog)
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Devran AI Kit — Workflows
|
|
2
|
+
|
|
3
|
+
> **Purpose**: Process templates for common development tasks
|
|
4
|
+
> **Count**: 21 Workflows
|
|
5
|
+
> **Standard**: Enterprise Workflow Standard (EWS) v1.0
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Workflows are structured process templates that guide you through complex tasks. Each workflow follows the EWS v1.0 standard with 11 mandatory sections including trigger/lifecycle definition, critical rules, argument parsing, governance alerts, and completion criteria.
|
|
12
|
+
|
|
13
|
+
Invoke them using slash commands (e.g., `/brainstorm authentication system`).
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Available Workflows
|
|
18
|
+
|
|
19
|
+
| Workflow | Command | Lifecycle | Description |
|
|
20
|
+
| :---------------- | :--------------- | :------------ | :----------------------------------------------- |
|
|
21
|
+
| **brainstorm** | `/brainstorm` | Discover | Creative ideation and option exploration |
|
|
22
|
+
| **quality-gate** | `/quality-gate` | Discover | Pre-task market research, gap analysis, ethics |
|
|
23
|
+
| **plan** | `/plan` | Plan | Structured implementation planning |
|
|
24
|
+
| **create** | `/create` | Build | Scaffold new features, components, or modules |
|
|
25
|
+
| **enhance** | `/enhance` | Build | Iterative feature development on existing code |
|
|
26
|
+
| **preview** | `/preview` | Build | Local development server management |
|
|
27
|
+
| **ui-ux-pro-max** | `/ui-ux-pro-max` | Build | Premium UI/UX design and implementation |
|
|
28
|
+
| **test** | `/test` | Verify | Systematic test writing and execution |
|
|
29
|
+
| **review** | `/review` | Verify | Sequential quality gate pipeline |
|
|
30
|
+
| **preflight** | `/preflight` | Verify | Production readiness assessment with 10-domain scoring |
|
|
31
|
+
| **pr** | `/pr` | Ship | Production-grade PR creation with branch validation and size guards |
|
|
32
|
+
| **pr-review** | `/pr-review` | Verify | Multi-perspective PR review with senior engineering expertise |
|
|
33
|
+
| **pr-fix** | `/pr-fix` | Build | Fix PR issues based on review comments with verification |
|
|
34
|
+
| **pr-merge** | `/pr-merge` | Ship | Safe PR merge with dependency validation and post-merge checks |
|
|
35
|
+
| **pr-split** | `/pr-split` | Build | Split oversized PRs into focused sub-PRs by concern category |
|
|
36
|
+
| **deploy** | `/deploy` | Ship | Production deployment with pre-flight checks |
|
|
37
|
+
| **debug** | `/debug` | Reactive | Systematic problem investigation |
|
|
38
|
+
| **orchestrate** | `/orchestrate` | Reactive | Multi-agent coordination for complex tasks |
|
|
39
|
+
| **retrospective** | `/retrospective` | Evaluate | Tier-1 quality audit against market standards |
|
|
40
|
+
| **status** | `/status` | Cross-cutting | Project status overview and health check |
|
|
41
|
+
| **upgrade** | `/upgrade` | Maintenance | Formal protocol for non-destructive framework upgrades |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## SDLC Lifecycle Map
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Discover ──► Plan ──► Build ──► Verify ──► Ship ──► Evaluate
|
|
49
|
+
│ │ │ │ │ │
|
|
50
|
+
▼ ▼ ▼ ▼ ▼ ▼
|
|
51
|
+
/brainstorm /plan /create /test /pr /retrospective
|
|
52
|
+
/quality-gate /enhance /review /pr-merge
|
|
53
|
+
/preview /preflight /deploy
|
|
54
|
+
/pr-fix /pr-review
|
|
55
|
+
/pr-split
|
|
56
|
+
/ui-ux-pro-max
|
|
57
|
+
|
|
58
|
+
Reactive (any phase) Cross-cutting (any phase)
|
|
59
|
+
──────────────────── ────────────────────────
|
|
60
|
+
/debug /status
|
|
61
|
+
/orchestrate /upgrade
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## EWS v1.0 Standard
|
|
67
|
+
|
|
68
|
+
Every workflow conforms to the Enterprise Workflow Standard v1.0 with these sections:
|
|
69
|
+
|
|
70
|
+
| # | Section | Purpose |
|
|
71
|
+
| :- | :------------------- | :----------------------------------------------- |
|
|
72
|
+
| 1 | Frontmatter | `description` and `version` fields |
|
|
73
|
+
| 2 | Trigger / Lifecycle | When and where in SDLC this workflow runs |
|
|
74
|
+
| 3 | Governance Alert | Risk-appropriate alert (NOTE/IMPORTANT/CAUTION) |
|
|
75
|
+
| 4 | Critical Rules | Non-negotiable behavioral constraints |
|
|
76
|
+
| 5 | Argument Parsing | Sub-commands and argument table |
|
|
77
|
+
| 6 | Steps | Ordered steps with `// turbo` annotations |
|
|
78
|
+
| 7 | Output Template | Structured output format |
|
|
79
|
+
| 8 | Governance Footer | PROHIBITED / REQUIRED behavioral contracts |
|
|
80
|
+
| 9 | Completion Criteria | Checklist of done criteria |
|
|
81
|
+
| 10 | Related Resources | Links to skills, agents, and related workflows |
|
|
82
|
+
| 11 | Scope Filter | When applicable: commit-type filtering table |
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Turbo Annotation Policy
|
|
87
|
+
|
|
88
|
+
Steps annotated with `// turbo` can be auto-executed without user confirmation:
|
|
89
|
+
|
|
90
|
+
- **Allowed**: Read-only steps (analysis, detection, research, diagnostics)
|
|
91
|
+
- **Prohibited**: State-mutating steps (server start, deployment, code generation)
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Creating Custom Workflows
|
|
96
|
+
|
|
97
|
+
1. Create `workflows/my-workflow.md`
|
|
98
|
+
2. Add frontmatter with `description` and `version` fields
|
|
99
|
+
3. Follow the EWS v1.0 template (11 sections)
|
|
100
|
+
4. Map to an SDLC lifecycle phase
|
|
101
|
+
5. Link to relevant skills and agents in Related Resources
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Structured brainstorming. Explore options before committing to implementation.
|
|
3
|
+
version: 2.1.0
|
|
4
|
+
sdlc-phase: discover
|
|
5
|
+
skills: [brainstorming]
|
|
6
|
+
commit-types: [docs]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# /brainstorm — Structured Idea Exploration
|
|
10
|
+
|
|
11
|
+
> **Trigger**: `/brainstorm [topic]`
|
|
12
|
+
> **Lifecycle**: Discover — before `/quality-gate` or `/plan`
|
|
13
|
+
|
|
14
|
+
> Standards: See `rules/workflow-standards.md`
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Critical Rules
|
|
19
|
+
|
|
20
|
+
1. No code — produce ideas, analysis only
|
|
21
|
+
2. Minimum 3 options with pros/cons
|
|
22
|
+
3. Evidence-based recommendations
|
|
23
|
+
4. Socratic exploration — clarify before generating
|
|
24
|
+
5. Honest tradeoffs — never hide complexity
|
|
25
|
+
6. User decides — present and recommend, don't choose
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Steps
|
|
30
|
+
|
|
31
|
+
// turbo
|
|
32
|
+
1. **Gather Context** — problem, target user, constraints, what's been tried
|
|
33
|
+
|
|
34
|
+
// turbo
|
|
35
|
+
2. **Research** — existing patterns in codebase, industry best practices, architectural constraints
|
|
36
|
+
|
|
37
|
+
3. **Generate Options** — 3+ distinct approaches with pros, cons, effort, risk
|
|
38
|
+
|
|
39
|
+
4. **Compare & Recommend** — comparison table, clear recommendation with reasoning, ask user direction
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Output Template
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
## Brainstorm: [Topic]
|
|
47
|
+
|
|
48
|
+
### Context
|
|
49
|
+
[Problem and constraints]
|
|
50
|
+
|
|
51
|
+
### Options
|
|
52
|
+
**Option A/B/C**: [description, pros, cons, effort, risk]
|
|
53
|
+
|
|
54
|
+
### Comparison
|
|
55
|
+
| Criteria | A | B | C |
|
|
56
|
+
| :--- | :--- | :--- | :--- |
|
|
57
|
+
| Effort / Risk / Scalability / Maintainability | ... |
|
|
58
|
+
|
|
59
|
+
### Recommendation
|
|
60
|
+
**Option [X]** because [reasoning].
|
|
61
|
+
|
|
62
|
+
**Next**: `/quality-gate` or `/plan`
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Governance
|
|
68
|
+
|
|
69
|
+
**PROHIBITED:** Writing code · fewer than 3 options · hiding complexity
|
|
70
|
+
|
|
71
|
+
**REQUIRED:** Clarifying questions · evidence-based reasoning · comparison matrix · user confirmation
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Completion Criteria
|
|
76
|
+
|
|
77
|
+
- [ ] 3+ options with tradeoffs
|
|
78
|
+
- [ ] Comparison matrix included
|
|
79
|
+
- [ ] User selected direction
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Related Resources
|
|
84
|
+
|
|
85
|
+
- **Next**: `/quality-gate` · `/plan`
|
|
86
|
+
- **Skill**: `.agent/skills/brainstorming/SKILL.md`
|