@nextsparkjs/ai-workflow 0.1.0-beta.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +115 -0
- package/claude/_docs/workflows-optimizations.md +359 -0
- package/claude/agents/api-tester.md +634 -0
- package/claude/agents/architecture-supervisor.md +1351 -0
- package/claude/agents/backend-developer.md +997 -0
- package/claude/agents/backend-validator.md +417 -0
- package/claude/agents/bdd-docs-writer.md +737 -0
- package/claude/agents/block-developer.md +677 -0
- package/claude/agents/code-reviewer.md +1432 -0
- package/claude/agents/db-developer.md +721 -0
- package/claude/agents/db-validator.md +407 -0
- package/claude/agents/demo-video-generator.md +493 -0
- package/claude/agents/documentation-writer.md +1268 -0
- package/claude/agents/frontend-developer.md +1234 -0
- package/claude/agents/frontend-validator.md +777 -0
- package/claude/agents/functional-validator.md +630 -0
- package/claude/agents/mock-analyst.md +387 -0
- package/claude/agents/product-manager.md +963 -0
- package/claude/agents/qa-automation.md +1762 -0
- package/claude/agents/release-manager.md +634 -0
- package/claude/agents/selectors-translator.md +262 -0
- package/claude/agents/unit-test-writer.md +785 -0
- package/claude/agents/visual-comparator.md +329 -0
- package/claude/agents/workflow-maintainer.md +352 -0
- package/claude/commands/do/README.md +88 -0
- package/claude/commands/do/create-api.md +64 -0
- package/claude/commands/do/create-entity.md +66 -0
- package/claude/commands/do/create-migration.md +64 -0
- package/claude/commands/do/create-plugin.md +56 -0
- package/claude/commands/do/create-theme.md +70 -0
- package/claude/commands/do/mock-data.md +67 -0
- package/claude/commands/do/reset-db.md +71 -0
- package/claude/commands/do/setup-scheduled-action.md +75 -0
- package/claude/commands/do/sync-code-review.md +117 -0
- package/claude/commands/do/update-selectors.md +112 -0
- package/claude/commands/do/use-skills.md +90 -0
- package/claude/commands/do/validate-blocks.md +69 -0
- package/claude/commands/how-to/README.md +261 -0
- package/claude/commands/how-to/add-metadata.md +692 -0
- package/claude/commands/how-to/add-taxonomies.md +806 -0
- package/claude/commands/how-to/add-translations.md +571 -0
- package/claude/commands/how-to/create-api.md +577 -0
- package/claude/commands/how-to/create-block.md +575 -0
- package/claude/commands/how-to/create-child-entities.md +771 -0
- package/claude/commands/how-to/create-entity.md +597 -0
- package/claude/commands/how-to/create-migrations.md +605 -0
- package/claude/commands/how-to/create-plugin.md +654 -0
- package/claude/commands/how-to/customize-app.md +481 -0
- package/claude/commands/how-to/customize-dashboard.md +553 -0
- package/claude/commands/how-to/customize-theme.md +438 -0
- package/claude/commands/how-to/define-features-flows.md +632 -0
- package/claude/commands/how-to/deploy.md +507 -0
- package/claude/commands/how-to/handle-file-uploads.md +746 -0
- package/claude/commands/how-to/implement-search.md +1001 -0
- package/claude/commands/how-to/install-plugins.md +352 -0
- package/claude/commands/how-to/manage-test-coverage.md +984 -0
- package/claude/commands/how-to/run-tests.md +400 -0
- package/claude/commands/how-to/set-app-languages.md +601 -0
- package/claude/commands/how-to/set-plans-and-permissions.md +575 -0
- package/claude/commands/how-to/set-scheduled-actions.md +527 -0
- package/claude/commands/how-to/set-user-roles-and-permissions.md +550 -0
- package/claude/commands/how-to/setup-authentication.md +388 -0
- package/claude/commands/how-to/setup-claude-code.md +440 -0
- package/claude/commands/how-to/setup-database.md +274 -0
- package/claude/commands/how-to/setup-email-providers.md +598 -0
- package/claude/commands/how-to/setup-mobile-dev.md +627 -0
- package/claude/commands/how-to/start.md +500 -0
- package/claude/commands/how-to/use-devtools.md +639 -0
- package/claude/commands/how-to/use-superadmin.md +622 -0
- package/claude/commands/session/README.md +193 -0
- package/claude/commands/session/block-create.md +190 -0
- package/claude/commands/session/block-list.md +203 -0
- package/claude/commands/session/block-update.md +192 -0
- package/claude/commands/session/block-validate.md +218 -0
- package/claude/commands/session/changelog.md +115 -0
- package/claude/commands/session/close.md +225 -0
- package/claude/commands/session/commit.md +174 -0
- package/claude/commands/session/db-entity.md +206 -0
- package/claude/commands/session/db-fix.md +212 -0
- package/claude/commands/session/db-sample.md +206 -0
- package/claude/commands/session/demo.md +178 -0
- package/claude/commands/session/doc-bdd.md +207 -0
- package/claude/commands/session/doc-feature.md +218 -0
- package/claude/commands/session/doc-read.md +225 -0
- package/claude/commands/session/execute.md +204 -0
- package/claude/commands/session/explain.md +202 -0
- package/claude/commands/session/fix-bug.md +210 -0
- package/claude/commands/session/fix-build.md +182 -0
- package/claude/commands/session/fix-test.md +189 -0
- package/claude/commands/session/pending.md +232 -0
- package/claude/commands/session/refine.md +188 -0
- package/claude/commands/session/resume.md +192 -0
- package/claude/commands/session/review.md +192 -0
- package/claude/commands/session/scope-change.md +181 -0
- package/claude/commands/session/start-blocks.md +347 -0
- package/claude/commands/session/start.md +604 -0
- package/claude/commands/session/status.md +169 -0
- package/claude/commands/session/test-fix.md +221 -0
- package/claude/commands/session/test-run.md +203 -0
- package/claude/commands/session/test-write.md +242 -0
- package/claude/commands/session/validate.md +162 -0
- package/claude/config/context.json +40 -0
- package/claude/config/github.json +69 -0
- package/claude/config/github.schema.json +106 -0
- package/claude/config/team.json +46 -0
- package/claude/config/team.schema.json +106 -0
- package/claude/config/workspace.json +43 -0
- package/claude/config/workspace.schema.json +75 -0
- package/claude/skills/README.md +228 -0
- package/claude/skills/accessibility/SKILL.md +573 -0
- package/claude/skills/api-bypass-layers/SKILL.md +550 -0
- package/claude/skills/asana-integration/SKILL.md +499 -0
- package/claude/skills/better-auth/SKILL.md +666 -0
- package/claude/skills/billing-subscriptions/SKILL.md +660 -0
- package/claude/skills/block-decision-matrix/SKILL.md +359 -0
- package/claude/skills/clickup-integration/SKILL.md +434 -0
- package/claude/skills/core-theme-responsibilities/SKILL.md +485 -0
- package/claude/skills/create-plugin/SKILL.md +425 -0
- package/claude/skills/create-theme/SKILL.md +331 -0
- package/claude/skills/cypress-api/SKILL.md +511 -0
- package/claude/skills/cypress-api/scripts/generate-api-controller.py +329 -0
- package/claude/skills/cypress-api/scripts/generate-api-test.py +930 -0
- package/claude/skills/cypress-e2e/SKILL.md +526 -0
- package/claude/skills/cypress-e2e/scripts/extract-selectors.py +383 -0
- package/claude/skills/cypress-e2e/scripts/generate-uat-test.py +788 -0
- package/claude/skills/cypress-selectors/SKILL.md +309 -0
- package/claude/skills/cypress-selectors/scripts/extract-missing.py +243 -0
- package/claude/skills/cypress-selectors/scripts/generate-block-selectors.py +283 -0
- package/claude/skills/cypress-selectors/scripts/validate-selectors.py +145 -0
- package/claude/skills/database-migrations/SKILL.md +335 -0
- package/claude/skills/database-migrations/scripts/generate-sample-data.py +284 -0
- package/claude/skills/database-migrations/scripts/validate-migration.py +323 -0
- package/claude/skills/design-system/SKILL.md +682 -0
- package/claude/skills/documentation/SKILL.md +540 -0
- package/claude/skills/entity-api/SKILL.md +482 -0
- package/claude/skills/entity-system/SKILL.md +635 -0
- package/claude/skills/entity-system/scripts/generate-child-migration.py +298 -0
- package/claude/skills/entity-system/scripts/generate-metas-migration.py +233 -0
- package/claude/skills/entity-system/scripts/generate-migration.py +382 -0
- package/claude/skills/entity-system/scripts/generate-sample-data.py +418 -0
- package/claude/skills/entity-system/scripts/scaffold-entity.py +661 -0
- package/claude/skills/github/SKILL.md +467 -0
- package/claude/skills/i18n-nextintl/SKILL.md +302 -0
- package/claude/skills/i18n-nextintl/scripts/add-translation.py +243 -0
- package/claude/skills/i18n-nextintl/scripts/extract-hardcoded.py +246 -0
- package/claude/skills/i18n-nextintl/scripts/validate-translations.py +260 -0
- package/claude/skills/impact-analysis/SKILL.md +203 -0
- package/claude/skills/jest-unit/SKILL.md +306 -0
- package/claude/skills/jest-unit/references/component-testing.md +371 -0
- package/claude/skills/jest-unit/references/mocking-patterns.md +380 -0
- package/claude/skills/jest-unit/references/service-hook-testing.md +454 -0
- package/claude/skills/jira-integration/SKILL.md +539 -0
- package/claude/skills/media-library/SKILL.md +743 -0
- package/claude/skills/mock-analysis/SKILL.md +276 -0
- package/claude/skills/monorepo-architecture/SKILL.md +162 -0
- package/claude/skills/nextjs-api-development/SKILL.md +364 -0
- package/claude/skills/nextjs-api-development/scripts/generate-crud-tests.py +456 -0
- package/claude/skills/nextjs-api-development/scripts/scaffold-endpoint.py +481 -0
- package/claude/skills/nextjs-api-development/scripts/validate-api.py +283 -0
- package/claude/skills/notion-integration/SKILL.md +641 -0
- package/claude/skills/npm-development-workflow/SKILL.md +480 -0
- package/claude/skills/page-builder-blocks/SKILL.md +530 -0
- package/claude/skills/page-builder-blocks/scripts/scaffold-block.py +444 -0
- package/claude/skills/permissions-system/SKILL.md +619 -0
- package/claude/skills/plugins/SKILL.md +340 -0
- package/claude/skills/plugins/references/plugin-templates.md +414 -0
- package/claude/skills/plugins/references/plugin-testing.md +353 -0
- package/claude/skills/plugins/references/plugin-types.md +198 -0
- package/claude/skills/plugins/scripts/scaffold-plugin.py +443 -0
- package/claude/skills/pom-patterns/SKILL.md +452 -0
- package/claude/skills/pom-patterns/scripts/generate-pom.py +392 -0
- package/claude/skills/rate-limiting/SKILL.md +342 -0
- package/claude/skills/react-best-practices/AGENTS.md +2410 -0
- package/claude/skills/react-best-practices/README.md +123 -0
- package/claude/skills/react-best-practices/SKILL.md +125 -0
- package/claude/skills/react-best-practices/metadata.json +15 -0
- package/claude/skills/react-best-practices/rules/_sections.md +46 -0
- package/claude/skills/react-best-practices/rules/_template.md +28 -0
- package/claude/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/claude/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
- package/claude/skills/react-best-practices/rules/async-api-routes.md +38 -0
- package/claude/skills/react-best-practices/rules/async-defer-await.md +80 -0
- package/claude/skills/react-best-practices/rules/async-dependencies.md +36 -0
- package/claude/skills/react-best-practices/rules/async-parallel.md +28 -0
- package/claude/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/claude/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/claude/skills/react-best-practices/rules/bundle-conditional.md +31 -0
- package/claude/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/claude/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/claude/skills/react-best-practices/rules/bundle-preload.md +50 -0
- package/claude/skills/react-best-practices/rules/client-event-listeners.md +74 -0
- package/claude/skills/react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/claude/skills/react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/claude/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
- package/claude/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
- package/claude/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
- package/claude/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
- package/claude/skills/react-best-practices/rules/js-cache-storage.md +70 -0
- package/claude/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
- package/claude/skills/react-best-practices/rules/js-early-exit.md +50 -0
- package/claude/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/claude/skills/react-best-practices/rules/js-index-maps.md +37 -0
- package/claude/skills/react-best-practices/rules/js-length-check-first.md +49 -0
- package/claude/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
- package/claude/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/claude/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/claude/skills/react-best-practices/rules/rendering-activity.md +26 -0
- package/claude/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/claude/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/claude/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/claude/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/claude/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/claude/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/claude/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/claude/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
- package/claude/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
- package/claude/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/claude/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/claude/skills/react-best-practices/rules/rerender-memo.md +44 -0
- package/claude/skills/react-best-practices/rules/rerender-transitions.md +40 -0
- package/claude/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/claude/skills/react-best-practices/rules/server-cache-lru.md +41 -0
- package/claude/skills/react-best-practices/rules/server-cache-react.md +76 -0
- package/claude/skills/react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/claude/skills/react-best-practices/rules/server-serialization.md +38 -0
- package/claude/skills/react-patterns/SKILL.md +688 -0
- package/claude/skills/registry-system/SKILL.md +331 -0
- package/claude/skills/scheduled-actions/SKILL.md +671 -0
- package/claude/skills/scope-enforcement/SKILL.md +542 -0
- package/claude/skills/scope-enforcement/scripts/validate-scope.py +357 -0
- package/claude/skills/server-actions/SKILL.md +493 -0
- package/claude/skills/service-layer/SKILL.md +587 -0
- package/claude/skills/session-management/SKILL.md +266 -0
- package/claude/skills/session-management/scripts/create-session.py +166 -0
- package/claude/skills/session-management/scripts/iteration-close.sh +105 -0
- package/claude/skills/session-management/scripts/iteration-init.sh +180 -0
- package/claude/skills/session-management/scripts/session-archive.sh +87 -0
- package/claude/skills/session-management/scripts/session-close.sh +133 -0
- package/claude/skills/session-management/scripts/session-init.sh +225 -0
- package/claude/skills/session-management/scripts/session-list.sh +163 -0
- package/claude/skills/session-management/scripts/split-plan.sh +116 -0
- package/claude/skills/shadcn-components/SKILL.md +586 -0
- package/claude/skills/shadcn-theming/SKILL.md +446 -0
- package/claude/skills/suspense-loading/SKILL.md +280 -0
- package/claude/skills/tailwind-theming/SKILL.md +507 -0
- package/claude/skills/tanstack-query/SKILL.md +608 -0
- package/claude/skills/test-coverage/SKILL.md +239 -0
- package/claude/skills/web-design-guidelines/SKILL.md +39 -0
- package/claude/skills/zod-validation/SKILL.md +537 -0
- package/claude/templates/blocks/progress.md +86 -0
- package/claude/templates/iteration/changes.md +61 -0
- package/claude/templates/iteration/progress.md +55 -0
- package/claude/templates/log.md +31 -0
- package/claude/templates/story/context.md +77 -0
- package/claude/templates/story/pendings.md +37 -0
- package/claude/templates/story/plan.md +299 -0
- package/claude/templates/story/requirements.md +109 -0
- package/claude/templates/story/scope.json +10 -0
- package/claude/templates/story/tests.md +91 -0
- package/claude/templates/task/progress.md +58 -0
- package/claude/templates/task/requirements.md +54 -0
- package/claude/workflows/README.md +154 -0
- package/claude/workflows/blocks.md +614 -0
- package/claude/workflows/story.md +1207 -0
- package/claude/workflows/task.md +927 -0
- package/claude/workflows/tweak.md +527 -0
- package/cursor/.gitkeep +0 -0
- package/package.json +35 -0
- package/scripts/postinstall.mjs +198 -0
- package/scripts/setup.mjs +282 -0
- package/scripts/sync.mjs +209 -0
|
@@ -0,0 +1,632 @@
|
|
|
1
|
+
# /how-to:define-features-flows
|
|
2
|
+
|
|
3
|
+
Interactive guide to understand and define Features & Flows for your NextSpark application.
|
|
4
|
+
|
|
5
|
+
**Aliases:** `/how-to:features`, `/how-to:flows`
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Required Skills
|
|
10
|
+
|
|
11
|
+
Before executing, these skills provide deeper context:
|
|
12
|
+
- `.claude/skills/test-coverage/SKILL.md` - FEATURE_REGISTRY, FLOW_REGISTRY, TAGS_REGISTRY
|
|
13
|
+
- `.claude/skills/cypress-e2e/SKILL.md` - Test structure and tag usage
|
|
14
|
+
- `.claude/skills/documentation/SKILL.md` - About files and feature documentation
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Syntax
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
/how-to:define-features-flows
|
|
22
|
+
/how-to:define-features-flows --analyze
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Behavior
|
|
28
|
+
|
|
29
|
+
Guides the user through understanding the conceptual framework of Features & Flows, and helps them define their own based on their product strategy.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Tutorial Structure
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
STEPS OVERVIEW (5 steps)
|
|
37
|
+
|
|
38
|
+
Step 1: Understanding Features & Flows
|
|
39
|
+
└── Conceptual framework, not technical
|
|
40
|
+
|
|
41
|
+
Step 2: Feature Strategy
|
|
42
|
+
└── Entity-based + product-based features
|
|
43
|
+
|
|
44
|
+
Step 3: Flow Strategy
|
|
45
|
+
└── User journeys and critical paths
|
|
46
|
+
|
|
47
|
+
Step 4: Document Your Features
|
|
48
|
+
└── features.json and about files
|
|
49
|
+
|
|
50
|
+
Step 5: Connect with Testing
|
|
51
|
+
└── Tags, coverage, and validation
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Step 1: Understanding Features & Flows
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
60
|
+
📚 HOW TO: DEFINE FEATURES & FLOWS
|
|
61
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
62
|
+
|
|
63
|
+
STEP 1 OF 5: Understanding Features & Flows
|
|
64
|
+
|
|
65
|
+
⚠️ IMPORTANT: Features & Flows is a CONCEPTUAL
|
|
66
|
+
framework, NOT a technical system.
|
|
67
|
+
|
|
68
|
+
This means:
|
|
69
|
+
• There's no "features table" in the database
|
|
70
|
+
• No code enforces what is or isn't a feature
|
|
71
|
+
• YOU define what makes sense for YOUR product
|
|
72
|
+
• The framework helps organize testing & docs
|
|
73
|
+
|
|
74
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**📋 What is a Feature?**
|
|
78
|
+
|
|
79
|
+
A feature is a distinct capability or functionality in your application that provides value to users.
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
┌─────────────────────────────────────────────┐
|
|
83
|
+
│ FEATURE = A distinct capability │
|
|
84
|
+
│ ───────────────────────────────────────── │
|
|
85
|
+
│ • Has a clear purpose │
|
|
86
|
+
│ • Can be tested independently │
|
|
87
|
+
│ • Provides user value │
|
|
88
|
+
│ • May have sub-components │
|
|
89
|
+
└─────────────────────────────────────────────┘
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**📋 What is a Flow?**
|
|
93
|
+
|
|
94
|
+
A flow is a user journey that typically crosses multiple features to accomplish a goal.
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
┌─────────────────────────────────────────────┐
|
|
98
|
+
│ FLOW = A user journey across features │
|
|
99
|
+
│ ───────────────────────────────────────── │
|
|
100
|
+
│ • Multiple steps involved │
|
|
101
|
+
│ • Spans several features │
|
|
102
|
+
│ • Has a clear start and end │
|
|
103
|
+
│ • Represents real user behavior │
|
|
104
|
+
└─────────────────────────────────────────────┘
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**📋 Example Comparison:**
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
FEATURE: Authentication
|
|
111
|
+
├── Login capability
|
|
112
|
+
├── Registration capability
|
|
113
|
+
├── Password reset
|
|
114
|
+
└── OAuth integration
|
|
115
|
+
|
|
116
|
+
FLOW: User Onboarding
|
|
117
|
+
├── Step 1: Register (uses Authentication)
|
|
118
|
+
├── Step 2: Verify email (uses Authentication)
|
|
119
|
+
├── Step 3: Create team (uses Teams)
|
|
120
|
+
├── Step 4: Invite members (uses Teams)
|
|
121
|
+
└── Step 5: Create first task (uses Tasks entity)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
126
|
+
|
|
127
|
+
What would you like to do?
|
|
128
|
+
|
|
129
|
+
[1] Continue to Step 2 (Feature Strategy)
|
|
130
|
+
[2] I have a question about the concept
|
|
131
|
+
[3] Show me real-world examples
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Step 2: Feature Strategy
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
140
|
+
STEP 2 OF 5: Feature Strategy
|
|
141
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
142
|
+
|
|
143
|
+
How to identify features in YOUR application:
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**📋 Rule #1: Every Entity is a Feature**
|
|
147
|
+
|
|
148
|
+
This is your starting point. If you have an entity, it's automatically a feature.
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
// Entity "tasks" → Feature "tasks"
|
|
152
|
+
// Entity "customers" → Feature "customers"
|
|
153
|
+
// Entity "invoices" → Feature "invoices"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**📋 Rule #2: Core System Capabilities are Features**
|
|
157
|
+
|
|
158
|
+
Beyond entities, identify system-wide capabilities:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
CORE FEATURES (typically present in all apps):
|
|
162
|
+
|
|
163
|
+
├── authentication # Login, signup, OAuth
|
|
164
|
+
├── teams-management # Team creation, switching, roles
|
|
165
|
+
├── permissions # RBAC, access control
|
|
166
|
+
├── billing # Plans, subscriptions, payments
|
|
167
|
+
├── notifications # Email, in-app notifications
|
|
168
|
+
├── settings # User/team preferences
|
|
169
|
+
└── superadmin # Admin panel capabilities
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**📋 Rule #3: Product-Specific Features**
|
|
173
|
+
|
|
174
|
+
Based on YOUR product, add domain-specific features:
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
EXAMPLE: Project Management App
|
|
178
|
+
|
|
179
|
+
├── projects # Entity-based feature
|
|
180
|
+
├── tasks # Entity-based feature
|
|
181
|
+
├── time-tracking # Product feature
|
|
182
|
+
├── reporting # Product feature
|
|
183
|
+
├── team-collaboration # Product feature
|
|
184
|
+
└── integrations # Product feature (Slack, etc.)
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
EXAMPLE: E-commerce App
|
|
189
|
+
|
|
190
|
+
├── products # Entity-based feature
|
|
191
|
+
├── orders # Entity-based feature
|
|
192
|
+
├── cart # Product feature
|
|
193
|
+
├── checkout # Product feature
|
|
194
|
+
├── inventory # Product feature
|
|
195
|
+
└── shipping # Product feature
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**📋 Feature Categories:**
|
|
199
|
+
|
|
200
|
+
Organize features into categories for clarity:
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
203
|
+
type FeatureCategory =
|
|
204
|
+
| 'core' // Authentication, teams, permissions
|
|
205
|
+
| 'entities' // Your CRUD entities
|
|
206
|
+
| 'content' // Page builder, blog, CMS
|
|
207
|
+
| 'settings' // Configuration screens
|
|
208
|
+
| 'admin' // Superadmin capabilities
|
|
209
|
+
| 'public' // Public-facing pages
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
214
|
+
|
|
215
|
+
What would you like to do?
|
|
216
|
+
|
|
217
|
+
[1] Continue to Step 3 (Flow Strategy)
|
|
218
|
+
[2] Help me identify features for my app
|
|
219
|
+
[3] What if I'm not sure something is a feature?
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Step 3: Flow Strategy
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
228
|
+
STEP 3 OF 5: Flow Strategy
|
|
229
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
230
|
+
|
|
231
|
+
Flows represent real user journeys through your app.
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**📋 Identifying Critical Flows:**
|
|
235
|
+
|
|
236
|
+
Ask yourself: "What are the most important things users do?"
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
CRITICAL FLOWS (highest priority):
|
|
240
|
+
|
|
241
|
+
1. User Onboarding
|
|
242
|
+
└── Registration → Verification → First use
|
|
243
|
+
|
|
244
|
+
2. Core Value Flow
|
|
245
|
+
└── The main thing your app does
|
|
246
|
+
└── For task app: Create task → Assign → Complete
|
|
247
|
+
|
|
248
|
+
3. Payment Flow
|
|
249
|
+
└── If you have billing: Select plan → Checkout → Access
|
|
250
|
+
|
|
251
|
+
4. Team Collaboration
|
|
252
|
+
└── Invite → Accept → Collaborate
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**📋 Flow Categories:**
|
|
256
|
+
|
|
257
|
+
```typescript
|
|
258
|
+
type FlowCategory =
|
|
259
|
+
| 'acquisition' // Getting new users
|
|
260
|
+
| 'activation' // First value moment
|
|
261
|
+
| 'engagement' // Daily usage patterns
|
|
262
|
+
| 'retention' // Keeping users active
|
|
263
|
+
| 'revenue' // Payment and billing
|
|
264
|
+
| 'admin' // Administrative tasks
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**📋 Flow Structure:**
|
|
268
|
+
|
|
269
|
+
Each flow should define:
|
|
270
|
+
|
|
271
|
+
```json
|
|
272
|
+
{
|
|
273
|
+
"id": "user-onboarding",
|
|
274
|
+
"name": "User Onboarding",
|
|
275
|
+
"description": "New user registration to first task",
|
|
276
|
+
"category": "acquisition",
|
|
277
|
+
"criticalPath": true,
|
|
278
|
+
"steps": [
|
|
279
|
+
"Register with email or Google",
|
|
280
|
+
"Verify email address",
|
|
281
|
+
"Create or join team",
|
|
282
|
+
"Explore dashboard",
|
|
283
|
+
"Create first task"
|
|
284
|
+
],
|
|
285
|
+
"features": [
|
|
286
|
+
"authentication",
|
|
287
|
+
"teams-management",
|
|
288
|
+
"tasks"
|
|
289
|
+
],
|
|
290
|
+
"testTags": ["@flow-onboarding", "@smoke"]
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**📋 Flow vs Feature Decision:**
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
┌─────────────────────────────────────────────┐
|
|
298
|
+
│ Is it a FEATURE or a FLOW? │
|
|
299
|
+
│ ───────────────────────────────────────── │
|
|
300
|
+
│ │
|
|
301
|
+
│ FEATURE if: │
|
|
302
|
+
│ • It's a standalone capability │
|
|
303
|
+
│ • Can be tested in isolation │
|
|
304
|
+
│ • Doesn't require other features │
|
|
305
|
+
│ │
|
|
306
|
+
│ FLOW if: │
|
|
307
|
+
│ • Spans multiple features │
|
|
308
|
+
│ • Represents a user journey │
|
|
309
|
+
│ • Has sequential steps │
|
|
310
|
+
│ • Tests integration between features │
|
|
311
|
+
└─────────────────────────────────────────────┘
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
316
|
+
|
|
317
|
+
What would you like to do?
|
|
318
|
+
|
|
319
|
+
[1] Continue to Step 4 (Document Your Features)
|
|
320
|
+
[2] Help me identify flows for my app
|
|
321
|
+
[3] What's a "critical path" flow?
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## Step 4: Document Your Features
|
|
327
|
+
|
|
328
|
+
```
|
|
329
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
330
|
+
STEP 4 OF 5: Document Your Features
|
|
331
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
332
|
+
|
|
333
|
+
Document features in your theme's about/ folder.
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**📋 File Structure:**
|
|
337
|
+
|
|
338
|
+
```
|
|
339
|
+
contents/themes/{your-theme}/about/
|
|
340
|
+
├── features.json # Feature & flow definitions
|
|
341
|
+
├── business.md # Business context
|
|
342
|
+
└── team.md # Team information
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
**📋 features.json Template:**
|
|
346
|
+
|
|
347
|
+
```json
|
|
348
|
+
{
|
|
349
|
+
"version": "1.0.0",
|
|
350
|
+
"lastUpdated": "2024-12-18",
|
|
351
|
+
|
|
352
|
+
"features": {
|
|
353
|
+
"authentication": {
|
|
354
|
+
"id": "authentication",
|
|
355
|
+
"name": "Authentication",
|
|
356
|
+
"description": "User identity and access management",
|
|
357
|
+
"category": "core",
|
|
358
|
+
"status": "stable",
|
|
359
|
+
"testTags": ["@feat-auth"],
|
|
360
|
+
"components": {
|
|
361
|
+
"email": {
|
|
362
|
+
"name": "Email Authentication",
|
|
363
|
+
"testTags": ["@feat-auth", "@crud"]
|
|
364
|
+
},
|
|
365
|
+
"oauth-google": {
|
|
366
|
+
"name": "Google OAuth",
|
|
367
|
+
"testTags": ["@feat-auth"]
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
|
|
372
|
+
"tasks": {
|
|
373
|
+
"id": "tasks",
|
|
374
|
+
"name": "Task Management",
|
|
375
|
+
"description": "Create and manage tasks",
|
|
376
|
+
"category": "entities",
|
|
377
|
+
"status": "stable",
|
|
378
|
+
"testTags": ["@feat-tasks", "@crud"]
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
|
|
382
|
+
"flows": {
|
|
383
|
+
"onboarding": {
|
|
384
|
+
"id": "user-onboarding",
|
|
385
|
+
"name": "User Onboarding",
|
|
386
|
+
"description": "New user to first task",
|
|
387
|
+
"category": "acquisition",
|
|
388
|
+
"criticalPath": true,
|
|
389
|
+
"testTags": ["@flow-onboarding", "@smoke"],
|
|
390
|
+
"steps": [
|
|
391
|
+
"Register with email",
|
|
392
|
+
"Verify email",
|
|
393
|
+
"Create team",
|
|
394
|
+
"Create first task"
|
|
395
|
+
],
|
|
396
|
+
"features": ["authentication", "teams-management", "tasks"]
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
|
|
400
|
+
"statusDefinitions": {
|
|
401
|
+
"stable": "Production-ready, fully tested",
|
|
402
|
+
"beta": "Feature complete, in testing",
|
|
403
|
+
"in-development": "Currently being implemented",
|
|
404
|
+
"planned": "Scheduled for future development"
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
**📋 Status Tracking:**
|
|
410
|
+
|
|
411
|
+
Use status to track feature maturity:
|
|
412
|
+
|
|
413
|
+
```
|
|
414
|
+
stable → Production-ready
|
|
415
|
+
beta → Feature complete, testing
|
|
416
|
+
in-development → Being built now
|
|
417
|
+
planned → Future roadmap
|
|
418
|
+
deprecated → Being phased out
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
```
|
|
422
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
423
|
+
|
|
424
|
+
💡 TIP: If you have your business.md and team.md
|
|
425
|
+
defined, Claude can help you generate a
|
|
426
|
+
features.json based on your product context!
|
|
427
|
+
|
|
428
|
+
Just ask: "Help me define features for my app"
|
|
429
|
+
|
|
430
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
431
|
+
|
|
432
|
+
What would you like to do?
|
|
433
|
+
|
|
434
|
+
[1] Continue to Step 5 (Connect with Testing)
|
|
435
|
+
[2] Help me create my features.json
|
|
436
|
+
[3] Show me a complete example
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
## Step 5: Connect with Testing
|
|
442
|
+
|
|
443
|
+
```
|
|
444
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
445
|
+
STEP 5 OF 5: Connect with Testing
|
|
446
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
447
|
+
|
|
448
|
+
Features & Flows connect to testing via TAGS.
|
|
449
|
+
This is where the concept becomes practical.
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
**📋 The Connection:**
|
|
453
|
+
|
|
454
|
+
```
|
|
455
|
+
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
|
|
456
|
+
│ features. │────▶│ Cypress │────▶│ FEATURE_ │
|
|
457
|
+
│ json │ │ Tests │ │ REGISTRY │
|
|
458
|
+
│ (definition)│ │ (tags) │ │ (coverage) │
|
|
459
|
+
└──────────────┘ └──────────────┘ └──────────────┘
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
**📋 Tag Prefixes:**
|
|
463
|
+
|
|
464
|
+
```
|
|
465
|
+
@feat-{name} → Feature tag (e.g., @feat-auth)
|
|
466
|
+
@flow-{name} → Flow tag (e.g., @flow-onboarding)
|
|
467
|
+
@smoke → Quick sanity tests
|
|
468
|
+
@regression → Broader test suite
|
|
469
|
+
@crud → CRUD operation tests
|
|
470
|
+
@area-{name} → Area-specific (e.g., @area-devtools)
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
**📋 Using Tags in Cypress:**
|
|
474
|
+
|
|
475
|
+
```typescript
|
|
476
|
+
// Test file: login.cy.ts
|
|
477
|
+
describe('@uat @smoke @feat-auth Login', () => {
|
|
478
|
+
it('should login with valid credentials', () => {
|
|
479
|
+
// Test code
|
|
480
|
+
})
|
|
481
|
+
})
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
**📋 Registry Generation:**
|
|
485
|
+
|
|
486
|
+
When you run `pnpm build:registries`, the system:
|
|
487
|
+
|
|
488
|
+
1. Scans all Cypress test files
|
|
489
|
+
2. Extracts tags from describe blocks
|
|
490
|
+
3. Generates FEATURE_REGISTRY with coverage data
|
|
491
|
+
4. Validates against features.json
|
|
492
|
+
|
|
493
|
+
**📋 Coverage Metrics:**
|
|
494
|
+
|
|
495
|
+
```typescript
|
|
496
|
+
// Auto-generated COVERAGE_SUMMARY
|
|
497
|
+
{
|
|
498
|
+
features: {
|
|
499
|
+
total: 15, // From features.json
|
|
500
|
+
withTests: 12, // Features with @feat-* tests
|
|
501
|
+
withoutTests: 3 // Gap to fill
|
|
502
|
+
},
|
|
503
|
+
flows: {
|
|
504
|
+
total: 5,
|
|
505
|
+
withTests: 3,
|
|
506
|
+
withoutTests: 2
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
```
|
|
512
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
513
|
+
|
|
514
|
+
✅ TUTORIAL STORY!
|
|
515
|
+
|
|
516
|
+
You've learned:
|
|
517
|
+
• Features & Flows as a conceptual framework
|
|
518
|
+
• How to identify features (entities + capabilities)
|
|
519
|
+
• How to define flows (user journeys)
|
|
520
|
+
• How to document in features.json
|
|
521
|
+
• How tags connect to test coverage
|
|
522
|
+
|
|
523
|
+
📚 NEXT STEP (important!):
|
|
524
|
+
/how-to:manage-test-coverage
|
|
525
|
+
└── Learn how to create tests with proper
|
|
526
|
+
tags and maintain coverage
|
|
527
|
+
|
|
528
|
+
📚 Related tutorials:
|
|
529
|
+
• /how-to:run-tests - Execute your test suite
|
|
530
|
+
• /how-to:create-entity - Create new entities
|
|
531
|
+
|
|
532
|
+
🔙 Back to menu: /how-to:start
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
---
|
|
536
|
+
|
|
537
|
+
## Interactive Options
|
|
538
|
+
|
|
539
|
+
### "Help me identify features for my app"
|
|
540
|
+
|
|
541
|
+
When user asks for help, Claude should:
|
|
542
|
+
|
|
543
|
+
1. **Check for about files:**
|
|
544
|
+
|
|
545
|
+
```typescript
|
|
546
|
+
// Look for:
|
|
547
|
+
// - contents/themes/{theme}/about/business.md
|
|
548
|
+
// - contents/themes/{theme}/about/features.json (existing)
|
|
549
|
+
// - Entity configs in contents/themes/{theme}/config/entities/
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
2. **Ask clarifying questions:**
|
|
553
|
+
|
|
554
|
+
```
|
|
555
|
+
To help you define features, I need to understand your app:
|
|
556
|
+
|
|
557
|
+
1. What's your app's main purpose?
|
|
558
|
+
(e.g., project management, e-commerce, CRM)
|
|
559
|
+
|
|
560
|
+
2. What entities have you created or plan to create?
|
|
561
|
+
(Each entity typically becomes a feature)
|
|
562
|
+
|
|
563
|
+
3. Who are your target users?
|
|
564
|
+
(Different users may need different features)
|
|
565
|
+
|
|
566
|
+
4. What are the 3 most important things users do?
|
|
567
|
+
(These become your critical flows)
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
3. **Generate suggestions based on context**
|
|
571
|
+
|
|
572
|
+
---
|
|
573
|
+
|
|
574
|
+
## Common Questions
|
|
575
|
+
|
|
576
|
+
### "What if I'm not sure something is a feature?"
|
|
577
|
+
|
|
578
|
+
```
|
|
579
|
+
📋 Decision Guide:
|
|
580
|
+
|
|
581
|
+
Ask yourself these questions:
|
|
582
|
+
|
|
583
|
+
1. Can a user interact with it directly?
|
|
584
|
+
YES → Likely a feature
|
|
585
|
+
|
|
586
|
+
2. Would you write tests specifically for it?
|
|
587
|
+
YES → Likely a feature
|
|
588
|
+
|
|
589
|
+
3. Does it have its own UI section?
|
|
590
|
+
YES → Likely a feature
|
|
591
|
+
|
|
592
|
+
4. Is it just a utility/helper for other features?
|
|
593
|
+
YES → NOT a feature (it's implementation detail)
|
|
594
|
+
|
|
595
|
+
When in doubt, start broad and refine later.
|
|
596
|
+
Features aren't set in stone - you can split
|
|
597
|
+
or merge them as your understanding grows.
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
### "What's a critical path flow?"
|
|
601
|
+
|
|
602
|
+
```
|
|
603
|
+
📋 Critical Path Flows:
|
|
604
|
+
|
|
605
|
+
A critical path flow is a user journey that:
|
|
606
|
+
|
|
607
|
+
• MUST work for the business to survive
|
|
608
|
+
• Directly impacts revenue or core value
|
|
609
|
+
• Affects the majority of users
|
|
610
|
+
|
|
611
|
+
Examples:
|
|
612
|
+
✅ User registration → Always critical
|
|
613
|
+
✅ Checkout flow → Critical for e-commerce
|
|
614
|
+
✅ Core feature usage → Critical for retention
|
|
615
|
+
❌ Settings change → Important but not critical
|
|
616
|
+
❌ Profile update → Nice to have
|
|
617
|
+
|
|
618
|
+
Critical flows get:
|
|
619
|
+
• @smoke tag (run on every deploy)
|
|
620
|
+
• Higher test priority
|
|
621
|
+
• Monitoring and alerts
|
|
622
|
+
```
|
|
623
|
+
|
|
624
|
+
---
|
|
625
|
+
|
|
626
|
+
## Related Commands
|
|
627
|
+
|
|
628
|
+
| Command | Description |
|
|
629
|
+
|---------|-------------|
|
|
630
|
+
| `/how-to:manage-test-coverage` | **NEXT STEP** - Create tests and maintain coverage |
|
|
631
|
+
| `/how-to:run-tests` | Execute Cypress test suites |
|
|
632
|
+
| `/how-to:create-entity` | Create entities (which become features) |
|