@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,225 @@
|
|
|
1
|
+
# /session:close
|
|
2
|
+
|
|
3
|
+
Close the active session or a specific session.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Syntax
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
/session:close [session-path] [summary]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Behavior
|
|
16
|
+
|
|
17
|
+
### Without path (active session)
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/session:close
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Closes the current active session (if there is one).
|
|
24
|
+
|
|
25
|
+
### With path
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
/session:close stories/2026-01-11-new-entity "Feature completed"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Closes the specified session.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Flow
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
39
|
+
│ /session:close │
|
|
40
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
41
|
+
│ │
|
|
42
|
+
│ 1. Verify ACs are met │
|
|
43
|
+
│ - Read requirements.md │
|
|
44
|
+
│ - Verify checklist in progress.md │
|
|
45
|
+
│ ↓ │
|
|
46
|
+
│ 2. All ACs completed? │
|
|
47
|
+
│ │ │
|
|
48
|
+
│ ├─► YES: Continue │
|
|
49
|
+
│ │ │
|
|
50
|
+
│ └─► NO: Warn │
|
|
51
|
+
│ "There are 2 pending ACs. Close anyway?" │
|
|
52
|
+
│ ↓ │
|
|
53
|
+
│ 3. Execute session-close.sh │
|
|
54
|
+
│ ↓ │
|
|
55
|
+
│ 4. Worktree cleanup (if session used a worktree) │
|
|
56
|
+
│ - Check if worktree path exists in session metadata │
|
|
57
|
+
│ - Check PR merge status: │
|
|
58
|
+
│ $ gh pr list --head <branch> --state merged │
|
|
59
|
+
│ │ │
|
|
60
|
+
│ ├─► PR MERGED: Auto-suggest removal │
|
|
61
|
+
│ │ "PR merged! Removing worktree and branch..." │
|
|
62
|
+
│ │ $ git worktree remove <path> │
|
|
63
|
+
│ │ $ git branch -d <branch> │
|
|
64
|
+
│ │ (Still ask for confirmation before deleting) │
|
|
65
|
+
│ │ │
|
|
66
|
+
│ ├─► PR OPEN: Ask what to do │
|
|
67
|
+
│ │ "PR still open. Remove worktree?" │
|
|
68
|
+
│ │ [1] Remove worktree (keep branch) │
|
|
69
|
+
│ │ [2] Keep worktree │
|
|
70
|
+
│ │ │
|
|
71
|
+
│ └─► NO PR: Ask with all options │
|
|
72
|
+
│ [1] Remove worktree and delete branch │
|
|
73
|
+
│ [2] Remove worktree but keep branch │
|
|
74
|
+
│ [3] Keep worktree │
|
|
75
|
+
│ ↓ │
|
|
76
|
+
│ 5. Archive? │
|
|
77
|
+
│ [Yes, archive] [No, keep] │
|
|
78
|
+
│ ↓ │
|
|
79
|
+
│ 6. Update task manager (if enabled) │
|
|
80
|
+
│ - Post final comment │
|
|
81
|
+
│ - Change status to "done" │
|
|
82
|
+
│ ↓ │
|
|
83
|
+
│ 7. Show summary │
|
|
84
|
+
│ │
|
|
85
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Example Output
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
📋 CLOSING SESSION
|
|
94
|
+
|
|
95
|
+
Session: stories/2026-01-11-new-products-entity
|
|
96
|
+
Type: Story (STORY)
|
|
97
|
+
Iterations: 2
|
|
98
|
+
|
|
99
|
+
─────────────────────────────────────────
|
|
100
|
+
|
|
101
|
+
✅ AC VERIFICATION
|
|
102
|
+
|
|
103
|
+
AC1: Create products migration ✓
|
|
104
|
+
AC2: Implement CRUD API ✓
|
|
105
|
+
AC3: Create management UI ✓
|
|
106
|
+
AC4: Automated tests ✓
|
|
107
|
+
|
|
108
|
+
All ACs completed: 4/4
|
|
109
|
+
|
|
110
|
+
─────────────────────────────────────────
|
|
111
|
+
|
|
112
|
+
📊 SUMMARY
|
|
113
|
+
|
|
114
|
+
- Total duration: 5 days
|
|
115
|
+
- Iterations: 2
|
|
116
|
+
- Files modified: 23
|
|
117
|
+
- Tests created: 12
|
|
118
|
+
|
|
119
|
+
─────────────────────────────────────────
|
|
120
|
+
|
|
121
|
+
✓ Session closed
|
|
122
|
+
|
|
123
|
+
Archive session? [Yes/No]
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## With Worktree
|
|
129
|
+
|
|
130
|
+
### PR Already Merged
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
🌳 WORKTREE CLEANUP
|
|
134
|
+
|
|
135
|
+
This session used a worktree:
|
|
136
|
+
Path: G:/GitHub/nextspark/repo-add-phone-field
|
|
137
|
+
Branch: feature/add-phone-field
|
|
138
|
+
|
|
139
|
+
✅ PR #42 was MERGED into main.
|
|
140
|
+
|
|
141
|
+
Recommended: Remove worktree and clean up branch.
|
|
142
|
+
|
|
143
|
+
$ git worktree remove ../repo-add-phone-field
|
|
144
|
+
✓ Worktree removed
|
|
145
|
+
|
|
146
|
+
$ git branch -d feature/add-phone-field
|
|
147
|
+
✓ Branch deleted (was merged)
|
|
148
|
+
|
|
149
|
+
$ git remote prune origin
|
|
150
|
+
✓ Remote references cleaned
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### PR Still Open
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
🌳 WORKTREE CLEANUP
|
|
157
|
+
|
|
158
|
+
This session used a worktree:
|
|
159
|
+
Path: G:/GitHub/nextspark/repo-add-phone-field
|
|
160
|
+
Branch: feature/add-phone-field
|
|
161
|
+
|
|
162
|
+
⏳ PR #42 is still OPEN (not merged yet).
|
|
163
|
+
|
|
164
|
+
Options:
|
|
165
|
+
[1] Remove worktree but keep branch (can re-create worktree later)
|
|
166
|
+
[2] Keep worktree (continue working later)
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### No PR Found
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
🌳 WORKTREE CLEANUP
|
|
173
|
+
|
|
174
|
+
This session used a worktree:
|
|
175
|
+
Path: G:/GitHub/nextspark/repo-add-phone-field
|
|
176
|
+
Branch: feature/add-phone-field
|
|
177
|
+
|
|
178
|
+
Options:
|
|
179
|
+
[1] Remove worktree and delete branch
|
|
180
|
+
[2] Remove worktree but keep branch
|
|
181
|
+
[3] Keep worktree (remove later with: git worktree remove ../repo-add-phone-field)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## With Pending ACs
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
⚠️ WARNING
|
|
190
|
+
|
|
191
|
+
There are pending ACs:
|
|
192
|
+
- [ ] AC4: Automated tests
|
|
193
|
+
|
|
194
|
+
Options:
|
|
195
|
+
[1] Close anyway (document pending items)
|
|
196
|
+
[2] Cancel and continue working
|
|
197
|
+
[3] Move pending to new iteration
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Task Manager Integration
|
|
203
|
+
|
|
204
|
+
If `taskManager.enabled`:
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
📋 TASK UPDATE
|
|
208
|
+
|
|
209
|
+
ClickUp: #abc123
|
|
210
|
+
|
|
211
|
+
Posting final comment...
|
|
212
|
+
✓ Comment posted
|
|
213
|
+
|
|
214
|
+
Updating status to "done"...
|
|
215
|
+
✓ Status updated
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Related Commands
|
|
221
|
+
|
|
222
|
+
| Command | Action |
|
|
223
|
+
|---------|--------|
|
|
224
|
+
| `/session:status` | View status before closing |
|
|
225
|
+
| `/session:pending` | Document pending items |
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# /session:commit
|
|
2
|
+
|
|
3
|
+
Create a git commit for the current session changes.
|
|
4
|
+
|
|
5
|
+
**Aliases:** `/commit`
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Syntax
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/session:commit [message]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Behavior
|
|
18
|
+
|
|
19
|
+
Creates a structured commit with session context and proper co-author attribution.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Flow
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
27
|
+
│ /session:commit │
|
|
28
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
29
|
+
│ │
|
|
30
|
+
│ 1. Check for uncommitted changes │
|
|
31
|
+
│ ↓ │
|
|
32
|
+
│ 2. Load session context │
|
|
33
|
+
│ - Read scope.json │
|
|
34
|
+
│ - Read progress.md │
|
|
35
|
+
│ ↓ │
|
|
36
|
+
│ 3. Analyze changes │
|
|
37
|
+
│ - Categorize by type (feat/fix/refactor) │
|
|
38
|
+
│ - Identify related ACs │
|
|
39
|
+
│ ↓ │
|
|
40
|
+
│ 4. Generate commit message │
|
|
41
|
+
│ - Following conventional commits │
|
|
42
|
+
│ - Reference session/task if applicable │
|
|
43
|
+
│ ↓ │
|
|
44
|
+
│ 5. Show preview and confirm │
|
|
45
|
+
│ ↓ │
|
|
46
|
+
│ 6. Execute commit │
|
|
47
|
+
│ │
|
|
48
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Example Output
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
📦 SESSION COMMIT
|
|
57
|
+
|
|
58
|
+
Session: stories/2026-01-11-new-products-entity
|
|
59
|
+
|
|
60
|
+
─────────────────────────────────────────
|
|
61
|
+
|
|
62
|
+
📊 CHANGES DETECTED
|
|
63
|
+
|
|
64
|
+
Staged:
|
|
65
|
+
├─ core/config/entities/products.ts (new)
|
|
66
|
+
├─ core/db/migrations/008_products.sql (new)
|
|
67
|
+
├─ core/services/ProductsService.ts (new)
|
|
68
|
+
└─ core/components/products/ProductForm.tsx (new)
|
|
69
|
+
|
|
70
|
+
Unstaged:
|
|
71
|
+
└─ (none)
|
|
72
|
+
|
|
73
|
+
─────────────────────────────────────────
|
|
74
|
+
|
|
75
|
+
📝 GENERATED COMMIT MESSAGE
|
|
76
|
+
|
|
77
|
+
feat(products): add products entity with CRUD operations
|
|
78
|
+
|
|
79
|
+
- Create products migration with fields and relations
|
|
80
|
+
- Configure entity in entities.config.ts
|
|
81
|
+
- Add ProductsService for custom price logic
|
|
82
|
+
- Create ProductForm component with validation
|
|
83
|
+
|
|
84
|
+
Relates to: AC1, AC2, AC3
|
|
85
|
+
Session: stories/2026-01-11-new-products-entity
|
|
86
|
+
|
|
87
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
88
|
+
|
|
89
|
+
─────────────────────────────────────────
|
|
90
|
+
|
|
91
|
+
Commit with this message? [Yes/Edit/Cancel]
|
|
92
|
+
|
|
93
|
+
> Yes
|
|
94
|
+
|
|
95
|
+
✓ Changes committed: abc1234
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## With Custom Message
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
/session:commit "feat(products): initial entity setup"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Output:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
📦 SESSION COMMIT
|
|
110
|
+
|
|
111
|
+
Using provided message: "feat(products): initial entity setup"
|
|
112
|
+
|
|
113
|
+
─────────────────────────────────────────
|
|
114
|
+
|
|
115
|
+
📝 FINAL COMMIT MESSAGE
|
|
116
|
+
|
|
117
|
+
feat(products): initial entity setup
|
|
118
|
+
|
|
119
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
120
|
+
|
|
121
|
+
─────────────────────────────────────────
|
|
122
|
+
|
|
123
|
+
Commit? [Yes/Edit/Cancel]
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Commit Types
|
|
129
|
+
|
|
130
|
+
| Type | Description |
|
|
131
|
+
|------|-------------|
|
|
132
|
+
| `feat` | New feature |
|
|
133
|
+
| `fix` | Bug fix |
|
|
134
|
+
| `refactor` | Code refactoring |
|
|
135
|
+
| `docs` | Documentation changes |
|
|
136
|
+
| `test` | Test additions/changes |
|
|
137
|
+
| `chore` | Maintenance tasks |
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Options
|
|
142
|
+
|
|
143
|
+
| Option | Description |
|
|
144
|
+
|--------|-------------|
|
|
145
|
+
| `--no-verify` | Skip pre-commit hooks |
|
|
146
|
+
| `--amend` | Amend last commit |
|
|
147
|
+
| `--push` | Push after commit |
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Task Manager Integration
|
|
152
|
+
|
|
153
|
+
If `taskManager.enabled`:
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
📋 LINKING COMMIT
|
|
157
|
+
|
|
158
|
+
ClickUp: #abc123
|
|
159
|
+
|
|
160
|
+
Add commit reference to task? [Yes/No]
|
|
161
|
+
|
|
162
|
+
> Yes
|
|
163
|
+
|
|
164
|
+
✓ Commit linked to task
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Related Commands
|
|
170
|
+
|
|
171
|
+
| Command | Action |
|
|
172
|
+
|---------|--------|
|
|
173
|
+
| `/session:validate` | Validate before commit |
|
|
174
|
+
| `/session:close` | Close after final commit |
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# /session:db:entity
|
|
2
|
+
|
|
3
|
+
Generate migration for an entity with relations and metadata support.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Required Skills
|
|
8
|
+
|
|
9
|
+
**[MANDATORY]** Read these skills before executing:
|
|
10
|
+
- `.claude/skills/database-migrations/SKILL.md` - PostgreSQL patterns with RLS
|
|
11
|
+
- `.claude/skills/entity-system/SKILL.md` - Entity configuration patterns
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Syntax
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
/session:db:entity <entity-name> [--fields <fields>]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Behavior
|
|
24
|
+
|
|
25
|
+
Creates a complete database migration following project conventions including RLS policies.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Flow
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
33
|
+
│ /session:db:entity │
|
|
34
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
35
|
+
│ │
|
|
36
|
+
│ 1. Analyze entity requirements │
|
|
37
|
+
│ - Read session context │
|
|
38
|
+
│ - Parse field definitions │
|
|
39
|
+
│ ↓ │
|
|
40
|
+
│ 2. Determine relations │
|
|
41
|
+
│ - Foreign keys │
|
|
42
|
+
│ - Many-to-many tables │
|
|
43
|
+
│ ↓ │
|
|
44
|
+
│ 3. Generate migration SQL │
|
|
45
|
+
│ - Main table with camelCase fields │
|
|
46
|
+
│ - Meta table (if needed) │
|
|
47
|
+
│ - RLS policies │
|
|
48
|
+
│ ↓ │
|
|
49
|
+
│ 4. Validate SQL syntax │
|
|
50
|
+
│ ↓ │
|
|
51
|
+
│ 5. Create migration file │
|
|
52
|
+
│ │
|
|
53
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Example Output
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
🗃️ CREATE ENTITY MIGRATION
|
|
62
|
+
|
|
63
|
+
Entity: products
|
|
64
|
+
|
|
65
|
+
─────────────────────────────────────────
|
|
66
|
+
|
|
67
|
+
📋 ENTITY ANALYSIS
|
|
68
|
+
|
|
69
|
+
From session requirements:
|
|
70
|
+
- name: string (required)
|
|
71
|
+
- description: text (optional)
|
|
72
|
+
- price: decimal (required)
|
|
73
|
+
- categoryId: UUID FK (optional)
|
|
74
|
+
- isActive: boolean (default: true)
|
|
75
|
+
|
|
76
|
+
Relations detected:
|
|
77
|
+
- products → categories (many-to-one)
|
|
78
|
+
|
|
79
|
+
─────────────────────────────────────────
|
|
80
|
+
|
|
81
|
+
📝 GENERATED MIGRATION
|
|
82
|
+
|
|
83
|
+
File: core/db/migrations/008_products.sql
|
|
84
|
+
|
|
85
|
+
```sql
|
|
86
|
+
-- ============================================
|
|
87
|
+
-- Migration: 008_products.sql
|
|
88
|
+
-- Entity: products
|
|
89
|
+
-- Generated: 2026-01-11
|
|
90
|
+
-- ============================================
|
|
91
|
+
|
|
92
|
+
-- Main table
|
|
93
|
+
CREATE TABLE products (
|
|
94
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
95
|
+
|
|
96
|
+
-- Fields (camelCase)
|
|
97
|
+
name VARCHAR(255) NOT NULL,
|
|
98
|
+
description TEXT,
|
|
99
|
+
price DECIMAL(10, 2) NOT NULL,
|
|
100
|
+
categoryId UUID REFERENCES categories(id),
|
|
101
|
+
isActive BOOLEAN NOT NULL DEFAULT true,
|
|
102
|
+
|
|
103
|
+
-- System fields
|
|
104
|
+
teamId UUID NOT NULL REFERENCES teams(id),
|
|
105
|
+
createdById UUID REFERENCES "user"(id),
|
|
106
|
+
createdAt TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
107
|
+
updatedAt TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
-- Indexes
|
|
111
|
+
CREATE INDEX idx_products_teamId ON products(teamId);
|
|
112
|
+
CREATE INDEX idx_products_categoryId ON products(categoryId);
|
|
113
|
+
CREATE INDEX idx_products_isActive ON products(isActive);
|
|
114
|
+
|
|
115
|
+
-- RLS Policies
|
|
116
|
+
ALTER TABLE products ENABLE ROW LEVEL SECURITY;
|
|
117
|
+
|
|
118
|
+
CREATE POLICY products_team_isolation ON products
|
|
119
|
+
USING (teamId = current_setting('app.current_team_id')::UUID);
|
|
120
|
+
|
|
121
|
+
CREATE POLICY products_select ON products
|
|
122
|
+
FOR SELECT USING (true);
|
|
123
|
+
|
|
124
|
+
CREATE POLICY products_insert ON products
|
|
125
|
+
FOR INSERT WITH CHECK (
|
|
126
|
+
teamId = current_setting('app.current_team_id')::UUID
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
CREATE POLICY products_update ON products
|
|
130
|
+
FOR UPDATE USING (
|
|
131
|
+
teamId = current_setting('app.current_team_id')::UUID
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
CREATE POLICY products_delete ON products
|
|
135
|
+
FOR DELETE USING (
|
|
136
|
+
teamId = current_setting('app.current_team_id')::UUID
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
-- Trigger for updatedAt
|
|
140
|
+
CREATE TRIGGER update_products_updated_at
|
|
141
|
+
BEFORE UPDATE ON products
|
|
142
|
+
FOR EACH ROW
|
|
143
|
+
EXECUTE FUNCTION update_updated_at_column();
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
─────────────────────────────────────────
|
|
147
|
+
|
|
148
|
+
✅ VALIDATION
|
|
149
|
+
|
|
150
|
+
- [x] camelCase field names
|
|
151
|
+
- [x] UUID primary key
|
|
152
|
+
- [x] TIMESTAMPTZ for dates
|
|
153
|
+
- [x] RLS policies configured
|
|
154
|
+
- [x] teamId for multi-tenant
|
|
155
|
+
|
|
156
|
+
─────────────────────────────────────────
|
|
157
|
+
|
|
158
|
+
✓ Migration created: 008_products.sql
|
|
159
|
+
|
|
160
|
+
Next: /session:db:sample to generate sample data
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## With Meta Table
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
/session:db:entity products --with-meta
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Generates additional meta table:
|
|
172
|
+
|
|
173
|
+
```sql
|
|
174
|
+
-- Meta table for extensible fields
|
|
175
|
+
CREATE TABLE products_meta (
|
|
176
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
177
|
+
productId UUID NOT NULL REFERENCES products(id) ON DELETE CASCADE,
|
|
178
|
+
key VARCHAR(255) NOT NULL,
|
|
179
|
+
value JSONB,
|
|
180
|
+
createdAt TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
181
|
+
UNIQUE(productId, key)
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
CREATE INDEX idx_products_meta_productId ON products_meta(productId);
|
|
185
|
+
CREATE INDEX idx_products_meta_key ON products_meta(key);
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Options
|
|
191
|
+
|
|
192
|
+
| Option | Description |
|
|
193
|
+
|--------|-------------|
|
|
194
|
+
| `--fields <fields>` | Field definitions (name:type) |
|
|
195
|
+
| `--with-meta` | Include meta table |
|
|
196
|
+
| `--no-rls` | Skip RLS policies |
|
|
197
|
+
| `--dry-run` | Show SQL without creating |
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Related Commands
|
|
202
|
+
|
|
203
|
+
| Command | Action |
|
|
204
|
+
|---------|--------|
|
|
205
|
+
| `/session:db:sample` | Generate sample data |
|
|
206
|
+
| `/session:db:fix` | Fix migration issues |
|