@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,604 @@
|
|
|
1
|
+
# /session:start
|
|
2
|
+
|
|
3
|
+
Intelligent entry point to start a new development session.
|
|
4
|
+
|
|
5
|
+
**Aliases:** `/start`
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Required Skills
|
|
10
|
+
|
|
11
|
+
Before executing, read these skills for context:
|
|
12
|
+
- `.claude/skills/core-theme-responsibilities/SKILL.md` - Understand core/theme/plugin boundaries
|
|
13
|
+
- `.claude/skills/entity-system/SKILL.md` - If the task involves entities
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Syntax
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/session:start [description]
|
|
21
|
+
/session:start:tweak [description]
|
|
22
|
+
/session:start:task [description]
|
|
23
|
+
/session:start:story [description]
|
|
24
|
+
/session:start:blocks [description]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Behavior
|
|
30
|
+
|
|
31
|
+
### Without subcommand (intelligent)
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
/session:start Add phone field to user profile
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Claude:
|
|
38
|
+
1. **[MANDATORY]** Analyzes the description
|
|
39
|
+
2. **[MANDATORY]** Reads `/about/` from active theme (if exists)
|
|
40
|
+
3. **[MANDATORY]** Evaluates technical and business risk
|
|
41
|
+
4. **[MANDATORY]** Determines T-Shirt size
|
|
42
|
+
5. **[MANDATORY]** Suggests appropriate workflow
|
|
43
|
+
6. **[MANDATORY]** Asks for user confirmation
|
|
44
|
+
7. **[MANDATORY]** Asks discovery questions (graduated by workflow)
|
|
45
|
+
8. **[MANDATORY]** Executes workflow with discovery context
|
|
46
|
+
|
|
47
|
+
### With subcommand (explicit)
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
/session:start:tweak Fix typo in login
|
|
51
|
+
/session:start:task Improve product search
|
|
52
|
+
/session:start:story New products entity
|
|
53
|
+
/session:start:blocks Hero block from Stitch mock
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Skips evaluation but still asks discovery questions for the selected workflow.
|
|
57
|
+
|
|
58
|
+
**Note:** BLOCKS workflow requires a mock and uses BLOCKS-specific questions (see `session-start-blocks.md`).
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Detailed Flow
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
66
|
+
│ /session:start │
|
|
67
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
68
|
+
│ │
|
|
69
|
+
│ PHASE 0: WORKTREE HEALTH CHECK (if worktrees.enabled) │
|
|
70
|
+
│ ────────────────────────────────────────────── │
|
|
71
|
+
│ 0. Scan for stale worktrees: │
|
|
72
|
+
│ $ git worktree list │
|
|
73
|
+
│ For each worktree (excluding main repo): │
|
|
74
|
+
│ $ gh pr list --head <branch> --state merged --json number │
|
|
75
|
+
│ IF PR merged AND worktree still exists: │
|
|
76
|
+
│ → Warn: "Worktree <path> has merged PR #N. Remove?" │
|
|
77
|
+
│ → If yes: git worktree remove <path> │
|
|
78
|
+
│ git branch -d <branch> │
|
|
79
|
+
│ Also run: git worktree prune (clean stale refs) │
|
|
80
|
+
│ ↓ │
|
|
81
|
+
│ PHASE A: EVALUATION │
|
|
82
|
+
│ ─────────────────── │
|
|
83
|
+
│ 1. Read user description │
|
|
84
|
+
│ ↓ │
|
|
85
|
+
│ 2. Read .claude/config/workspace.json │
|
|
86
|
+
│ - preferences.language │
|
|
87
|
+
│ - preferences.defaultWorkflow │
|
|
88
|
+
│ ↓ │
|
|
89
|
+
│ 3. Read /about from theme (if exists) │
|
|
90
|
+
│ - business.md │
|
|
91
|
+
│ - critical-flows.md │
|
|
92
|
+
│ - risk-areas.md │
|
|
93
|
+
│ ↓ │
|
|
94
|
+
│ 4. Evaluate Technical Risk │
|
|
95
|
+
│ - How many files? │
|
|
96
|
+
│ - How many layers (DB/API/UI)? │
|
|
97
|
+
│ - Existing tests? │
|
|
98
|
+
│ ↓ │
|
|
99
|
+
│ 5. Evaluate Business Risk │
|
|
100
|
+
│ - Touches critical flows? │
|
|
101
|
+
│ - Affects revenue? │
|
|
102
|
+
│ - Is it reversible? │
|
|
103
|
+
│ ↓ │
|
|
104
|
+
│ 6. Apply bidimensional matrix → T-Shirt Size │
|
|
105
|
+
│ ↓ │
|
|
106
|
+
│ 7. Determine workflow: │
|
|
107
|
+
│ - XS → TWEAK │
|
|
108
|
+
│ - S (low risk) → TWEAK │
|
|
109
|
+
│ - S-M → TASK │
|
|
110
|
+
│ - L-XL → STORY │
|
|
111
|
+
│ - Mock-driven block → BLOCKS │
|
|
112
|
+
│ ↓ │
|
|
113
|
+
│ 8. Show evaluation and ask for confirmation │
|
|
114
|
+
│ ↓ │
|
|
115
|
+
│ PHASE B: DISCOVERY (Claude asks questions) │
|
|
116
|
+
│ ────────────────────────────────────────── │
|
|
117
|
+
│ 9. Ask discovery questions based on workflow: │
|
|
118
|
+
│ │ │
|
|
119
|
+
│ ├── TWEAK: 3 core questions │
|
|
120
|
+
│ │ ├── Task Manager? │
|
|
121
|
+
│ │ ├── Testing? │
|
|
122
|
+
│ │ └── Documentation? │
|
|
123
|
+
│ │ │
|
|
124
|
+
│ ├── BLOCKS: 8 block-specific questions │
|
|
125
|
+
│ │ ├── Task Manager? │
|
|
126
|
+
│ │ ├── Worktree? (parallel development) │
|
|
127
|
+
│ │ ├── Block Type? (hero/features/cta/etc) │
|
|
128
|
+
│ │ ├── Block Decision? (new/variant/modify) │
|
|
129
|
+
│ │ ├── Mock Source? (Stitch/UXPilot/Figma/Other) │
|
|
130
|
+
│ │ ├── Specific Requirements? (optional) │
|
|
131
|
+
│ │ ├── Testing? │
|
|
132
|
+
│ │ └── Documentation? │
|
|
133
|
+
│ │ │
|
|
134
|
+
│ ├── TASK: All 8 questions + conditional mock questions │
|
|
135
|
+
│ │ ├── Task Manager? │
|
|
136
|
+
│ │ ├── Worktree? (parallel development) │
|
|
137
|
+
│ │ ├── Database Policy? │
|
|
138
|
+
│ │ ├── Entity Type? │
|
|
139
|
+
│ │ ├── Blocks? │
|
|
140
|
+
│ │ ├── Mock? + IF YES: 5a, 5b, 5c (see below) │
|
|
141
|
+
│ │ ├── Testing? │
|
|
142
|
+
│ │ └── Documentation? │
|
|
143
|
+
│ │ │
|
|
144
|
+
│ └── STORY: All 8 questions + conditional mock questions │
|
|
145
|
+
│ ↓ │
|
|
146
|
+
│ 10. Collect discovery context │
|
|
147
|
+
│ ↓ │
|
|
148
|
+
│ PHASE B.5: WORKTREE SETUP (if worktree selected) │
|
|
149
|
+
│ ────────────────────────────────────────────── │
|
|
150
|
+
│ 9.5 If worktree = yes: │
|
|
151
|
+
│ ├── Create branch: feature/<session-slug> │
|
|
152
|
+
│ ├── git worktree add <basePath>/repo-<slug> <branch> │
|
|
153
|
+
│ ├── Copy .env from main repo │
|
|
154
|
+
│ ├── Run pnpm install (if autoInstall = true) │
|
|
155
|
+
│ ├── Store worktree path in session metadata │
|
|
156
|
+
│ └── Show: "Worktree ready at <path>" │
|
|
157
|
+
│ ↓ │
|
|
158
|
+
│ PHASE C: MOCK UPLOAD PAUSE (if mock selected) │
|
|
159
|
+
│ ────────────────────────────────────────────── │
|
|
160
|
+
│ 10.5 If mock was selected: │
|
|
161
|
+
│ ├── Create session folder with mocks/ subfolder │
|
|
162
|
+
│ ├── Display upload instructions │
|
|
163
|
+
│ ├── Wait for user to confirm "ready" │
|
|
164
|
+
│ └── Validate mock files exist │
|
|
165
|
+
│ ↓ │
|
|
166
|
+
│ PHASE D: EXECUTION │
|
|
167
|
+
│ ────────────────────── │
|
|
168
|
+
│ 11. Execute workflow with context: │
|
|
169
|
+
│ │ │
|
|
170
|
+
│ ├── TWEAK: Implement directly │
|
|
171
|
+
│ │ │
|
|
172
|
+
│ ├── BLOCKS: mock-analyst → block-developer → visual-compare │
|
|
173
|
+
│ │ │
|
|
174
|
+
│ ├── TASK: [If mock] → Phase 0.6 mock-analyst │
|
|
175
|
+
│ │ → Create requirements.md → Execute │
|
|
176
|
+
│ │ │
|
|
177
|
+
│ └── STORY: [If mock] → Phase 0.6 mock-analyst │
|
|
178
|
+
│ → Launch PM with context → Arc → Execute │
|
|
179
|
+
│ ↓ │
|
|
180
|
+
│ 12. Show next steps │
|
|
181
|
+
│ │
|
|
182
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Example Output
|
|
188
|
+
|
|
189
|
+
### Phase A: Evaluation
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
📊 TASK EVALUATION
|
|
193
|
+
|
|
194
|
+
Description: "Add phone field to user profile"
|
|
195
|
+
|
|
196
|
+
┌─────────────────────────────────────────┐
|
|
197
|
+
│ Technical Risk: LOW │
|
|
198
|
+
│ - Estimated files: 4-6 │
|
|
199
|
+
│ - Layers: API + UI │
|
|
200
|
+
│ - Existing tests: Yes │
|
|
201
|
+
├─────────────────────────────────────────┤
|
|
202
|
+
│ Business Risk: LOW │
|
|
203
|
+
│ - Critical flows: No │
|
|
204
|
+
│ - Affects revenue: No │
|
|
205
|
+
└─────────────────────────────────────────┘
|
|
206
|
+
|
|
207
|
+
📐 T-Shirt Size: S
|
|
208
|
+
🔄 Recommended workflow: TASK
|
|
209
|
+
|
|
210
|
+
Proceed with TASK workflow? [Yes/No/Change]
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Phase B: Discovery Questions
|
|
214
|
+
|
|
215
|
+
After user confirms workflow, Claude asks discovery questions:
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
📋 DISCOVERY QUESTIONS
|
|
219
|
+
|
|
220
|
+
I need some context before we begin. Please answer:
|
|
221
|
+
|
|
222
|
+
─────────────────────────────────────────
|
|
223
|
+
|
|
224
|
+
1. TASK MANAGER
|
|
225
|
+
Is there an existing task in a project management system?
|
|
226
|
+
|
|
227
|
+
[1] No
|
|
228
|
+
[2] Yes, ClickUp
|
|
229
|
+
[3] Yes, Jira
|
|
230
|
+
[4] Yes, Linear
|
|
231
|
+
[5] Yes, Asana
|
|
232
|
+
|
|
233
|
+
> 2
|
|
234
|
+
> Task ID: abc123
|
|
235
|
+
|
|
236
|
+
─────────────────────────────────────────
|
|
237
|
+
|
|
238
|
+
1b. WORKTREE
|
|
239
|
+
Work in a separate worktree? (for parallel development)
|
|
240
|
+
|
|
241
|
+
[1] No, work in current directory
|
|
242
|
+
[2] Yes, create new worktree
|
|
243
|
+
|
|
244
|
+
> 1
|
|
245
|
+
|
|
246
|
+
─────────────────────────────────────────
|
|
247
|
+
|
|
248
|
+
2. DATABASE POLICY
|
|
249
|
+
How should the database be handled?
|
|
250
|
+
|
|
251
|
+
[1] No database changes needed
|
|
252
|
+
[2] Reset allowed (dev/staging)
|
|
253
|
+
[3] Incremental migrations only (production)
|
|
254
|
+
|
|
255
|
+
> 1
|
|
256
|
+
|
|
257
|
+
─────────────────────────────────────────
|
|
258
|
+
|
|
259
|
+
3. ENTITY TYPE
|
|
260
|
+
What type of entity work?
|
|
261
|
+
|
|
262
|
+
[1] No entity changes
|
|
263
|
+
[2] Modify existing entity
|
|
264
|
+
[3] New entity (⚠️ recommend STORY)
|
|
265
|
+
|
|
266
|
+
> 2
|
|
267
|
+
> Entity name: users
|
|
268
|
+
|
|
269
|
+
─────────────────────────────────────────
|
|
270
|
+
|
|
271
|
+
4. BLOCKS
|
|
272
|
+
Are blocks needed?
|
|
273
|
+
|
|
274
|
+
[1] No blocks needed
|
|
275
|
+
[2] Simple blocks
|
|
276
|
+
[3] Complex blocks (⚠️ recommend BLOCKS workflow)
|
|
277
|
+
|
|
278
|
+
> 1
|
|
279
|
+
|
|
280
|
+
─────────────────────────────────────────
|
|
281
|
+
|
|
282
|
+
5. MOCK
|
|
283
|
+
Do you have a design mock?
|
|
284
|
+
|
|
285
|
+
[1] No
|
|
286
|
+
[2] Yes
|
|
287
|
+
|
|
288
|
+
> 1
|
|
289
|
+
|
|
290
|
+
─────────────────────────────────────────
|
|
291
|
+
|
|
292
|
+
6. TESTING
|
|
293
|
+
What testing is needed?
|
|
294
|
+
|
|
295
|
+
[1] Run existing tests only
|
|
296
|
+
[2] Modify existing tests
|
|
297
|
+
[3] Create new tests
|
|
298
|
+
|
|
299
|
+
> 2
|
|
300
|
+
|
|
301
|
+
─────────────────────────────────────────
|
|
302
|
+
|
|
303
|
+
7. DOCUMENTATION
|
|
304
|
+
What documentation is needed?
|
|
305
|
+
|
|
306
|
+
[1] No documentation needed
|
|
307
|
+
[2] Update existing docs
|
|
308
|
+
[3] Create new docs
|
|
309
|
+
|
|
310
|
+
> 1
|
|
311
|
+
|
|
312
|
+
─────────────────────────────────────────
|
|
313
|
+
|
|
314
|
+
✓ Discovery complete!
|
|
315
|
+
|
|
316
|
+
Context collected:
|
|
317
|
+
├── Task Manager: ClickUp (abc123)
|
|
318
|
+
├── Worktree: No (current directory)
|
|
319
|
+
├── Database: No changes
|
|
320
|
+
├── Entity: Modify users
|
|
321
|
+
├── Blocks: None
|
|
322
|
+
├── Mock: None
|
|
323
|
+
├── Testing: Modify existing
|
|
324
|
+
└── Documentation: None
|
|
325
|
+
|
|
326
|
+
Proceeding with TASK workflow...
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### Phase C: Execution
|
|
330
|
+
|
|
331
|
+
```
|
|
332
|
+
📁 Creating session...
|
|
333
|
+
|
|
334
|
+
Session created: tasks/2026-01-12-add-phone-field/
|
|
335
|
+
|
|
336
|
+
Creating requirements.md with discovery context...
|
|
337
|
+
|
|
338
|
+
✓ Ready to execute
|
|
339
|
+
|
|
340
|
+
Next steps:
|
|
341
|
+
1. Review requirements.md
|
|
342
|
+
2. Run /session:execute to implement
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Risk Alerts
|
|
348
|
+
|
|
349
|
+
If high business risk is detected:
|
|
350
|
+
|
|
351
|
+
```
|
|
352
|
+
⚠️ BUSINESS RISK ALERT
|
|
353
|
+
|
|
354
|
+
This change affects: Checkout Flow (critical flow)
|
|
355
|
+
|
|
356
|
+
Potential impact:
|
|
357
|
+
- Conversion loss if errors occur
|
|
358
|
+
- Directly affects revenue
|
|
359
|
+
|
|
360
|
+
Recommendations:
|
|
361
|
+
1. Use STORY workflow (mandatory)
|
|
362
|
+
2. Exhaustive E2E testing
|
|
363
|
+
3. Deploy during low traffic hours
|
|
364
|
+
4. Have rollback plan ready
|
|
365
|
+
|
|
366
|
+
Continue with these precautions? [Yes/No]
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## Discovery Questions Reference
|
|
372
|
+
|
|
373
|
+
### Questions by Workflow
|
|
374
|
+
|
|
375
|
+
| Question | TWEAK | BLOCKS | TASK | STORY |
|
|
376
|
+
|----------|:-----:|:------:|:----:|:-----:|
|
|
377
|
+
| 1. Task Manager | ✓ | ✓ | ✓ | ✓ |
|
|
378
|
+
| 1b. Worktree | - | ✓ | ✓ | ✓ |
|
|
379
|
+
| 2. Database Policy | - | - | ✓ | ✓ |
|
|
380
|
+
| 3. Entity Type | - | - | ✓ | ✓ |
|
|
381
|
+
| 4. Blocks | - | ✓* | ✓ | ✓ |
|
|
382
|
+
| 5. Mock | - | ✓** | ✓ | ✓ |
|
|
383
|
+
| 5a. Mock For | - | - | (if mock)*** | (if mock)*** |
|
|
384
|
+
| 5b. Mock Source | - | ✓** | (if mock) | (if mock) |
|
|
385
|
+
| 5c. Mock Complexity | - | - | (if mock) | (if mock) |
|
|
386
|
+
| 6. Testing | ✓ | ✓ | ✓ | ✓ |
|
|
387
|
+
| 7. Documentation | ✓ | ✓ | ✓ | ✓ |
|
|
388
|
+
|
|
389
|
+
*BLOCKS: Asks Block Type and Block Decision instead of generic Blocks question
|
|
390
|
+
**BLOCKS: Mock is required (source always asked)
|
|
391
|
+
***If Q4 = blocks, defaults to "Page builder blocks"
|
|
392
|
+
|
|
393
|
+
### Question Details
|
|
394
|
+
|
|
395
|
+
```
|
|
396
|
+
1. TASK MANAGER
|
|
397
|
+
- No
|
|
398
|
+
- Yes, ClickUp (request task_id)
|
|
399
|
+
- Yes, Jira (request task_id)
|
|
400
|
+
- Yes, Linear (request task_id)
|
|
401
|
+
- Yes, Asana (request task_id)
|
|
402
|
+
|
|
403
|
+
1b. WORKTREE (TASK, STORY, BLOCKS only)
|
|
404
|
+
- Only shown if worktrees.enabled = true in workspace.json
|
|
405
|
+
- Useful for parallel feature development without switching branches
|
|
406
|
+
- No, work in current directory
|
|
407
|
+
- Yes, create new worktree
|
|
408
|
+
IF YES:
|
|
409
|
+
├── Creates branch: feature/<session-slug> (-b flag for new branch)
|
|
410
|
+
│ If branch already exists, uses: git worktree add <path> <existing-branch>
|
|
411
|
+
├── Creates worktree at: <basePath>/repo-<session-slug>
|
|
412
|
+
├── Copies .env from current repo
|
|
413
|
+
├── Runs pnpm install (if autoInstall = true)
|
|
414
|
+
└── All session work happens in the worktree directory
|
|
415
|
+
- NOTE: The worktree path is stored in session metadata for cleanup:
|
|
416
|
+
Session file stores: { "worktree": { "path": "../repo-<slug>", "branch": "feature/<slug>" } }
|
|
417
|
+
Location: .claude/sessions/<type>/<session-name>/metadata.json
|
|
418
|
+
|
|
419
|
+
2. DATABASE POLICY
|
|
420
|
+
- No database changes needed
|
|
421
|
+
- Reset allowed (dev/staging)
|
|
422
|
+
- Incremental migrations only (production)
|
|
423
|
+
|
|
424
|
+
3. ENTITY TYPE
|
|
425
|
+
- No entity changes
|
|
426
|
+
- Modify existing entity (request name)
|
|
427
|
+
- New entity (⚠️ may trigger STORY recommendation)
|
|
428
|
+
|
|
429
|
+
4. BLOCKS
|
|
430
|
+
- No blocks needed
|
|
431
|
+
- Simple blocks
|
|
432
|
+
- Complex blocks (⚠️ may trigger BLOCKS workflow)
|
|
433
|
+
|
|
434
|
+
5. MOCK
|
|
435
|
+
- No
|
|
436
|
+
- Yes, I have a mock
|
|
437
|
+
IF YES, ask conditional questions:
|
|
438
|
+
├── 5a. Mock is for:
|
|
439
|
+
│ [1] Page builder blocks (default if Q4=blocks)
|
|
440
|
+
│ [2] Complete screens/pages
|
|
441
|
+
│ [3] Specific components
|
|
442
|
+
│
|
|
443
|
+
├── 5b. Mock was created in:
|
|
444
|
+
│ [1] Stitch
|
|
445
|
+
│ [2] UXPilot
|
|
446
|
+
│ [3] Figma
|
|
447
|
+
│ [4] Other
|
|
448
|
+
│
|
|
449
|
+
└── 5c. Number of sections/blocks:
|
|
450
|
+
[1] Single block/component
|
|
451
|
+
[2] Multiple (2-4)
|
|
452
|
+
[3] Full page (5+)
|
|
453
|
+
|
|
454
|
+
6. TESTING
|
|
455
|
+
- Run existing tests only
|
|
456
|
+
- Modify existing tests
|
|
457
|
+
- Create new tests (API/UAT/Unit)
|
|
458
|
+
|
|
459
|
+
7. DOCUMENTATION
|
|
460
|
+
- No documentation needed
|
|
461
|
+
- Update existing docs
|
|
462
|
+
- Create new docs (public/superadmin/skills)
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
### Escalation Triggers
|
|
466
|
+
|
|
467
|
+
During discovery, if user answers suggest more complexity:
|
|
468
|
+
|
|
469
|
+
| Answer | Current Workflow | Recommendation |
|
|
470
|
+
|--------|-----------------|----------------|
|
|
471
|
+
| New entity | TASK | Escalate to STORY |
|
|
472
|
+
| Complex blocks (Q4) | TASK | Use BLOCKS workflow |
|
|
473
|
+
| DB migrations needed | TASK | Escalate to STORY |
|
|
474
|
+
| Create new tests | TWEAK | Escalate to TASK |
|
|
475
|
+
| Create new docs | TWEAK | Escalate to TASK |
|
|
476
|
+
| Q4=blocks + Q5=mock (single) | TASK | Suggest BLOCKS workflow |
|
|
477
|
+
| Mock for full page (5+) | TASK | Escalate to STORY |
|
|
478
|
+
| Mock with API integration | BLOCKS | Escalate to TASK |
|
|
479
|
+
| Mock + DB changes needed | BLOCKS | Escalate to STORY |
|
|
480
|
+
|
|
481
|
+
---
|
|
482
|
+
|
|
483
|
+
## Optional Parameters
|
|
484
|
+
|
|
485
|
+
| Parameter | Description |
|
|
486
|
+
|-----------|-------------|
|
|
487
|
+
| `--force-quick` | Force TWEAK without evaluation |
|
|
488
|
+
| `--force-standard` | Force TASK without evaluation |
|
|
489
|
+
| `--force-complete` | Force STORY without evaluation |
|
|
490
|
+
| `--no-risk-check` | Skip risk evaluation |
|
|
491
|
+
| `--task <id>` | Link with existing task |
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
## Worktree Setup (when selected)
|
|
496
|
+
|
|
497
|
+
When the user selects "Yes, create new worktree":
|
|
498
|
+
|
|
499
|
+
```
|
|
500
|
+
🌳 WORKTREE SETUP
|
|
501
|
+
|
|
502
|
+
Creating worktree for parallel development...
|
|
503
|
+
|
|
504
|
+
Branch: feature/add-phone-field
|
|
505
|
+
Path: G:/GitHub/nextspark/repo-add-phone-field
|
|
506
|
+
|
|
507
|
+
─────────────────────────────────────────
|
|
508
|
+
|
|
509
|
+
$ git worktree add ../repo-add-phone-field -b feature/add-phone-field
|
|
510
|
+
Preparing worktree (new branch 'feature/add-phone-field')
|
|
511
|
+
HEAD is now at 49db548 ...
|
|
512
|
+
|
|
513
|
+
$ cp .env ../repo-add-phone-field/.env
|
|
514
|
+
✓ Environment copied
|
|
515
|
+
|
|
516
|
+
$ cd ../repo-add-phone-field && pnpm install
|
|
517
|
+
✓ Dependencies installed
|
|
518
|
+
|
|
519
|
+
─────────────────────────────────────────
|
|
520
|
+
|
|
521
|
+
✓ Worktree ready!
|
|
522
|
+
|
|
523
|
+
Working directory: G:/GitHub/nextspark/repo-add-phone-field
|
|
524
|
+
Branch: feature/add-phone-field
|
|
525
|
+
|
|
526
|
+
⚠️ IMPORTANT: Open a new Claude Code terminal in the
|
|
527
|
+
worktree directory to work on this feature:
|
|
528
|
+
|
|
529
|
+
cd G:/GitHub/nextspark/repo-add-phone-field
|
|
530
|
+
|
|
531
|
+
All session files and work will happen there.
|
|
532
|
+
To see all worktrees: git worktree list
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
### Worktree Commands
|
|
536
|
+
|
|
537
|
+
```bash
|
|
538
|
+
# Execute these from the MAIN repo (not the worktree):
|
|
539
|
+
|
|
540
|
+
# List all active worktrees
|
|
541
|
+
git worktree list
|
|
542
|
+
|
|
543
|
+
# Remove a worktree after merging
|
|
544
|
+
git worktree remove ../repo-add-phone-field
|
|
545
|
+
|
|
546
|
+
# Prune stale worktree references
|
|
547
|
+
git worktree prune
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
### Error Handling
|
|
551
|
+
|
|
552
|
+
```
|
|
553
|
+
If git worktree add fails:
|
|
554
|
+
├── Branch already checked out → "Branch is in use by another worktree. Use a different name."
|
|
555
|
+
├── Path already exists → "Path already exists. Remove it or choose a different name."
|
|
556
|
+
└── Other git error → Show error, abort worktree setup, continue session without worktree
|
|
557
|
+
|
|
558
|
+
If .env copy fails:
|
|
559
|
+
└── Warn: ".env not found. Copy it manually: cp <repo>/.env <worktree>/.env"
|
|
560
|
+
|
|
561
|
+
If pnpm install fails:
|
|
562
|
+
└── Warn: "pnpm install failed. Run it manually in the worktree directory."
|
|
563
|
+
(Do not block session creation)
|
|
564
|
+
|
|
565
|
+
If worktree path missing during cleanup (/session:close):
|
|
566
|
+
└── Already removed manually → Skip cleanup, just clear session metadata
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
---
|
|
570
|
+
|
|
571
|
+
## After Execution
|
|
572
|
+
|
|
573
|
+
Depending on the workflow:
|
|
574
|
+
|
|
575
|
+
### TWEAK
|
|
576
|
+
- Does not create session files
|
|
577
|
+
- Uses discovery context (3 questions) internally
|
|
578
|
+
- Proceeds directly to implementation
|
|
579
|
+
- If task manager linked → Updates external task status
|
|
580
|
+
|
|
581
|
+
### BLOCKS
|
|
582
|
+
- Creates `blocks/YYYY-MM-DD-name/`
|
|
583
|
+
- Creates `mocks/` subfolder
|
|
584
|
+
- **PAUSES** for user to upload mock files
|
|
585
|
+
- After "ready", runs mock-analyst → block-developer → visual-comparator
|
|
586
|
+
- Visual validation loop (max 3 retries)
|
|
587
|
+
- See `session-start-blocks.md` for details
|
|
588
|
+
|
|
589
|
+
### TASK
|
|
590
|
+
- Creates `tasks/YYYY-MM-DD-name/`
|
|
591
|
+
- **If mock selected:** Creates `mocks/` subfolder, PAUSES for upload
|
|
592
|
+
- **If mock selected:** Runs mock-analyst (Phase 0.6) → analysis.json, ds-mapping.json
|
|
593
|
+
- Creates `requirements.md` with Discovery Answers section (includes mock analysis)
|
|
594
|
+
- Claude uses discovery context to define ACs and approach
|
|
595
|
+
- If task manager linked → Syncs with external task
|
|
596
|
+
|
|
597
|
+
### STORY
|
|
598
|
+
- Creates `stories/YYYY-MM-DD-name/`
|
|
599
|
+
- **If mock selected:** Creates `mocks/` subfolder, PAUSES for upload
|
|
600
|
+
- **If mock selected:** Runs mock-analyst (Phase 0.6) → analysis.json, ds-mapping.json
|
|
601
|
+
- Launches `product-manager` subagent WITH discovery context + mock analysis
|
|
602
|
+
- PM creates `requirements.md` (does NOT ask questions again)
|
|
603
|
+
- PM creates `clickup_task.md` if task manager linked
|
|
604
|
+
- Then launches `architecture-supervisor` for plan.md
|