| name | clubs-task-start |
| description | Start a ready-to-run Clubs task worktree for this ar-002-clubs repo. Use this when the user says 워크트리 시작, 워크트리 파, 워크트리 만들어, 태스크 시작, TU 시작, 작업 시작, or asks to start/create/open a worktree, task, TU, or work item. It inspects task context first, chooses the correct branch, creates the worktree under ../clubs-worktrees, copies ignored files, and bootstraps the repo. |
| metadata | {"short-description":"Start and bootstrap a Clubs task worktree"} |
Clubs Task Start
Create an isolated, runnable worktree for this repo before starting a new task.
When to use
Use this skill when:
- the user asks to start work on a new TU task
- the user says 워크트리 시작, 워크트리 파, or 워크트리 만들어
- the user says 태스크 시작, TU 시작, or 작업 시작
- the user gives a Notion task/spec page and wants implementation to happen in a fresh worktree
- the user gives only a new task summary and the task page must be created before the worktree
- the user gives a GitHub PR link and wants that existing branch pulled into a separate worktree
- the user wants a clean workspace with the repo bootstrapped before coding
Do not use this skill if the user explicitly wants work to happen in the current worktree.
Trigger aliases
Treat these natural-language aliases as this skill:
- 워크트리 시작 / 워크트리 파 / 워크트리 만들어
- 태스크 시작 / 태스크 파 / 태스크 만들어
- TU 시작 / TU 파 / TU 작업 시작
- 작업 시작 / 작업 파 / 작업 만들어
Task source first
Always inspect the task source before creating the worktree.
If the user gives a Notion page
- Use the Notion plugin to fetch the page if available.
- Extract:
- TU number
- requested work
- acceptance criteria
- whether this is a fresh task or follow-up on an existing PR
- If Notion tools are unavailable, stop guessing and ask the user for the TU number and the key task summary before proceeding.
If the user gives a PR link
- Use
gh pr view to inspect:
- PR number
- title
- body
headRefName
baseRefName
- Treat the PR branch as the source of truth.
- Reuse the PR head branch instead of inventing a new TU branch.
If the user gives only a TU number or task summary
- Confirm the TU number from the task source when possible.
- If the task has no TU number yet, create a new task page in the Notion task DB first:
https://www.notion.so/sparcs/19cc25603b0b8050bc8ff9d4807e5f3a?v=19cc25603b0b8001a7e4000cfc41151a&source=copy_link
- Use the available Notion integration to create the page. If page creation is unavailable, ask the user to create the task page manually and paste the generated TU number before creating the branch.
- Store the task title, summary, scope, and acceptance criteria there, then obtain the generated task number.
- Use the TU number to build the branch name.
Branch naming rules
- Existing PR: reuse the PR head branch exactly.
- Fresh task with a TU number: use
TU-<number>.
- If only the numeric TU id is passed to the helper, it normalizes
405 to TU-405.
- If the task source does not contain a TU number and no PR branch exists, create a Notion task page first when tools are available. Ask the user for the TU number only when the task page cannot be created.
- Fresh branch creation should sync
dev first by running a git pull origin dev from the primary repo worktree.
Worktree location rules
- Worktrees for this repo always live under the sibling folder
../clubs-worktrees.
- If
../clubs-worktrees does not exist, create it.
- The worktree directory name should match the branch name after sanitizing
/ to -.
Examples:
TU-405 -> ../clubs-worktrees/TU-405
chore/upgrade-next-15-5-16-security -> ../clubs-worktrees/chore-upgrade-next-15-5-16-security
Bootstrap requirements for this repo
After the worktree is created, copy required ignored files from the main repo root when they exist:
.env
.clubs-secrets
.claude
Then run the bootstrap commands in this order inside the new worktree:
- Ensure Node 22.22.1:
source ~/.nvm/nvm.sh
nvm use 22.22.1 || nvm install 22.22.1
pnpm install
pnpm rebuild @prisma/client prisma
pnpm --filter api prisma:generate
Important repo-specific notes:
turbo already takes care of @clubs/interface#build and @clubs/domain#build for dev
turbo does not guarantee Prisma client generation for api
packages/api reads ../../.env, so the worktree root needs .env
Optional runtime prep
Only do these when the task needs the app or DB to run:
pnpm db-up
pnpm --filter api prisma:push
Preferred execution path
Use the helper command:
pnpm clubs-task-start -- --branch <branch> [--start-point <ref>] [--reuse-remote-branch]
Use these modes
- Existing PR branch:
--branch <headRefName> --reuse-remote-branch
- Fresh TU task:
--branch TU-405 --start-point origin/dev
Use --dry-run first when:
- the branch name came from a long PR head ref
- the repo state looks unusual
- you want to show the user the exact operations before doing them
When a fresh branch must be created, the helper should:
- sync the primary repo worktree to the latest
dev
- only then create the new worktree branch from
origin/dev
Validation after setup
After the script finishes:
- Confirm the worktree path exists.
- Run
git status --short --branch inside the new worktree.
- Confirm
.env exists if it was present in the main repo.
- If the user asked for a runnable workspace, run either:
pnpm --filter api build
pnpm --filter web build
- or
pnpm dev
depending on task scope.
Response expectations
When you finish:
- tell the user which task source you read
- state the TU number
- state the branch name
- state the worktree path
- state which ignored files were copied
- state which bootstrap commands ran
- mention any skipped optional steps such as DB startup