@jakkrichm/create-nexus-devflow 2.0.20 → 2.0.21
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/dist/lib/update.js +19 -8
- package/dist/lib/update.js.map +1 -1
- package/package.json +1 -1
- package/template/.agents/skills/00-discover/SKILL.md +28 -116
- package/template/.agents/skills/40-execute/SKILL.md +1 -1
- package/template/.agents/skills/50-verify/SKILL.md +28 -161
- package/template/.agents/skills/60-report/SKILL.md +19 -92
- package/template/.agents/skills/70-release/SKILL.md +36 -11
- package/template/.agents/skills/check/SKILL.md +19 -7
- package/template/.agents/skills/complete/SKILL.md +21 -10
- package/template/.claude/skills/00-discover/SKILL.md +28 -116
- package/template/.claude/skills/40-execute/SKILL.md +1 -1
- package/template/.claude/skills/50-verify/SKILL.md +28 -161
- package/template/.claude/skills/60-report/SKILL.md +19 -92
- package/template/.claude/skills/70-release/SKILL.md +36 -11
- package/template/.claude/skills/check/SKILL.md +19 -7
- package/template/.claude/skills/complete/SKILL.md +21 -10
- package/template/AGENTS.md +1 -1
- package/template/devflow/context/coding-standards.md +40 -29
- package/template/.agents/skills/agent/SKILL.md +0 -165
- package/template/.agents/skills/api-and-interface-design/SKILL.md +0 -294
- package/template/.agents/skills/app-builder/SKILL.md +0 -75
- package/template/.agents/skills/app-builder/agent-coordination.md +0 -71
- package/template/.agents/skills/app-builder/feature-building.md +0 -53
- package/template/.agents/skills/app-builder/project-detection.md +0 -34
- package/template/.agents/skills/app-builder/scaffolding.md +0 -118
- package/template/.agents/skills/app-builder/tech-stack.md +0 -40
- package/template/.agents/skills/app-builder/templates/SKILL.md +0 -39
- package/template/.agents/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
- package/template/.agents/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
- package/template/.agents/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
- package/template/.agents/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
- package/template/.agents/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
- package/template/.agents/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
- package/template/.agents/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
- package/template/.agents/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
- package/template/.agents/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
- package/template/.agents/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
- package/template/.agents/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
- package/template/.agents/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
- package/template/.agents/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
- package/template/.agents/skills/architecture/SKILL.md +0 -55
- package/template/.agents/skills/architecture/context-discovery.md +0 -43
- package/template/.agents/skills/architecture/examples.md +0 -94
- package/template/.agents/skills/architecture/pattern-selection.md +0 -68
- package/template/.agents/skills/architecture/patterns-reference.md +0 -50
- package/template/.agents/skills/architecture/trade-off-analysis.md +0 -77
- package/template/.agents/skills/bash-linux/SKILL.md +0 -199
- package/template/.agents/skills/behavioral-modes/SKILL.md +0 -242
- package/template/.agents/skills/brainstorm/SKILL.md +0 -168
- package/template/.agents/skills/changelog/SKILL.md +0 -109
- package/template/.agents/skills/codebase-design/DEEPENING.md +0 -24
- package/template/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +0 -28
- package/template/.agents/skills/codebase-design/SKILL.md +0 -58
- package/template/.agents/skills/commit/SKILL.md +0 -59
- package/template/.agents/skills/competitor-analysis/SKILL.md +0 -66
- package/template/.agents/skills/context-engineering/SKILL.md +0 -290
- package/template/.agents/skills/database-design/SKILL.md +0 -52
- package/template/.agents/skills/database-design/database-selection.md +0 -43
- package/template/.agents/skills/database-design/indexing.md +0 -39
- package/template/.agents/skills/database-design/migrations.md +0 -48
- package/template/.agents/skills/database-design/optimization.md +0 -36
- package/template/.agents/skills/database-design/orm-selection.md +0 -30
- package/template/.agents/skills/database-design/schema-design.md +0 -56
- package/template/.agents/skills/database-design/scripts/schema_validator.py +0 -172
- package/template/.agents/skills/deploy/SKILL.md +0 -63
- package/template/.agents/skills/documentation-and-adrs/SKILL.md +0 -278
- package/template/.agents/skills/domain-modeling/ADR-FORMAT.md +0 -47
- package/template/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
- package/template/.agents/skills/domain-modeling/SKILL.md +0 -74
- package/template/.agents/skills/followup/SKILL.md +0 -83
- package/template/.agents/skills/frontend-ui-engineering/SKILL.md +0 -326
- package/template/.agents/skills/frontend-ui-engineering/accessibility-checklist.md +0 -159
- package/template/.agents/skills/goal/SKILL.md +0 -148
- package/template/.agents/skills/handoff/SKILL.md +0 -46
- package/template/.agents/skills/help/SKILL.md +0 -253
- package/template/.agents/skills/i18n-localization/SKILL.md +0 -154
- package/template/.agents/skills/i18n-localization/scripts/i18n_checker.py +0 -241
- package/template/.agents/skills/insight/SKILL.md +0 -42
- package/template/.agents/skills/issue-triage/SKILL.md +0 -115
- package/template/.agents/skills/lint-and-validate/SKILL.md +0 -45
- package/template/.agents/skills/lint-and-validate/scripts/lint_runner.py +0 -184
- package/template/.agents/skills/lint-and-validate/scripts/type_coverage.py +0 -173
- package/template/.agents/skills/mcp-builder/SKILL.md +0 -176
- package/template/.agents/skills/merge/SKILL.md +0 -76
- package/template/.agents/skills/mobile-design/SKILL.md +0 -394
- package/template/.agents/skills/mobile-design/decision-trees.md +0 -516
- package/template/.agents/skills/mobile-design/mobile-backend.md +0 -491
- package/template/.agents/skills/mobile-design/mobile-color-system.md +0 -420
- package/template/.agents/skills/mobile-design/mobile-debugging.md +0 -122
- package/template/.agents/skills/mobile-design/mobile-design-thinking.md +0 -357
- package/template/.agents/skills/mobile-design/mobile-navigation.md +0 -458
- package/template/.agents/skills/mobile-design/mobile-performance.md +0 -767
- package/template/.agents/skills/mobile-design/mobile-testing.md +0 -356
- package/template/.agents/skills/mobile-design/mobile-typography.md +0 -433
- package/template/.agents/skills/mobile-design/platform-android.md +0 -666
- package/template/.agents/skills/mobile-design/platform-ios.md +0 -561
- package/template/.agents/skills/mobile-design/scripts/mobile_audit.py +0 -670
- package/template/.agents/skills/mobile-design/touch-psychology.md +0 -537
- package/template/.agents/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
- package/template/.agents/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
- package/template/.agents/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
- package/template/.agents/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
- package/template/.agents/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
- package/template/.agents/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
- package/template/.agents/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
- package/template/.agents/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
- package/template/.agents/skills/nextjs-react-expert/SKILL.md +0 -286
- package/template/.agents/skills/nextjs-react-expert/scripts/convert_rules.py +0 -222
- package/template/.agents/skills/nextjs-react-expert/scripts/react_performance_checker.py +0 -252
- package/template/.agents/skills/nodejs-best-practices/SKILL.md +0 -333
- package/template/.agents/skills/package-json-generator/SKILL.md +0 -60
- package/template/.agents/skills/package-json-generator/scripts/generate.js +0 -120
- package/template/.agents/skills/package-json-generator/scripts/run.sh +0 -19
- package/template/.agents/skills/parallel-agents/SKILL.md +0 -144
- package/template/.agents/skills/performance-optimization/SKILL.md +0 -299
- package/template/.agents/skills/performance-optimization/performance-checklist.md +0 -113
- package/template/.agents/skills/powershell-windows/SKILL.md +0 -167
- package/template/.agents/skills/pr/SKILL.md +0 -93
- package/template/.agents/skills/prd/SKILL.md +0 -127
- package/template/.agents/skills/preview/SKILL.md +0 -42
- package/template/.agents/skills/python-patterns/SKILL.md +0 -441
- package/template/.agents/skills/research/SKILL.md +0 -143
- package/template/.agents/skills/review/SKILL.md +0 -71
- package/template/.agents/skills/roadmap-strategy/SKILL.md +0 -94
- package/template/.agents/skills/security-review/SKILL.md +0 -63
- package/template/.agents/skills/seo-fundamentals/SKILL.md +0 -129
- package/template/.agents/skills/seo-fundamentals/scripts/seo_checker.py +0 -219
- package/template/.agents/skills/server-management/SKILL.md +0 -161
- package/template/.agents/skills/simplify/SKILL.md +0 -70
- package/template/.agents/skills/skill-development/SKILL.md +0 -86
- package/template/.agents/skills/spec/SKILL.md +0 -39
- package/template/.agents/skills/spec-driven-development/SKILL.md +0 -207
- package/template/.agents/skills/tailwind-patterns/SKILL.md +0 -269
- package/template/.agents/skills/type-design/SKILL.md +0 -84
- package/template/.agents/skills/ui-ux-pro-max/SKILL.md +0 -75
- package/template/.claude/skills/agent/SKILL.md +0 -165
- package/template/.claude/skills/api-and-interface-design/SKILL.md +0 -294
- package/template/.claude/skills/app-builder/SKILL.md +0 -75
- package/template/.claude/skills/app-builder/agent-coordination.md +0 -71
- package/template/.claude/skills/app-builder/feature-building.md +0 -53
- package/template/.claude/skills/app-builder/project-detection.md +0 -34
- package/template/.claude/skills/app-builder/scaffolding.md +0 -118
- package/template/.claude/skills/app-builder/tech-stack.md +0 -40
- package/template/.claude/skills/app-builder/templates/SKILL.md +0 -39
- package/template/.claude/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
- package/template/.claude/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
- package/template/.claude/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
- package/template/.claude/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
- package/template/.claude/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
- package/template/.claude/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
- package/template/.claude/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
- package/template/.claude/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
- package/template/.claude/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
- package/template/.claude/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
- package/template/.claude/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
- package/template/.claude/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
- package/template/.claude/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
- package/template/.claude/skills/architecture/SKILL.md +0 -55
- package/template/.claude/skills/architecture/context-discovery.md +0 -43
- package/template/.claude/skills/architecture/examples.md +0 -94
- package/template/.claude/skills/architecture/pattern-selection.md +0 -68
- package/template/.claude/skills/architecture/patterns-reference.md +0 -50
- package/template/.claude/skills/architecture/trade-off-analysis.md +0 -77
- package/template/.claude/skills/bash-linux/SKILL.md +0 -199
- package/template/.claude/skills/behavioral-modes/SKILL.md +0 -242
- package/template/.claude/skills/brainstorm/SKILL.md +0 -168
- package/template/.claude/skills/changelog/SKILL.md +0 -109
- package/template/.claude/skills/codebase-design/DEEPENING.md +0 -24
- package/template/.claude/skills/codebase-design/DESIGN-IT-TWICE.md +0 -28
- package/template/.claude/skills/codebase-design/SKILL.md +0 -58
- package/template/.claude/skills/commit/SKILL.md +0 -59
- package/template/.claude/skills/competitor-analysis/SKILL.md +0 -66
- package/template/.claude/skills/context-engineering/SKILL.md +0 -290
- package/template/.claude/skills/database-design/SKILL.md +0 -52
- package/template/.claude/skills/database-design/database-selection.md +0 -43
- package/template/.claude/skills/database-design/indexing.md +0 -39
- package/template/.claude/skills/database-design/migrations.md +0 -48
- package/template/.claude/skills/database-design/optimization.md +0 -36
- package/template/.claude/skills/database-design/orm-selection.md +0 -30
- package/template/.claude/skills/database-design/schema-design.md +0 -56
- package/template/.claude/skills/database-design/scripts/schema_validator.py +0 -172
- package/template/.claude/skills/deploy/SKILL.md +0 -63
- package/template/.claude/skills/documentation-and-adrs/SKILL.md +0 -278
- package/template/.claude/skills/domain-modeling/ADR-FORMAT.md +0 -47
- package/template/.claude/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
- package/template/.claude/skills/domain-modeling/SKILL.md +0 -74
- package/template/.claude/skills/followup/SKILL.md +0 -83
- package/template/.claude/skills/frontend-ui-engineering/SKILL.md +0 -326
- package/template/.claude/skills/frontend-ui-engineering/accessibility-checklist.md +0 -159
- package/template/.claude/skills/goal/SKILL.md +0 -148
- package/template/.claude/skills/handoff/SKILL.md +0 -46
- package/template/.claude/skills/help/SKILL.md +0 -253
- package/template/.claude/skills/i18n-localization/SKILL.md +0 -154
- package/template/.claude/skills/i18n-localization/scripts/i18n_checker.py +0 -241
- package/template/.claude/skills/insight/SKILL.md +0 -42
- package/template/.claude/skills/issue-triage/SKILL.md +0 -115
- package/template/.claude/skills/lint-and-validate/SKILL.md +0 -45
- package/template/.claude/skills/lint-and-validate/scripts/lint_runner.py +0 -184
- package/template/.claude/skills/lint-and-validate/scripts/type_coverage.py +0 -173
- package/template/.claude/skills/mcp-builder/SKILL.md +0 -176
- package/template/.claude/skills/merge/SKILL.md +0 -76
- package/template/.claude/skills/mobile-design/SKILL.md +0 -394
- package/template/.claude/skills/mobile-design/decision-trees.md +0 -516
- package/template/.claude/skills/mobile-design/mobile-backend.md +0 -491
- package/template/.claude/skills/mobile-design/mobile-color-system.md +0 -420
- package/template/.claude/skills/mobile-design/mobile-debugging.md +0 -122
- package/template/.claude/skills/mobile-design/mobile-design-thinking.md +0 -357
- package/template/.claude/skills/mobile-design/mobile-navigation.md +0 -458
- package/template/.claude/skills/mobile-design/mobile-performance.md +0 -767
- package/template/.claude/skills/mobile-design/mobile-testing.md +0 -356
- package/template/.claude/skills/mobile-design/mobile-typography.md +0 -433
- package/template/.claude/skills/mobile-design/platform-android.md +0 -666
- package/template/.claude/skills/mobile-design/platform-ios.md +0 -561
- package/template/.claude/skills/mobile-design/scripts/mobile_audit.py +0 -670
- package/template/.claude/skills/mobile-design/touch-psychology.md +0 -537
- package/template/.claude/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
- package/template/.claude/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
- package/template/.claude/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
- package/template/.claude/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
- package/template/.claude/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
- package/template/.claude/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
- package/template/.claude/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
- package/template/.claude/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
- package/template/.claude/skills/nextjs-react-expert/SKILL.md +0 -286
- package/template/.claude/skills/nextjs-react-expert/scripts/convert_rules.py +0 -222
- package/template/.claude/skills/nextjs-react-expert/scripts/react_performance_checker.py +0 -252
- package/template/.claude/skills/nodejs-best-practices/SKILL.md +0 -333
- package/template/.claude/skills/package-json-generator/SKILL.md +0 -60
- package/template/.claude/skills/package-json-generator/scripts/generate.js +0 -120
- package/template/.claude/skills/package-json-generator/scripts/run.sh +0 -19
- package/template/.claude/skills/parallel-agents/SKILL.md +0 -144
- package/template/.claude/skills/performance-optimization/SKILL.md +0 -299
- package/template/.claude/skills/performance-optimization/performance-checklist.md +0 -113
- package/template/.claude/skills/powershell-windows/SKILL.md +0 -167
- package/template/.claude/skills/pr/SKILL.md +0 -93
- package/template/.claude/skills/prd/SKILL.md +0 -127
- package/template/.claude/skills/preview/SKILL.md +0 -42
- package/template/.claude/skills/python-patterns/SKILL.md +0 -441
- package/template/.claude/skills/research/SKILL.md +0 -143
- package/template/.claude/skills/review/SKILL.md +0 -71
- package/template/.claude/skills/roadmap-strategy/SKILL.md +0 -94
- package/template/.claude/skills/security-review/SKILL.md +0 -63
- package/template/.claude/skills/seo-fundamentals/SKILL.md +0 -129
- package/template/.claude/skills/seo-fundamentals/scripts/seo_checker.py +0 -219
- package/template/.claude/skills/server-management/SKILL.md +0 -161
- package/template/.claude/skills/simplify/SKILL.md +0 -70
- package/template/.claude/skills/skill-development/SKILL.md +0 -86
- package/template/.claude/skills/spec/SKILL.md +0 -39
- package/template/.claude/skills/spec-driven-development/SKILL.md +0 -207
- package/template/.claude/skills/tailwind-patterns/SKILL.md +0 -269
- package/template/.claude/skills/type-design/SKILL.md +0 -84
- package/template/.claude/skills/ui-ux-pro-max/SKILL.md +0 -75
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: type-design
|
|
3
|
-
description: "[Devflow] Analyzes type and interface design for encapsulation, invariant expression, usefulness, and enforcement. Use when introducing new types, reviewing PRs with type changes, or refactoring domain models."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Type Design
|
|
7
|
-
|
|
8
|
-
Use this skill to evaluate whether types make invalid states hard or impossible to represent without over-engineering the codebase.
|
|
9
|
-
|
|
10
|
-
## Core Rule
|
|
11
|
-
|
|
12
|
-
Make illegal states unrepresentable when it prevents real bugs, but do not make simple things complex.
|
|
13
|
-
|
|
14
|
-
## When To Use
|
|
15
|
-
|
|
16
|
-
- New type, interface, schema, model, DTO, or value object is introduced.
|
|
17
|
-
- A PR changes type relationships, constructors, factories, or public API contracts.
|
|
18
|
-
- A refactor moves validation, mutation, or domain rules across module boundaries.
|
|
19
|
-
- A reviewer needs a pragmatic quality rating for type design.
|
|
20
|
-
|
|
21
|
-
## Analysis Scope
|
|
22
|
-
|
|
23
|
-
Review:
|
|
24
|
-
|
|
25
|
-
- Type/interface definitions.
|
|
26
|
-
- Constructors, factories, parsers, and validators.
|
|
27
|
-
- Setter methods and mutation points.
|
|
28
|
-
- Public API surface and exported types.
|
|
29
|
-
- Relationships between fields that must remain consistent.
|
|
30
|
-
|
|
31
|
-
## Evaluation Dimensions
|
|
32
|
-
|
|
33
|
-
| Dimension | Ask |
|
|
34
|
-
|---|---|
|
|
35
|
-
| Encapsulation | Can callers violate invariants from outside the type boundary? |
|
|
36
|
-
| Invariant Expression | Are the important constraints obvious from the type shape? |
|
|
37
|
-
| Invariant Usefulness | Do the constraints prevent real bugs or only add ceremony? |
|
|
38
|
-
| Invariant Enforcement | Are invalid instances impossible or at least rejected at boundaries? |
|
|
39
|
-
|
|
40
|
-
Rate each dimension from 1 to 10. Scores below 5 require concrete findings.
|
|
41
|
-
|
|
42
|
-
## Anti-Patterns
|
|
43
|
-
|
|
44
|
-
| Anti-pattern | Risk |
|
|
45
|
-
|---|---|
|
|
46
|
-
| Exposed mutable internals | Callers can break invariants after construction. |
|
|
47
|
-
| Doc-only invariants | The rule exists only in comments and is easy to bypass. |
|
|
48
|
-
| No constructor or parser validation | Invalid instances can enter the system. |
|
|
49
|
-
| Anemic domain model | Rules are scattered across callers. |
|
|
50
|
-
| God type | Too many responsibilities make the type hard to use correctly. |
|
|
51
|
-
| Over-modeled simple data | Complexity exceeds the bug-prevention value. |
|
|
52
|
-
|
|
53
|
-
## Output Format
|
|
54
|
-
|
|
55
|
-
```markdown
|
|
56
|
-
## Type Design Review: [Scope]
|
|
57
|
-
|
|
58
|
-
### Types Reviewed
|
|
59
|
-
| Type | File | Purpose |
|
|
60
|
-
|---|---|---|
|
|
61
|
-
| `TypeName` | `path/file.ts:10` | Represents ... |
|
|
62
|
-
|
|
63
|
-
### Ratings
|
|
64
|
-
| Type | Encapsulation | Expression | Usefulness | Enforcement | Overall |
|
|
65
|
-
|---|---:|---:|---:|---:|---:|
|
|
66
|
-
| `TypeName` | 8 | 7 | 8 | 6 | 7.25 |
|
|
67
|
-
|
|
68
|
-
### Findings
|
|
69
|
-
#### [Severity] [Title]
|
|
70
|
-
**Location**: `path/file.ts:23`
|
|
71
|
-
**Problem**: [What invariant can fail]
|
|
72
|
-
**Impact**: [Concrete bug or maintenance risk]
|
|
73
|
-
**Recommendation**: [Smallest useful improvement]
|
|
74
|
-
|
|
75
|
-
### Verdict
|
|
76
|
-
[Well-designed / Adequate / Needs improvement / Significant issues]
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Verification
|
|
80
|
-
|
|
81
|
-
- Findings cite concrete files and lines.
|
|
82
|
-
- Recommendations fit the project's existing type style.
|
|
83
|
-
- Suggestions include trade-offs when they add ceremony.
|
|
84
|
-
- No recommendation depends on speculative future requirements.
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ui-ux-pro-max
|
|
3
|
-
description: "[Devflow] AI-powered design intelligence with 50+ styles, 95+ color palettes, and automated design system generation. Use when designing, building, or reviewing UI/UX."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# UI/UX Pro Max (Design Intelligence)
|
|
7
|
-
|
|
8
|
-
Comprehensive design guide for web and mobile applications. Contains 50+ styles, 97 color palettes, 57 font pairings, 99 UX guidelines, and 25 chart types across 9 technology stacks. Searchable database with priority-based recommendations.
|
|
9
|
-
|
|
10
|
-
## Prerequisites
|
|
11
|
-
|
|
12
|
-
Python is required for the design system search tool.
|
|
13
|
-
|
|
14
|
-
## How to Use This Skill
|
|
15
|
-
|
|
16
|
-
When you need to perform UI/UX work (design, build, create, implement, review, fix, improve), follow this process:
|
|
17
|
-
|
|
18
|
-
### 1. Analyze User Requirements
|
|
19
|
-
Extract key information:
|
|
20
|
-
- **Product type**: SaaS, e-commerce, dashboard, etc.
|
|
21
|
-
- **Style keywords**: minimal, playful, professional, dark mode, etc.
|
|
22
|
-
- **Industry**: healthcare, fintech, gaming, etc.
|
|
23
|
-
- **Stack**: React, Vue, Next.js, or default to `html-tailwind`.
|
|
24
|
-
|
|
25
|
-
### 2. Generate Design System (REQUIRED)
|
|
26
|
-
**Always start by generating a design system** to get comprehensive recommendations:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
python3 .claude/.shared/ui-ux-pro-max/scripts/search.py "<product_type> <industry> <keywords>" --design-system [-p "Project Name"]
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### 3. Persist Design System
|
|
33
|
-
To save the design system for hierarchical retrieval:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
python3 .claude/.shared/ui-ux-pro-max/scripts/search.py "<query>" --design-system --persist -p "Project Name" [--page "name"]
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### 4. Detailed Domain Searches
|
|
40
|
-
Supplement with specific details as needed:
|
|
41
|
-
- `style`: `--domain style "keywords"`
|
|
42
|
-
- `chart`: `--domain chart "keywords"`
|
|
43
|
-
- `ux`: `--domain ux "keywords"`
|
|
44
|
-
- `typography`: `--domain typography "keywords"`
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## Design Guidelines & Standards
|
|
49
|
-
|
|
50
|
-
### Professional UI Rules
|
|
51
|
-
- **No emoji icons**: Use SVG icons (Heroicons, Lucide).
|
|
52
|
-
- **Stable hover states**: Use color/opacity transitions, avoid layout shifts.
|
|
53
|
-
- **Consistent icon sizing**: Use fixed viewBox (24x24) with w-6 h-6.
|
|
54
|
-
- **Cursor pointer**: Add `cursor-pointer` to all interactive elements.
|
|
55
|
-
|
|
56
|
-
### Contrast & Visibility
|
|
57
|
-
- **Light Mode Glass**: Use `bg-white/80` or higher.
|
|
58
|
-
- **Text Contrast**: Use high-contrast slates (e.g., slate-900 for body).
|
|
59
|
-
- **Border visibility**: Ensure borders are visible in both light/dark modes.
|
|
60
|
-
|
|
61
|
-
### Layout
|
|
62
|
-
- **Floating navbar**: Add `top-4 left-4 right-4` spacing.
|
|
63
|
-
- **Responsive**: Test at 375px, 768px, 1024px, 1440px.
|
|
64
|
-
|
|
65
|
-
## Pre-Delivery Checklist
|
|
66
|
-
|
|
67
|
-
- [ ] No emojis used as icons (use SVG instead).
|
|
68
|
-
- [ ] Hover states don't cause layout shift.
|
|
69
|
-
- [ ] All clickable elements have `cursor-pointer`.
|
|
70
|
-
- [ ] Transitions are smooth (150-300ms).
|
|
71
|
-
- [ ] Responsive at all major breakpoints.
|
|
72
|
-
- [ ] No horizontal scroll on mobile.
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
*Powered by UI-UX Pro Max Engine*
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
---name: agent
|
|
2
|
-
|
|
3
|
-
description: "[Devflow] Invoke specialist persona or role-based agent on a target file, folder, stage artifact, or concern."
|
|
4
|
-
---
|
|
5
|
-
# Phase 90: Invoke Agent
|
|
6
|
-
|
|
7
|
-
Run a specialist agent persona for targeted expertise while preserving the DevFlow 2.0 stage-first contract.
|
|
8
|
-
|
|
9
|
-
Primary behavior now lives in the `specialist-agent-routing` skill. Keep this workflow as the compatibility wrapper and advanced user-facing agent entry point.
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```text
|
|
14
|
-
Agent {AGENT_NAME} {TARGET}
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Examples:
|
|
18
|
-
|
|
19
|
-
```text
|
|
20
|
-
Agent requirements-engineer devflow/runs/007-auth-refactor20-spec.md
|
|
21
|
-
Agent codebase-explorer src/services/
|
|
22
|
-
Agent code-reviewer devflow/runs/007-auth-refactor
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Available Agents
|
|
26
|
-
|
|
27
|
-
Agent definitions live in `../agents/`.
|
|
28
|
-
|
|
29
|
-
Planning and requirements:
|
|
30
|
-
|
|
31
|
-
| Agent | Purpose |
|
|
32
|
-
| :--- | :--- |
|
|
33
|
-
| `prp-core-planner` | Create implementation plans from specs and codebase patterns. |
|
|
34
|
-
| `requirements-engineer` | Refine `10-define.md` and `20-spec.md` before planning. |
|
|
35
|
-
| `prp-core-prd-architect` | Draft PRD documents from early ideas. |
|
|
36
|
-
| `orchestrator` | Coordinate complex work and recommend next specialist steps. |
|
|
37
|
-
| `prp-core-boss` | Route `/goal` requests, decompose work, enforce turn budgets, and validate worker output. |
|
|
38
|
-
|
|
39
|
-
Research and exploration:
|
|
40
|
-
|
|
41
|
-
| Agent | Purpose |
|
|
42
|
-
| :--- | :--- |
|
|
43
|
-
| `codebase-explorer` | Find files and patterns; analyze architecture, data flow, and module relationships. |
|
|
44
|
-
| `web-researcher` | Research external APIs, docs, and best practices. |
|
|
45
|
-
|
|
46
|
-
Implementation:
|
|
47
|
-
|
|
48
|
-
| Agent | Purpose |
|
|
49
|
-
| :--- | :--- |
|
|
50
|
-
| `prp-core-coder` | Implement planned subtasks. |
|
|
51
|
-
| `prp-core-worker` | Execute focused Boss-assigned `/goal` subtasks and report validation status. |
|
|
52
|
-
| `backend-specialist` | Backend, APIs, database, server logic. |
|
|
53
|
-
| `frontend-specialist` | UI/UX and frontend implementation. |
|
|
54
|
-
| `database-architect` | Schema, indexing, and query design. |
|
|
55
|
-
|
|
56
|
-
Quality and debugging:
|
|
57
|
-
|
|
58
|
-
| Agent | Purpose |
|
|
59
|
-
| :--- | :--- |
|
|
60
|
-
| `test-engineer` | Unit and integration tests. |
|
|
61
|
-
| `prp-core-debugger` | Root cause analysis. |
|
|
62
|
-
| `code-reviewer` | Code review, risk, regressions. |
|
|
63
|
-
| `security-auditor` | Security and logic risk. |
|
|
64
|
-
| `performance-engineer` | Performance bottlenecks. |
|
|
65
|
-
|
|
66
|
-
Git and docs:
|
|
67
|
-
|
|
68
|
-
| Agent | Purpose |
|
|
69
|
-
| :--- | :--- |
|
|
70
|
-
| `prp-core-git-committer` | Commit preparation and message quality. |
|
|
71
|
-
| `prp-core-git-pr-maker` | Pull request summary and preparation. |
|
|
72
|
-
| `documentation-maintainer` | Documentation impact analysis. |
|
|
73
|
-
|
|
74
|
-
Maintenance and infrastructure:
|
|
75
|
-
|
|
76
|
-
| Agent | Purpose |
|
|
77
|
-
| :--- | :--- |
|
|
78
|
-
| `ob-loop-engineer` | Overnight infrastructure maintenance, code debt pruning, and variant branch testing loops. |
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
## Reusable Skills
|
|
82
|
-
|
|
83
|
-
The following former narrow agents are now skills. Invoke them through the responsible agent or workflow instead of `Agent`:
|
|
84
|
-
|
|
85
|
-
| Skill | Apply Through |
|
|
86
|
-
| :--- | :--- |
|
|
87
|
-
| `code-simplification` | `prp-core-coder`, `code-reviewer`, or `Simplify` |
|
|
88
|
-
| `type-design` | `backend-specialist`, `frontend-specialist`, `database-architect`, or `code-reviewer` |
|
|
89
|
-
| `silent-failure-audit` | `code-reviewer`, `test-engineer`, `backend-specialist`, or `security-auditor` |
|
|
90
|
-
|
|
91
|
-
## Artifact Contract
|
|
92
|
-
|
|
93
|
-
Specialist agents must use the DevFlow 2.0 stage-first contract:
|
|
94
|
-
|
|
95
|
-
- Prefer `00-discover.md`, `10-define.md`, `20-spec.md`, `30-plan.md`, `40-execute.md`, `50-verify.md`, `70-release.md`, and `60-report.md` as the primary artifacts.
|
|
96
|
-
- Do not silently rewrite legacy JSON artifacts.
|
|
97
|
-
- If migration work still requires JSON, prefer CLI-backed minimal updates instead of full-file rewrites.
|
|
98
|
-
- If the specialist is only reviewing, recommend exact commands instead of mutating artifacts.
|
|
99
|
-
- Keep reports readable without requiring a dashboard or JSON viewer.
|
|
100
|
-
|
|
101
|
-
## 9arm-Skills Discipline Routing
|
|
102
|
-
|
|
103
|
-
When the target task matches one of these review or communication modes, apply the credited local pack under `.agents/skills/9arm-skills/` while preserving the normal specialist output contract:
|
|
104
|
-
|
|
105
|
-
| Situation | Apply |
|
|
106
|
-
| :--- | :--- |
|
|
107
|
-
| `code-reviewer`, PR review, plan critique, or change risk review | `9arm-skills/scrutinize` |
|
|
108
|
-
| debug or RCA specialist work | `9arm-skills/debug-mantra` |
|
|
109
|
-
| completed bug or regression lesson extraction | `9arm-skills/post-mortem` |
|
|
110
|
-
| stakeholder-readable summary, PR body, release note, standup, or status update | `9arm-skills/management-talk` |
|
|
111
|
-
|
|
112
|
-
Reports that use the pack should include a short `Source Discipline` note with credit to `thananon/9arm-skills`.
|
|
113
|
-
|
|
114
|
-
## Process
|
|
115
|
-
|
|
116
|
-
1. Load the persona from `../agents/{AGENT_NAME}.md`.
|
|
117
|
-
2. Read the target file, folder, stage directory, or recent changes.
|
|
118
|
-
3. Apply the persona's specialist logic.
|
|
119
|
-
4. If artifact changes are needed, prefer stage markdown updates first.
|
|
120
|
-
5. Record lightweight context usage in the report when the agent loads notable context.
|
|
121
|
-
6. Produce either a concise report or a focused set of changes.
|
|
122
|
-
|
|
123
|
-
## Output
|
|
124
|
-
|
|
125
|
-
If a report is substantial, save it to:
|
|
126
|
-
|
|
127
|
-
```text
|
|
128
|
-
devflow/reports/{date}-{agent-name}-{timestamp}.md
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
Before saving a substantial agent report, inspect `.agent/resources/schemas/agent_report.template.md` and use its required headings unless the target workflow provides a more specific template.
|
|
132
|
-
|
|
133
|
-
Before reporting completion, run:
|
|
134
|
-
|
|
135
|
-
Review `{report_path}` against `agent_report.template.md`, keep the required headings, and remove placeholder text before completion.
|
|
136
|
-
|
|
137
|
-
Replace any placeholder or template text with concrete files reviewed, findings, recommendations, and validation needs.
|
|
138
|
-
|
|
139
|
-
For substantial reports, add a short `Context Usage Notes` subsection under the context reviewed area with files or artifacts loaded, any known token counts, and one practical optimization note for future runs.
|
|
140
|
-
|
|
141
|
-
Short reports can be returned directly in chat.
|
|
142
|
-
|
|
143
|
-
## Relationship To DevFlow 2.0
|
|
144
|
-
|
|
145
|
-
- Classification: Companion command
|
|
146
|
-
- Mainline status: Specialist invocation command, not a numbered stage
|
|
147
|
-
- Typical entry points: any stage that needs focused specialist judgment
|
|
148
|
-
- Typical handoff targets: return to the owning workflow such as `10-define`, `20-spec`, `30-plan`, `40-execute`, `50-verify`, `60-report`, `70-release`
|
|
149
|
-
|
|
150
|
-
## Sources
|
|
151
|
-
|
|
152
|
-
- `AGENTS.md`
|
|
153
|
-
- `.agent/agents/README.md`
|
|
154
|
-
- `.agent/resources/schemas/agent_report.template.md`
|
|
155
|
-
- Related commands: `Research`, `PR-Review`, `Debug`, `Help`, all mainline stages
|
|
156
|
-
|
|
157
|
-
## Next Workflow Recommendation
|
|
158
|
-
|
|
159
|
-
- **Primary**: the workflow that owns the target's lifecycle, such as `10-define`, `20-spec`, `30-plan`, `40-execute`, `50-verify`, `60-report`, `70-release`, or `PR-Review`.
|
|
160
|
-
- **Why**: `Agent` supplies specialist judgment; the owning workflow should execute the next lifecycle step.
|
|
161
|
-
- **Alternatives**:
|
|
162
|
-
- `Research` when the specialist work uncovered unresolved external uncertainty
|
|
163
|
-
- `Wiki` when the specialist report contains reusable project knowledge
|
|
164
|
-
- `Help {target}` when the correct next route is unclear
|
|
165
|
-
|
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: api-and-interface-design
|
|
3
|
-
description: "[Devflow] Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# API and Interface Design
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
Design stable, well-documented interfaces that are hard to misuse. Good interfaces make the right thing easy and the wrong thing hard. This applies to REST APIs, GraphQL schemas, module boundaries, component props, and any surface where one piece of code talks to another.
|
|
11
|
-
|
|
12
|
-
## When to Use
|
|
13
|
-
|
|
14
|
-
- Designing new API endpoints
|
|
15
|
-
- Defining module boundaries or contracts between teams
|
|
16
|
-
- Creating component prop interfaces
|
|
17
|
-
- Establishing database schema that informs API shape
|
|
18
|
-
- Changing existing public interfaces
|
|
19
|
-
|
|
20
|
-
## Core Principles
|
|
21
|
-
|
|
22
|
-
### Hyrum's Law
|
|
23
|
-
|
|
24
|
-
> With a sufficient number of users of an API, all observable behaviors of your system will be depended on by somebody, regardless of what you promise in the contract.
|
|
25
|
-
|
|
26
|
-
This means: every public behavior — including undocumented quirks, error message text, timing, and ordering — becomes a de facto contract once users depend on it. Design implications:
|
|
27
|
-
|
|
28
|
-
- **Be intentional about what you expose.** Every observable behavior is a potential commitment.
|
|
29
|
-
- **Don't leak implementation details.** If users can observe it, they will depend on it.
|
|
30
|
-
- **Plan for deprecation at design time.** See `deprecation-and-migration` for how to safely remove things users depend on.
|
|
31
|
-
- **Tests are not enough.** Even with perfect contract tests, Hyrum's Law means "safe" changes can break real users who depend on undocumented behavior.
|
|
32
|
-
|
|
33
|
-
### The One-Version Rule
|
|
34
|
-
|
|
35
|
-
Avoid forcing consumers to choose between multiple versions of the same dependency or API. Diamond dependency problems arise when different consumers need different versions of the same thing. Design for a world where only one version exists at a time — extend rather than fork.
|
|
36
|
-
|
|
37
|
-
### 1. Contract First
|
|
38
|
-
|
|
39
|
-
Define the interface before implementing it. The contract is the spec — implementation follows.
|
|
40
|
-
|
|
41
|
-
```typescript
|
|
42
|
-
// Define the contract first
|
|
43
|
-
interface TaskAPI {
|
|
44
|
-
// Creates a task and returns the created task with server-generated fields
|
|
45
|
-
createTask(input: CreateTaskInput): Promise<Task>;
|
|
46
|
-
|
|
47
|
-
// Returns paginated tasks matching filters
|
|
48
|
-
listTasks(params: ListTasksParams): Promise<PaginatedResult<Task>>;
|
|
49
|
-
|
|
50
|
-
// Returns a single task or throws NotFoundError
|
|
51
|
-
getTask(id: string): Promise<Task>;
|
|
52
|
-
|
|
53
|
-
// Partial update — only provided fields change
|
|
54
|
-
updateTask(id: string, input: UpdateTaskInput): Promise<Task>;
|
|
55
|
-
|
|
56
|
-
// Idempotent delete — succeeds even if already deleted
|
|
57
|
-
deleteTask(id: string): Promise<void>;
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### 2. Consistent Error Semantics
|
|
62
|
-
|
|
63
|
-
Pick one error strategy and use it everywhere:
|
|
64
|
-
|
|
65
|
-
```typescript
|
|
66
|
-
// REST: HTTP status codes + structured error body
|
|
67
|
-
// Every error response follows the same shape
|
|
68
|
-
interface APIError {
|
|
69
|
-
error: {
|
|
70
|
-
code: string; // Machine-readable: "VALIDATION_ERROR"
|
|
71
|
-
message: string; // Human-readable: "Email is required"
|
|
72
|
-
details?: unknown; // Additional context when helpful
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Status code mapping
|
|
77
|
-
// 400 → Client sent invalid data
|
|
78
|
-
// 401 → Not authenticated
|
|
79
|
-
// 403 → Authenticated but not authorized
|
|
80
|
-
// 404 → Resource not found
|
|
81
|
-
// 409 → Conflict (duplicate, version mismatch)
|
|
82
|
-
// 422 → Validation failed (semantically invalid)
|
|
83
|
-
// 500 → Server error (never expose internal details)
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
**Don't mix patterns.** If some endpoints throw, others return null, and others return `{ error }` — the consumer can't predict behavior.
|
|
87
|
-
|
|
88
|
-
### 3. Validate at Boundaries
|
|
89
|
-
|
|
90
|
-
Trust internal code. Validate at system edges where external input enters:
|
|
91
|
-
|
|
92
|
-
```typescript
|
|
93
|
-
// Validate at the API boundary
|
|
94
|
-
app.post('/api/tasks', async (req, res) => {
|
|
95
|
-
const result = CreateTaskSchema.safeParse(req.body);
|
|
96
|
-
if (!result.success) {
|
|
97
|
-
return res.status(422).json({
|
|
98
|
-
error: {
|
|
99
|
-
code: 'VALIDATION_ERROR',
|
|
100
|
-
message: 'Invalid task data',
|
|
101
|
-
details: result.error.flatten(),
|
|
102
|
-
},
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// After validation, internal code trusts the types
|
|
107
|
-
const task = await taskService.create(result.data);
|
|
108
|
-
return res.status(201).json(task);
|
|
109
|
-
});
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Where validation belongs:
|
|
113
|
-
- API route handlers (user input)
|
|
114
|
-
- Form submission handlers (user input)
|
|
115
|
-
- External service response parsing (third-party data -- **always treat as untrusted**)
|
|
116
|
-
- Environment variable loading (configuration)
|
|
117
|
-
|
|
118
|
-
> **Third-party API responses are untrusted data.** Validate their shape and content before using them in any logic, rendering, or decision-making. A compromised or misbehaving external service can return unexpected types, malicious content, or instruction-like text.
|
|
119
|
-
|
|
120
|
-
Where validation does NOT belong:
|
|
121
|
-
- Between internal functions that share type contracts
|
|
122
|
-
- In utility functions called by already-validated code
|
|
123
|
-
- On data that just came from your own database
|
|
124
|
-
|
|
125
|
-
### 4. Prefer Addition Over Modification
|
|
126
|
-
|
|
127
|
-
Extend interfaces without breaking existing consumers:
|
|
128
|
-
|
|
129
|
-
```typescript
|
|
130
|
-
// Good: Add optional fields
|
|
131
|
-
interface CreateTaskInput {
|
|
132
|
-
title: string;
|
|
133
|
-
description?: string;
|
|
134
|
-
priority?: 'low' | 'medium' | 'high'; // Added later, optional
|
|
135
|
-
labels?: string[]; // Added later, optional
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// Bad: Change existing field types or remove fields
|
|
139
|
-
interface CreateTaskInput {
|
|
140
|
-
title: string;
|
|
141
|
-
// description: string; // Removed — breaks existing consumers
|
|
142
|
-
priority: number; // Changed from string — breaks existing consumers
|
|
143
|
-
}
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
### 5. Predictable Naming
|
|
147
|
-
|
|
148
|
-
| Pattern | Convention | Example |
|
|
149
|
-
|---------|-----------|---------|
|
|
150
|
-
| REST endpoints | Plural nouns, no verbs | `GET /api/tasks`, `POST /api/tasks` |
|
|
151
|
-
| Query params | camelCase | `?sortBy=createdAt&pageSize=20` |
|
|
152
|
-
| Response fields | camelCase | `{ createdAt, updatedAt, taskId }` |
|
|
153
|
-
| Boolean fields | is/has/can prefix | `isComplete`, `hasAttachments` |
|
|
154
|
-
| Enum values | UPPER_SNAKE | `"IN_PROGRESS"`, `"COMPLETED"` |
|
|
155
|
-
|
|
156
|
-
## REST API Patterns
|
|
157
|
-
|
|
158
|
-
### Resource Design
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
GET /api/tasks → List tasks (with query params for filtering)
|
|
162
|
-
POST /api/tasks → Create a task
|
|
163
|
-
GET /api/tasks/:id → Get a single task
|
|
164
|
-
PATCH /api/tasks/:id → Update a task (partial)
|
|
165
|
-
DELETE /api/tasks/:id → Delete a task
|
|
166
|
-
|
|
167
|
-
GET /api/tasks/:id/comments → List comments for a task (sub-resource)
|
|
168
|
-
POST /api/tasks/:id/comments → Add a comment to a task
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
### Pagination
|
|
172
|
-
|
|
173
|
-
Paginate list endpoints:
|
|
174
|
-
|
|
175
|
-
```typescript
|
|
176
|
-
// Request
|
|
177
|
-
GET /api/tasks?page=1&pageSize=20&sortBy=createdAt&sortOrder=desc
|
|
178
|
-
|
|
179
|
-
// Response
|
|
180
|
-
{
|
|
181
|
-
"data": [...],
|
|
182
|
-
"pagination": {
|
|
183
|
-
"page": 1,
|
|
184
|
-
"pageSize": 20,
|
|
185
|
-
"totalItems": 142,
|
|
186
|
-
"totalPages": 8
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### Filtering
|
|
192
|
-
|
|
193
|
-
Use query parameters for filters:
|
|
194
|
-
|
|
195
|
-
```
|
|
196
|
-
GET /api/tasks?status=in_progress&assignee=user123&createdAfter=2025-01-01
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### Partial Updates (PATCH)
|
|
200
|
-
|
|
201
|
-
Accept partial objects — only update what's provided:
|
|
202
|
-
|
|
203
|
-
```typescript
|
|
204
|
-
// Only title changes, everything else preserved
|
|
205
|
-
PATCH /api/tasks/123
|
|
206
|
-
{ "title": "Updated title" }
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
## TypeScript Interface Patterns
|
|
210
|
-
|
|
211
|
-
### Use Discriminated Unions for Variants
|
|
212
|
-
|
|
213
|
-
```typescript
|
|
214
|
-
// Good: Each variant is explicit
|
|
215
|
-
type TaskStatus =
|
|
216
|
-
| { type: 'pending' }
|
|
217
|
-
| { type: 'in_progress'; assignee: string; startedAt: Date }
|
|
218
|
-
| { type: 'completed'; completedAt: Date; completedBy: string }
|
|
219
|
-
| { type: 'cancelled'; reason: string; cancelledAt: Date };
|
|
220
|
-
|
|
221
|
-
// Consumer gets type narrowing
|
|
222
|
-
function getStatusLabel(status: TaskStatus): string {
|
|
223
|
-
switch (status.type) {
|
|
224
|
-
case 'pending': return 'Pending';
|
|
225
|
-
case 'in_progress': return `In progress (${status.assignee})`;
|
|
226
|
-
case 'completed': return `Done on ${status.completedAt}`;
|
|
227
|
-
case 'cancelled': return `Cancelled: ${status.reason}`;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
### Input/Output Separation
|
|
233
|
-
|
|
234
|
-
```typescript
|
|
235
|
-
// Input: what the caller provides
|
|
236
|
-
interface CreateTaskInput {
|
|
237
|
-
title: string;
|
|
238
|
-
description?: string;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
// Output: what the system returns (includes server-generated fields)
|
|
242
|
-
interface Task {
|
|
243
|
-
id: string;
|
|
244
|
-
title: string;
|
|
245
|
-
description: string | null;
|
|
246
|
-
createdAt: Date;
|
|
247
|
-
updatedAt: Date;
|
|
248
|
-
createdBy: string;
|
|
249
|
-
}
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
### Use Branded Types for IDs
|
|
253
|
-
|
|
254
|
-
```typescript
|
|
255
|
-
type TaskId = string & { readonly __brand: 'TaskId' };
|
|
256
|
-
type UserId = string & { readonly __brand: 'UserId' };
|
|
257
|
-
|
|
258
|
-
// Prevents accidentally passing a UserId where a TaskId is expected
|
|
259
|
-
function getTask(id: TaskId): Promise<Task> { ... }
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
## Common Rationalizations
|
|
263
|
-
|
|
264
|
-
| Rationalization | Reality |
|
|
265
|
-
|---|---|
|
|
266
|
-
| "We'll document the API later" | The types ARE the documentation. Define them first. |
|
|
267
|
-
| "We don't need pagination for now" | You will the moment someone has 100+ items. Add it from the start. |
|
|
268
|
-
| "PATCH is complicated, let's just use PUT" | PUT requires the full object every time. PATCH is what clients actually want. |
|
|
269
|
-
| "We'll version the API when we need to" | Breaking changes without versioning break consumers. Design for extension from the start. |
|
|
270
|
-
| "Nobody uses that undocumented behavior" | Hyrum's Law: if it's observable, somebody depends on it. Treat every public behavior as a commitment. |
|
|
271
|
-
| "We can just maintain two versions" | Multiple versions multiply maintenance cost and create diamond dependency problems. Prefer the One-Version Rule. |
|
|
272
|
-
| "Internal APIs don't need contracts" | Internal consumers are still consumers. Contracts prevent coupling and enable parallel work. |
|
|
273
|
-
|
|
274
|
-
## Red Flags
|
|
275
|
-
|
|
276
|
-
- Endpoints that return different shapes depending on conditions
|
|
277
|
-
- Inconsistent error formats across endpoints
|
|
278
|
-
- Validation scattered throughout internal code instead of at boundaries
|
|
279
|
-
- Breaking changes to existing fields (type changes, removals)
|
|
280
|
-
- List endpoints without pagination
|
|
281
|
-
- Verbs in REST URLs (`/api/createTask`, `/api/getUsers`)
|
|
282
|
-
- Third-party API responses used without validation or sanitization
|
|
283
|
-
|
|
284
|
-
## Verification
|
|
285
|
-
|
|
286
|
-
After designing an API:
|
|
287
|
-
|
|
288
|
-
- [ ] Every endpoint has typed input and output schemas
|
|
289
|
-
- [ ] Error responses follow a single consistent format
|
|
290
|
-
- [ ] Validation happens at system boundaries only
|
|
291
|
-
- [ ] List endpoints support pagination
|
|
292
|
-
- [ ] New fields are additive and optional (backward compatible)
|
|
293
|
-
- [ ] Naming follows consistent conventions across all endpoints
|
|
294
|
-
- [ ] API documentation or types are committed alongside the implementation
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: app-builder
|
|
3
|
-
description: "[Devflow] Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents."
|
|
4
|
-
allowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# App Builder - Application Building Orchestrator
|
|
8
|
-
|
|
9
|
-
> Analyzes user's requests, determines tech stack, plans structure, and coordinates agents.
|
|
10
|
-
|
|
11
|
-
## 🎯 Selective Reading Rule
|
|
12
|
-
|
|
13
|
-
**Read ONLY files relevant to the request!** Check the content map, find what you need.
|
|
14
|
-
|
|
15
|
-
| File | Description | When to Read |
|
|
16
|
-
|------|-------------|--------------|
|
|
17
|
-
| `project-detection.md` | Keyword matrix, project type detection | Starting new project |
|
|
18
|
-
| `tech-stack.md` | 2026 default stack, alternatives | Choosing technologies |
|
|
19
|
-
| `agent-coordination.md` | Agent pipeline, execution order | Coordinating multi-agent work |
|
|
20
|
-
| `scaffolding.md` | Directory structure, core files | Creating project structure |
|
|
21
|
-
| `feature-building.md` | Feature analysis, error handling | Adding features to existing project |
|
|
22
|
-
| `templates/SKILL.md` | **Project templates** | Scaffolding new project |
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## 📦 Templates (13)
|
|
27
|
-
|
|
28
|
-
Quick-start scaffolding for new projects. **Read the matching template only!**
|
|
29
|
-
|
|
30
|
-
| Template | Tech Stack | When to Use |
|
|
31
|
-
|----------|------------|-------------|
|
|
32
|
-
| [nextjs-fullstack](templates/nextjs-fullstack/TEMPLATE.md) | Next.js + Prisma | Full-stack web app |
|
|
33
|
-
| [nextjs-saas](templates/nextjs-saas/TEMPLATE.md) | Next.js + Stripe | SaaS product |
|
|
34
|
-
| [nextjs-static](templates/nextjs-static/TEMPLATE.md) | Next.js + Framer | Landing page |
|
|
35
|
-
| [nuxt-app](templates/nuxt-app/TEMPLATE.md) | Nuxt 3 + Pinia | Vue full-stack app |
|
|
36
|
-
| [express-api](templates/express-api/TEMPLATE.md) | Express + JWT | REST API |
|
|
37
|
-
| [python-fastapi](templates/python-fastapi/TEMPLATE.md) | FastAPI | Python API |
|
|
38
|
-
| [react-native-app](templates/react-native-app/TEMPLATE.md) | Expo + Zustand | Mobile app |
|
|
39
|
-
| [flutter-app](templates/flutter-app/TEMPLATE.md) | Flutter + Riverpod | Cross-platform mobile |
|
|
40
|
-
| [electron-desktop](templates/electron-desktop/TEMPLATE.md) | Electron + React | Desktop app |
|
|
41
|
-
| [chrome-extension](templates/chrome-extension/TEMPLATE.md) | Chrome MV3 | Browser extension |
|
|
42
|
-
| [cli-tool](templates/cli-tool/TEMPLATE.md) | Node.js + Commander | CLI app |
|
|
43
|
-
| [monorepo-turborepo](templates/monorepo-turborepo/TEMPLATE.md) | Turborepo + pnpm | Monorepo |
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## 🔗 Related Agents
|
|
48
|
-
|
|
49
|
-
| Agent | Role |
|
|
50
|
-
|-------|------|
|
|
51
|
-
| `prp-core-planner` | Task breakdown, dependency graph |
|
|
52
|
-
| `frontend-specialist` | UI components, pages |
|
|
53
|
-
| `backend-specialist` | API, business logic |
|
|
54
|
-
| `database-architect` | Schema, migrations |
|
|
55
|
-
| `devops-engineer` | Deployment, preview |
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Usage Example
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
User: "Make an Instagram clone with photo sharing and likes"
|
|
63
|
-
|
|
64
|
-
App Builder Process:
|
|
65
|
-
1. Project type: Social Media App
|
|
66
|
-
2. Tech stack: Next.js + Prisma + Cloudinary + Clerk
|
|
67
|
-
3. Create plan:
|
|
68
|
-
├─ Database schema (users, posts, likes, follows)
|
|
69
|
-
├─ API routes (12 endpoints)
|
|
70
|
-
├─ Pages (feed, profile, upload)
|
|
71
|
-
└─ Components (PostCard, Feed, LikeButton)
|
|
72
|
-
4. Coordinate agents
|
|
73
|
-
5. Report progress
|
|
74
|
-
6. Start preview
|
|
75
|
-
```
|