@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,242 @@
|
|
|
1
|
+
# /session:test:write
|
|
2
|
+
|
|
3
|
+
Write or update Cypress tests (API and UAT) for a feature.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Required Skills
|
|
8
|
+
|
|
9
|
+
**[MANDATORY]** Read these skills before executing:
|
|
10
|
+
- `.claude/skills/cypress-api/SKILL.md` - API testing patterns
|
|
11
|
+
- `.claude/skills/cypress-e2e/SKILL.md` - E2E/UAT testing patterns
|
|
12
|
+
- `.claude/skills/cypress-selectors/SKILL.md` - data-cy selector conventions
|
|
13
|
+
- `.claude/skills/pom-patterns/SKILL.md` - Page Object Model patterns
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Syntax
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/session:test:write [--type <api|uat|both>]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Behavior
|
|
26
|
+
|
|
27
|
+
Generates Cypress tests based on session requirements and existing patterns.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Flow
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
35
|
+
│ /session:test:write │
|
|
36
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
37
|
+
│ │
|
|
38
|
+
│ 1. Load session context │
|
|
39
|
+
│ - Read requirements.md (ACs) │
|
|
40
|
+
│ - Read plan.md (entities) │
|
|
41
|
+
│ ↓ │
|
|
42
|
+
│ 2. Check for existing POMs │
|
|
43
|
+
│ - Reuse if available │
|
|
44
|
+
│ - Create if needed │
|
|
45
|
+
│ ↓ │
|
|
46
|
+
│ 3. Generate API tests │
|
|
47
|
+
│ - CRUD operations │
|
|
48
|
+
│ - Auth scenarios │
|
|
49
|
+
│ - Error cases │
|
|
50
|
+
│ ↓ │
|
|
51
|
+
│ 4. Generate UAT tests │
|
|
52
|
+
│ - User flows from ACs │
|
|
53
|
+
│ - Visual verification │
|
|
54
|
+
│ ↓ │
|
|
55
|
+
│ 5. Validate selectors exist │
|
|
56
|
+
│ ↓ │
|
|
57
|
+
│ 6. Create test files │
|
|
58
|
+
│ │
|
|
59
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Example Output
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
🧪 WRITE TESTS
|
|
68
|
+
|
|
69
|
+
Session: stories/2026-01-11-new-products-entity
|
|
70
|
+
Type: both (API + UAT)
|
|
71
|
+
|
|
72
|
+
─────────────────────────────────────────
|
|
73
|
+
|
|
74
|
+
📋 ANALYZING REQUIREMENTS
|
|
75
|
+
|
|
76
|
+
ACs to cover:
|
|
77
|
+
├─ AC1: Admin can create a new product
|
|
78
|
+
├─ AC2: Admin can upload product images
|
|
79
|
+
├─ AC3: Admin can assign products to categories
|
|
80
|
+
├─ AC4: Products are listed with pagination
|
|
81
|
+
└─ AC5: Team members can view products
|
|
82
|
+
|
|
83
|
+
Entity: products
|
|
84
|
+
API Endpoints: 5 (CRUD + list)
|
|
85
|
+
|
|
86
|
+
─────────────────────────────────────────
|
|
87
|
+
|
|
88
|
+
🔍 CHECKING EXISTING POMs
|
|
89
|
+
|
|
90
|
+
├─ DashboardPOM: exists ✓
|
|
91
|
+
├─ EntityFormPOM: exists ✓
|
|
92
|
+
└─ ProductsPOM: not found
|
|
93
|
+
|
|
94
|
+
Creating ProductsPOM...
|
|
95
|
+
✓ Created: cypress/support/pom/ProductsPOM.ts
|
|
96
|
+
|
|
97
|
+
─────────────────────────────────────────
|
|
98
|
+
|
|
99
|
+
📝 GENERATING API TESTS
|
|
100
|
+
|
|
101
|
+
File: cypress/e2e/api/products.cy.ts
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
import { BaseAPIController } from '@/cypress/support/api/BaseAPIController';
|
|
105
|
+
|
|
106
|
+
describe('@api @products Products API', () => {
|
|
107
|
+
const api = new ProductsAPIController();
|
|
108
|
+
|
|
109
|
+
describe('@crud CRUD Operations', () => {
|
|
110
|
+
it('@create should create a product', () => {
|
|
111
|
+
api.create({
|
|
112
|
+
name: 'Test Product',
|
|
113
|
+
price: 99.99,
|
|
114
|
+
categoryId: fixtures.categoryId
|
|
115
|
+
}).then((response) => {
|
|
116
|
+
expect(response.status).to.eq(201);
|
|
117
|
+
expect(response.body.name).to.eq('Test Product');
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
it('@read should get product by ID', () => {
|
|
122
|
+
api.getById(fixtures.productId).then((response) => {
|
|
123
|
+
expect(response.status).to.eq(200);
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
it('@update should update product', () => {
|
|
128
|
+
api.update(fixtures.productId, { name: 'Updated' })
|
|
129
|
+
.then((response) => {
|
|
130
|
+
expect(response.status).to.eq(200);
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
it('@delete should delete product', () => {
|
|
135
|
+
api.delete(fixtures.productId).then((response) => {
|
|
136
|
+
expect(response.status).to.eq(200);
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
describe('@auth Authentication', () => {
|
|
142
|
+
it('@apikey should work with API key', () => {
|
|
143
|
+
// API key authentication test
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
it('@session should work with session', () => {
|
|
147
|
+
// Session authentication test
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
it('@unauthorized should reject unauthenticated', () => {
|
|
151
|
+
api.unauthorized().create({}).then((response) => {
|
|
152
|
+
expect(response.status).to.eq(401);
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
─────────────────────────────────────────
|
|
160
|
+
|
|
161
|
+
📝 GENERATING UAT TESTS
|
|
162
|
+
|
|
163
|
+
File: cypress/e2e/uat/products.cy.ts
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
import { ProductsPOM } from '@/cypress/support/pom/ProductsPOM';
|
|
167
|
+
|
|
168
|
+
describe('@uat @products Products Management', () => {
|
|
169
|
+
const pom = new ProductsPOM();
|
|
170
|
+
|
|
171
|
+
beforeEach(() => {
|
|
172
|
+
cy.login('admin@test.com');
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
describe('@ac1 Create Product', () => {
|
|
176
|
+
it('should create a new product', () => {
|
|
177
|
+
pom.navigateToList();
|
|
178
|
+
pom.clickNewProduct();
|
|
179
|
+
pom.fillForm({
|
|
180
|
+
name: 'New Product',
|
|
181
|
+
price: '49.99',
|
|
182
|
+
description: 'Test description'
|
|
183
|
+
});
|
|
184
|
+
pom.submitForm();
|
|
185
|
+
pom.verifySuccessToast('Product created');
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
describe('@ac4 List Products', () => {
|
|
190
|
+
it('should display products with pagination', () => {
|
|
191
|
+
pom.navigateToList();
|
|
192
|
+
pom.verifyProductsDisplayed();
|
|
193
|
+
pom.verifyPaginationControls();
|
|
194
|
+
pom.goToNextPage();
|
|
195
|
+
pom.verifyPageChanged();
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
─────────────────────────────────────────
|
|
202
|
+
|
|
203
|
+
✅ SELECTOR VALIDATION
|
|
204
|
+
|
|
205
|
+
- [x] data-cy="products-list" exists
|
|
206
|
+
- [x] data-cy="new-product-btn" exists
|
|
207
|
+
- [x] data-cy="product-form" exists
|
|
208
|
+
- [x] data-cy="submit-btn" exists
|
|
209
|
+
|
|
210
|
+
─────────────────────────────────────────
|
|
211
|
+
|
|
212
|
+
📊 SUMMARY
|
|
213
|
+
|
|
214
|
+
Files created:
|
|
215
|
+
├─ cypress/e2e/api/products.cy.ts (12 tests)
|
|
216
|
+
├─ cypress/e2e/uat/products.cy.ts (8 tests)
|
|
217
|
+
└─ cypress/support/pom/ProductsPOM.ts
|
|
218
|
+
|
|
219
|
+
Total tests: 20
|
|
220
|
+
ACs covered: 5/5
|
|
221
|
+
|
|
222
|
+
Next: /session:test:run to execute tests
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Options
|
|
228
|
+
|
|
229
|
+
| Option | Description |
|
|
230
|
+
|--------|-------------|
|
|
231
|
+
| `--type <type>` | api, uat, or both (default: both) |
|
|
232
|
+
| `--ac <number>` | Generate for specific AC |
|
|
233
|
+
| `--from-pom` | Use existing POM without changes |
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## Related Commands
|
|
238
|
+
|
|
239
|
+
| Command | Action |
|
|
240
|
+
|---------|--------|
|
|
241
|
+
| `/session:test:run` | Run the tests |
|
|
242
|
+
| `/session:test:fix` | Fix failing tests |
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# /session:validate
|
|
2
|
+
|
|
3
|
+
Validate the current session state and implementation.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Syntax
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
/session:validate [--full]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Behavior
|
|
16
|
+
|
|
17
|
+
Runs validation checks on the current session implementation.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Flow
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
25
|
+
│ /session:validate │
|
|
26
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
27
|
+
│ │
|
|
28
|
+
│ 1. Load session context │
|
|
29
|
+
│ - Read scope.json │
|
|
30
|
+
│ - Read progress.md │
|
|
31
|
+
│ ↓ │
|
|
32
|
+
│ 2. Run validation checks │
|
|
33
|
+
│ - TypeScript compilation │
|
|
34
|
+
│ - Lint rules │
|
|
35
|
+
│ - Build process │
|
|
36
|
+
│ ↓ │
|
|
37
|
+
│ 3. Run tests (if --full) │
|
|
38
|
+
│ - Unit tests │
|
|
39
|
+
│ - API tests │
|
|
40
|
+
│ - UAT tests │
|
|
41
|
+
│ ↓ │
|
|
42
|
+
│ 4. Check ACs completion │
|
|
43
|
+
│ - Compare with requirements.md │
|
|
44
|
+
│ ↓ │
|
|
45
|
+
│ 5. Generate validation report │
|
|
46
|
+
│ │
|
|
47
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Example Output
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
✅ SESSION VALIDATION
|
|
56
|
+
|
|
57
|
+
Session: stories/2026-01-11-new-products-entity
|
|
58
|
+
|
|
59
|
+
─────────────────────────────────────────
|
|
60
|
+
|
|
61
|
+
🔧 BUILD CHECKS
|
|
62
|
+
|
|
63
|
+
TypeScript: ✓ No errors
|
|
64
|
+
Lint: ✓ No warnings
|
|
65
|
+
Build: ✓ Successful
|
|
66
|
+
|
|
67
|
+
─────────────────────────────────────────
|
|
68
|
+
|
|
69
|
+
🧪 TEST RESULTS
|
|
70
|
+
|
|
71
|
+
Unit Tests: ✓ 12/12 passing
|
|
72
|
+
API Tests: ✓ 8/8 passing
|
|
73
|
+
UAT Tests: ✓ 5/5 passing
|
|
74
|
+
|
|
75
|
+
─────────────────────────────────────────
|
|
76
|
+
|
|
77
|
+
📋 AC VERIFICATION
|
|
78
|
+
|
|
79
|
+
AC1: Create product ✓ Implemented
|
|
80
|
+
AC2: Upload images ✓ Implemented
|
|
81
|
+
AC3: Assign categories ✓ Implemented
|
|
82
|
+
AC4: List with pagination ✓ Implemented
|
|
83
|
+
AC5: View-only for members ✓ Implemented
|
|
84
|
+
|
|
85
|
+
─────────────────────────────────────────
|
|
86
|
+
|
|
87
|
+
📊 SUMMARY
|
|
88
|
+
|
|
89
|
+
All checks passed: ✓
|
|
90
|
+
ACs completed: 5/5 (100%)
|
|
91
|
+
|
|
92
|
+
Ready for code review.
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## With Failures
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
❌ VALIDATION FAILED
|
|
101
|
+
|
|
102
|
+
─────────────────────────────────────────
|
|
103
|
+
|
|
104
|
+
🔧 BUILD CHECKS
|
|
105
|
+
|
|
106
|
+
TypeScript: ✓ No errors
|
|
107
|
+
Lint: ⚠ 2 warnings
|
|
108
|
+
Build: ✓ Successful
|
|
109
|
+
|
|
110
|
+
─────────────────────────────────────────
|
|
111
|
+
|
|
112
|
+
🧪 TEST RESULTS
|
|
113
|
+
|
|
114
|
+
Unit Tests: ✓ 12/12 passing
|
|
115
|
+
API Tests: ❌ 6/8 passing
|
|
116
|
+
- FAIL: POST /products (validation error)
|
|
117
|
+
- FAIL: PATCH /products (missing field)
|
|
118
|
+
UAT Tests: ⏸ Skipped (API failures)
|
|
119
|
+
|
|
120
|
+
─────────────────────────────────────────
|
|
121
|
+
|
|
122
|
+
📋 AC VERIFICATION
|
|
123
|
+
|
|
124
|
+
AC1: Create product ✓ Implemented
|
|
125
|
+
AC2: Upload images ⚠ Partial (max limit not enforced)
|
|
126
|
+
AC3: Assign categories ✓ Implemented
|
|
127
|
+
AC4: List with pagination ✓ Implemented
|
|
128
|
+
AC5: View-only for members ❌ Not implemented
|
|
129
|
+
|
|
130
|
+
─────────────────────────────────────────
|
|
131
|
+
|
|
132
|
+
📊 SUMMARY
|
|
133
|
+
|
|
134
|
+
Build: ✓ Pass
|
|
135
|
+
Tests: ❌ 2 failures
|
|
136
|
+
ACs: 3/5 complete
|
|
137
|
+
|
|
138
|
+
Options:
|
|
139
|
+
[1] Fix issues and re-validate
|
|
140
|
+
[2] View detailed errors
|
|
141
|
+
[3] Continue anyway (not recommended)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Options
|
|
147
|
+
|
|
148
|
+
| Option | Description |
|
|
149
|
+
|--------|-------------|
|
|
150
|
+
| `--full` | Run complete test suite |
|
|
151
|
+
| `--quick` | Only build checks, skip tests |
|
|
152
|
+
| `--ac-only` | Only check AC completion |
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Related Commands
|
|
157
|
+
|
|
158
|
+
| Command | Action |
|
|
159
|
+
|---------|--------|
|
|
160
|
+
| `/session:execute` | Continue implementation |
|
|
161
|
+
| `/session:review` | Request code review |
|
|
162
|
+
| `/session:close` | Close session |
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"context": "consumer",
|
|
3
|
+
"description": "NextSpark application development - Build your app using themes and plugins",
|
|
4
|
+
|
|
5
|
+
"capabilities": {
|
|
6
|
+
"modifyCore": false,
|
|
7
|
+
"allThemes": false,
|
|
8
|
+
"allPlugins": true,
|
|
9
|
+
"createReleases": false,
|
|
10
|
+
"maintainWorkflows": false
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
"allowedPaths": [
|
|
14
|
+
"contents/themes/${NEXT_PUBLIC_ACTIVE_THEME}/**/*",
|
|
15
|
+
"contents/plugins/**/*",
|
|
16
|
+
".claude/sessions/**/*"
|
|
17
|
+
],
|
|
18
|
+
|
|
19
|
+
"restrictions": {
|
|
20
|
+
"core": {
|
|
21
|
+
"level": "forbidden",
|
|
22
|
+
"message": "Core is installed via npm (node_modules/) and cannot be modified. To customize behavior, create a theme override or plugin instead."
|
|
23
|
+
},
|
|
24
|
+
"otherThemes": {
|
|
25
|
+
"level": "forbidden",
|
|
26
|
+
"message": "Only the active theme (NEXT_PUBLIC_ACTIVE_THEME) can be modified. To work on a different theme, update your .env file."
|
|
27
|
+
},
|
|
28
|
+
"app": {
|
|
29
|
+
"level": "discouraged",
|
|
30
|
+
"requiresExplicitConfirmation": true,
|
|
31
|
+
"message": "Modifying /app directly is discouraged as it reduces portability. Use theme page overrides when possible. Only proceed if user explicitly requests and understands the trade-offs."
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
"notes": {
|
|
36
|
+
"gettingStarted": "Your active theme is defined in .env (NEXT_PUBLIC_ACTIVE_THEME). All customizations should go there.",
|
|
37
|
+
"creatingPlugins": "Use /create:plugin to scaffold a new plugin in contents/plugins/.",
|
|
38
|
+
"needCoreChanges": "If you need functionality not available in core, create a plugin or request the feature in NextSpark repository."
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./github.schema.json",
|
|
3
|
+
|
|
4
|
+
"repository": {
|
|
5
|
+
"name": "",
|
|
6
|
+
"defaultBranch": "main"
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
"gitflow": {
|
|
10
|
+
"environments": ["develop", "qa", "main"],
|
|
11
|
+
"featureBranch": {
|
|
12
|
+
"baseBranch": "main",
|
|
13
|
+
"targetBranch": "develop"
|
|
14
|
+
},
|
|
15
|
+
"hotfixBranch": {
|
|
16
|
+
"baseBranch": "main",
|
|
17
|
+
"targetBranch": "main",
|
|
18
|
+
"skipEnvironments": true
|
|
19
|
+
},
|
|
20
|
+
"promotionFlow": {
|
|
21
|
+
"develop": "qa",
|
|
22
|
+
"qa": "main"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
"branches": {
|
|
27
|
+
"pattern": "{type}/{issue-key}-{description}-{initials}",
|
|
28
|
+
"types": {
|
|
29
|
+
"feature": {
|
|
30
|
+
"description": "New features or enhancements",
|
|
31
|
+
"base": "main",
|
|
32
|
+
"target": "develop"
|
|
33
|
+
},
|
|
34
|
+
"bugfix": {
|
|
35
|
+
"description": "Non-urgent bug fixes",
|
|
36
|
+
"base": "main",
|
|
37
|
+
"target": "develop"
|
|
38
|
+
},
|
|
39
|
+
"hotfix": {
|
|
40
|
+
"description": "Urgent production fixes",
|
|
41
|
+
"base": "main",
|
|
42
|
+
"target": "main"
|
|
43
|
+
},
|
|
44
|
+
"chore": {
|
|
45
|
+
"description": "Maintenance tasks, deps updates",
|
|
46
|
+
"base": "main",
|
|
47
|
+
"target": "develop"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
"commits": {
|
|
53
|
+
"pattern": "[{issue-key}] {description}",
|
|
54
|
+
"requireIssueKey": true,
|
|
55
|
+
"suggestedPrefixes": ["Add", "Fix", "Update", "Refactor", "Remove", "Improve", "Implement"]
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
"pullRequests": {
|
|
59
|
+
"titlePattern": "[{issue-key}] {description}",
|
|
60
|
+
"bodyTemplate": "## Description\n{description}\n\n## Changes\n- \n\n## Testing\n- [ ] \n\n## Screenshots\n\n\n## Related Issues\n- {issue-key}",
|
|
61
|
+
"squashMerge": true,
|
|
62
|
+
"deleteBranchOnMerge": true
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
"reviewers": {
|
|
66
|
+
"source": ".claude/config/team.json",
|
|
67
|
+
"askUserToSelect": true
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "GitHub Workflow Configuration",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Repository name in format: organization/repo-name"
|
|
12
|
+
},
|
|
13
|
+
"defaultBranch": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"default": "main"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": ["defaultBranch"]
|
|
19
|
+
},
|
|
20
|
+
"gitflow": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"environments": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": { "type": "string" },
|
|
26
|
+
"description": "Ordered list of environment branches from dev to prod",
|
|
27
|
+
"default": ["develop", "qa", "main"]
|
|
28
|
+
},
|
|
29
|
+
"featureBranch": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"properties": {
|
|
32
|
+
"baseBranch": { "type": "string", "default": "main" },
|
|
33
|
+
"targetBranch": { "type": "string", "default": "develop" }
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"hotfixBranch": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"baseBranch": { "type": "string", "default": "main" },
|
|
40
|
+
"targetBranch": { "type": "string", "default": "main" },
|
|
41
|
+
"skipEnvironments": { "type": "boolean", "default": true }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"promotionFlow": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": { "type": "string" },
|
|
47
|
+
"description": "Maps source branch to target branch for promotions"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"branches": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"pattern": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "Branch naming pattern with placeholders: {type}, {issue-key}, {description}, {initials}"
|
|
57
|
+
},
|
|
58
|
+
"types": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"description": { "type": "string" },
|
|
64
|
+
"base": { "type": "string" },
|
|
65
|
+
"target": { "type": "string" }
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"commits": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"properties": {
|
|
74
|
+
"pattern": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "Commit message pattern with placeholders: {issue-key}, {description}"
|
|
77
|
+
},
|
|
78
|
+
"requireIssueKey": { "type": "boolean", "default": true },
|
|
79
|
+
"suggestedPrefixes": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"items": { "type": "string" }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"pullRequests": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"properties": {
|
|
88
|
+
"titlePattern": { "type": "string" },
|
|
89
|
+
"bodyTemplate": { "type": "string" },
|
|
90
|
+
"squashMerge": { "type": "boolean", "default": true },
|
|
91
|
+
"deleteBranchOnMerge": { "type": "boolean", "default": true }
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"reviewers": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"properties": {
|
|
97
|
+
"source": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"default": ".claude/config/team.json",
|
|
100
|
+
"description": "Reference to team config file"
|
|
101
|
+
},
|
|
102
|
+
"askUserToSelect": { "type": "boolean", "default": true }
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./team.schema.json",
|
|
3
|
+
|
|
4
|
+
"members": [],
|
|
5
|
+
|
|
6
|
+
"roles": {
|
|
7
|
+
"lead": {
|
|
8
|
+
"description": "Team lead with full permissions",
|
|
9
|
+
"defaultPermissions": {
|
|
10
|
+
"canReview": true,
|
|
11
|
+
"canMerge": true,
|
|
12
|
+
"canApproveProduction": true
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"developer": {
|
|
16
|
+
"description": "Developer with standard permissions",
|
|
17
|
+
"defaultPermissions": {
|
|
18
|
+
"canReview": true,
|
|
19
|
+
"canMerge": true,
|
|
20
|
+
"canApproveProduction": false
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"junior": {
|
|
24
|
+
"description": "Junior developer requiring review",
|
|
25
|
+
"defaultPermissions": {
|
|
26
|
+
"canReview": false,
|
|
27
|
+
"canMerge": false,
|
|
28
|
+
"canApproveProduction": false
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"qa": {
|
|
32
|
+
"description": "QA engineer",
|
|
33
|
+
"defaultPermissions": {
|
|
34
|
+
"canReview": false,
|
|
35
|
+
"canMerge": false,
|
|
36
|
+
"canApproveProduction": false
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
"reviewRules": {
|
|
42
|
+
"minRequired": 1,
|
|
43
|
+
"requireQaForProduction": false,
|
|
44
|
+
"defaultReviewers": []
|
|
45
|
+
}
|
|
46
|
+
}
|