LogoSkills

zenhub:init-workspace

ZenHub workspace pipeline initialization and standard structure setup

ํ•ญ๋ชฉ๋‚ด์šฉ
Invoke/zenhub:init-workspace
Categorydev-cycle-workflow
Complexitysimple
MCP Serverszenhub

/zenhub:init-workspace โ€” ์ž‘์—… ๋ณด๋“œ ์ดˆ๊ธฐ ์„ธํŒ…#

ํ•œ๋งˆ๋””๋กœ#

์ƒˆ ํ”„๋กœ์ ํŠธ๋ฅผ ์‹œ์ž‘ํ•  ๋•Œ ZenHub ์ž‘์—… ๋ณด๋“œ(์นธ๋ฐ˜)์˜ ์นธ๋“ค์„ ํ‘œ์ค€ ํ˜•ํƒœ๋กœ ํ•œ ๋ฒˆ์— ์ •๋ฆฌํ•ด ์ฃผ๋Š” ๋ช…๋ น์ž…๋‹ˆ๋‹ค. ์ด์‚ฌ ๋“ค์–ด๊ฐ€๊ธฐ ์ „์— ๋นˆ ๋ฐฉ์— ๋˜‘๊ฐ™์€ ๊ทœ๊ฒฉ์˜ ์ •๋ฆฌ ์„ ๋ฐ˜์„ ๋ฏธ๋ฆฌ ์งœ ๋„ฃ์–ด ๋‘๋Š” ๊ฒƒ๊ณผ ๊ฐ™์•„์š”.

๋ˆ„๊ฐ€ยท์–ธ์ œ ์“ฐ๋‚˜์š”#

  • ZenHub ์ž‘์—… ๊ณต๊ฐ„์— ์ƒˆ GitHub ์ €์žฅ์†Œ๋ฅผ ๋ง‰ ์—ฐ๊ฒฐํ•œ ์งํ›„
  • ํŒ€๋งˆ๋‹ค ์ œ๊ฐ๊ฐ์ธ ๋ณด๋“œ ์นธ ๊ตฌ์กฐ๋ฅผ ํ‘œ์ค€ ํ˜•ํƒœ๋กœ ํ†ต์ผํ•˜๊ณ  ์‹ถ์„ ๋•Œ
  • /dev:run ๊ฐ™์€ ๊ฐœ๋ฐœ ์ž๋™ํ™” ํ๋ฆ„์„ ๋ณธ๊ฒฉ์ ์œผ๋กœ ์‹œ์ž‘ํ•˜๊ธฐ ์ „ ์ดˆ๊ธฐ ์„ธํŒ…์œผ๋กœ

๋ฌด์—‡์„ ํ•ด์ฃผ๋‚˜์š”#

  • ์ž‘์—… ๋ณด๋“œ๋ฅผ ํ‘œ์ค€ 6์นธ ๊ตฌ์กฐ๋กœ ์ •๋ฆฌํ•ฉ๋‹ˆ๋‹ค: New Issues โ†’ Icebox โ†’ Product Backlog โ†’ Sprint Backlog โ†’ In Progress โ†’ Review/QA
  • ๋” ์ด์ƒ ์“ฐ์ง€ ์•Š๋Š” Done ์นธ์„ ๋น„์›๋‹ˆ๋‹ค โ€” ๊ทธ ์•ˆ์— ๋‚จ์•„ ์žˆ๋˜ ์ผ๊ฐ์€ ๋ชจ๋‘ ์ž๋™์œผ๋กœ ์™„๋ฃŒ(Closed) ์ฒ˜๋ฆฌํ•ฉ๋‹ˆ๋‹ค. (์™„๋ฃŒ๋Š” ์ด์ œ PR์ด ํ•ฉ์ณ์งˆ ๋•Œ ์ž๋™์œผ๋กœ ์ฒ˜๋ฆฌ๋˜๋ฏ€๋กœ Done ์นธ์ด ํ•„์š” ์—†์Šต๋‹ˆ๋‹ค.)
  • ์ €์žฅ์†Œยท์กฐ์งยท์ผ๊ฐ ์ข…๋ฅ˜ยท๊ฐ ์นธ์˜ ID๋ฅผ ํ•œ๊ณณ์— ๋ชจ์•„ ๋‘” ์„ค์ • ํŒŒ์ผ .claude/config/bmad/zenhub-conventions.yaml ์„ ์ž๋™์œผ๋กœ ๋งŒ๋“ค์–ด ์ค๋‹ˆ๋‹ค. (๋‹ค์Œ ๋ช…๋ น๋“ค์ด ๋งค๋ฒˆ ๋‹ค์‹œ ์กฐํšŒํ•˜์ง€ ์•Š๊ณ  ๋น ๋ฅด๊ฒŒ ์“ธ ์ˆ˜ ์žˆ๊ฒŒ ํ•ด ์ฃผ๋Š” ์ผ์ข…์˜ ์ฃผ์†Œ๋ก์ž…๋‹ˆ๋‹ค.)
  • ํ”„๋กœ์ ํŠธ์˜ .mcp.json ์— ZenHub ์—ฐ๊ฒฐ ์„ค์ •์ด ์ œ๋Œ€๋กœ ๋“ค์–ด ์žˆ๋Š”์ง€ ํ™•์ธํ•ด ์ค๋‹ˆ๋‹ค.
  • ๋งˆ์ง€๋ง‰์— "๋ฌด์—‡์ด ๋๋‚ฌ๊ณ , ๋ฌด์—‡์„ ์†์œผ๋กœ ๋” ํ•ด์•ผ ํ•˜๋Š”์ง€" ์ •๋ฆฌํ•œ ๋ณด๊ณ ์„œ๋ฅผ ๋ณด์—ฌ ์ค๋‹ˆ๋‹ค.

์ฐธ๊ณ : ZenHub์˜ ๊ธฐ์ˆ ์  ์ œ์•ฝ ๋•Œ๋ฌธ์— ์นธ์„ ์ง์ ‘ ์ง€์šฐ๊ฑฐ๋‚˜ ์ƒˆ๋กœ ์ถ”๊ฐ€ํ•˜๋Š” ์ž‘์—…์€ ์‚ฌ๋žŒ์ด ์†์œผ๋กœ ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋ช…๋ น์€ ์–ด๋””์„œ ๋ฌด์—‡์„ ๋ˆŒ๋Ÿฌ์•ผ ํ•˜๋Š”์ง€ ๋งํฌ์™€ ํ•จ๊ป˜ ์•ˆ๋‚ด๋งŒ ํ•ด ์ค๋‹ˆ๋‹ค.

์–ด๋–ป๊ฒŒ ์“ฐ๋‚˜์š”#

# ๊ธฐ๋ณธ โ€” ์ž‘์—… ๊ณต๊ฐ„ ID๋ฅผ .mcp.json์—์„œ ์ž๋™์œผ๋กœ ์ฝ์–ด ์˜ต๋‹ˆ๋‹ค
/zenhub:init-workspace

# ์ž‘์—… ๊ณต๊ฐ„ ID๋ฅผ ์ง์ ‘ ์ง€์ •ํ•  ๋•Œ
/zenhub:init-workspace --workspace-id 69c4c110fc3a90000f3387d9

--workspace-id ๋Š” ์ƒ๋žตํ•ด๋„ ๋ฉ๋‹ˆ๋‹ค. ์ƒ๋žตํ•˜๋ฉด ํ”„๋กœ์ ํŠธ์˜ .mcp.json ํŒŒ์ผ์—์„œ ID๋ฅผ ์•Œ์•„์„œ ์ฐพ์Šต๋‹ˆ๋‹ค.

์•ˆ์—์„œ ๋ฌด์Šจ ์ผ์ด ๋ฒŒ์–ด์ง€๋‚˜์š”#

  1. ํ˜„ํ™ฉ ์กฐํšŒ โ€” ์ง€๊ธˆ ์ž‘์—… ๋ณด๋“œ์— ์–ด๋–ค ์นธ๋“ค์ด ์žˆ๊ณ , ์–ด๋–ค ์ €์žฅ์†Œ๊ฐ€ ์—ฐ๊ฒฐ๋ผ ์žˆ๋Š”์ง€ ์ฝ์–ด ์˜ต๋‹ˆ๋‹ค.
  2. ํ‘œ์ค€๊ณผ ๋น„๊ต โ€” ํ˜„์žฌ ์นธ ๋ชฉ๋ก์„ ํ‘œ์ค€ 6์นธ๊ณผ ๊ฒฌ์ค˜์„œ ๋น ์ง„ ์นธ, ์ง€์›Œ์•ผ ํ•  Done ์นธ, ํ‘œ์ค€์— ์—†๋Š” ๋ณ„๋„ ์นธ์„ ๊ฐ€๋ ค๋ƒ…๋‹ˆ๋‹ค.
  3. ๋ถ„์„ ๋ณด๊ณ  โ€” "ํ˜„์žฌ ์ƒํƒœ / ์ถ”๊ฐ€๊ฐ€ ํ•„์š”ํ•œ ์ž‘์—…"์„ ํ‘œ๋กœ ๋ณด์—ฌ ์ค๋‹ˆ๋‹ค.
  4. Done ์นธ ์ •๋ฆฌ โ€” Done ์นธ์— ๋‚จ์€ ์ผ๊ฐ์„ ๋ชจ๋‘ ์™„๋ฃŒ(Closed) ์ฒ˜๋ฆฌํ•˜๊ณ , Done ์นธ ์ž์ฒด๋ฅผ ์ง€์šฐ๋Š” ๋ฐฉ๋ฒ•(์ฃผ์†Œ์™€ ํด๋ฆญ ์œ„์น˜)์„ ์•ˆ๋‚ดํ•ฉ๋‹ˆ๋‹ค.
  5. ์ผ๊ฐ ์ข…๋ฅ˜ ์กฐํšŒ โ€” EpicยทFeatureยทTaskยทBug ๊ฐ™์€ ์ผ๊ฐ ์œ ํ˜• ์ •๋ณด๋ฅผ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค.
  6. ์„ค์ • ํŒŒ์ผ ์ƒ์„ฑ โ€” ์œ„์—์„œ ๋ชจ์€ ID๋“ค์„ zenhub-conventions.yaml ํŒŒ์ผ๋กœ ์ €์žฅํ•ฉ๋‹ˆ๋‹ค.
  7. ์—ฐ๊ฒฐ ์„ค์ • ํ™•์ธ โ€” .mcp.json ์— ZenHub ์„ค์ •์ด ์žˆ๋Š”์ง€ ์ ๊ฒ€ํ•ฉ๋‹ˆ๋‹ค.
  8. ์™„๋ฃŒ ๋ณด๊ณ  โ€” ๋๋‚œ ์ผ๊ณผ ์‚ฌ๋žŒ์ด ์†์œผ๋กœ ํ•ด์•ผ ํ•  ๋‹ค์Œ ๋‹จ๊ณ„(๋น ์ง„ ์นธ ์ถ”๊ฐ€, Done ์นธ ์‚ญ์ œ, /dev:run ์‹œ์ž‘)๋ฅผ ์ •๋ฆฌํ•ด ๋ณด์—ฌ ์ค๋‹ˆ๋‹ค.

โš™๏ธ ์ƒ์„ธ ์˜ต์…˜ยท์‹คํ–‰ ๋ช…์„ธ (๊ฐœ๋ฐœ์ž / AI ์—์ด์ „ํŠธ์šฉ)

Triggers#

  • Right after adding a new GitHub repo to a ZenHub workspace
  • When you want to standardize workspace pipeline structure
  • Initial setup before starting development workflows like /dev:run

Context Trigger Pattern#

/zenhub:init-workspace [--workspace-id  < id > ]

Parameters#

ParameterRequiredDescriptionExample
--workspace-idOptionalWorkspace ID (reads from .mcp.json if omitted)69c4c110fc3a90000f3387d9

Standard Pipeline Structure#

After initialization, the workspace should contain only these pipelines:

New Issues โ†’ Icebox โ†’ Product Backlog โ†’ Sprint Backlog โ†’ In Progress โ†’ Review/QA
PipelinePurposeNotes
New IssuesNewly created issuesAuto-placement
IceboxOn hold/low priorityOptional
Product BacklogApproved backlogAfter triage
Sprint BacklogAssigned to current sprintDuring sprint planning
In ProgressWork in progressOn branch creation
Review/QACode review/QAOn PR creation

Done pipeline is not used. Issues auto-close via GitHub Closes # keyword on PR merge.

Execution Flow#

Step 1: Query Workspace Info#

const workspace = await mcp__zenhub__getWorkspacePipelinesAndRepositories();

Extract from query results:

  • workspace.pipelines โ†’ Current pipeline list
  • workspace.githubRepositories โ†’ Connected repo list (ํ•„๋“œ๋ช…: githubRepositories, repositories ์•„๋‹˜)
  • workspace.zenhubOrganization.id โ†’ Organization ID (setDatesForIssue ์˜ zenhubOrganizationId)

Step 2: Analyze Current Pipelines#

Compare current pipeline list with the standard structure:

const STANDARD_PIPELINES = [
   " New Issues " ,
   " Icebox " ,
   " Product Backlog " ,
   " Sprint Backlog " ,
   " In Progress " ,
   " Review/QA " 
 ];

const PIPELINES_TO_REMOVE = [ " Done " ];

const currentNames = workspace.pipelines.map(p = >   p.name);
const missing = STANDARD_PIPELINES.filter(name = >   !currentNames.includes(name));
const toRemove = workspace.pipelines.filter(p = >   PIPELINES_TO_REMOVE.includes(p.name));
const extra = currentNames.filter(name = > 
   !STANDARD_PIPELINES.includes(name)  & &   !PIPELINES_TO_REMOVE.includes(name)
);

Step 3: Analysis Report#

Report current state and required actions to the user:

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘  ZenHub Workspace Pipeline Analysis                           โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘                                                                โ•‘
โ•‘  Workspace: {workspace_id}                                     โ•‘
โ•‘  Repositories: {repo_names}                                    โ•‘
โ•‘                                                                โ•‘
โ•‘  Current Pipelines:                                            โ•‘
โ•‘  โœ… New Issues                                                 โ•‘
โ•‘  โœ… Product Backlog                                            โ•‘
โ•‘  โœ… In Progress                                                โ•‘
โ•‘  โœ… Review/QA                                                  โ•‘
โ•‘  โš ๏ธ  Done (needs removal)                                      โ•‘
โ•‘  โŒ Icebox (missing)                                           โ•‘
โ•‘  โŒ Sprint Backlog (missing)                                   โ•‘
โ•‘                                                                โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Step 4: Handle Done Pipeline#

When the Done pipeline exists:

  1. Check issues in the Done pipeline:
const doneIssues = await mcp__zenhub__getIssuesInPipeline({
  pipelineId: donePipeline.id
});
  1. Close issues if any exist (๋Œ€๋ฌธ์ž "CLOSED" โ€” ์†Œ๋ฌธ์ž "closed" ๋Š” enum ๊ฑฐ๋ถ€๋กœ false-success):
for (const issue of doneIssues) {
  // GitHub ๊ฐ€ source of truth โ€” ์ง์ ‘ ๋‹ซ๊ณ  ZenHub state ๋™๊ธฐํ™”
  await Bash(`gh issue close ${issue.number} --reason completed`);
  await mcp__zenhub__updateIssue({ issueId: issue.id, state:  " CLOSED "   });
}
// โš ๏ธ ํŒŒ์ดํ”„๋ผ์ธ ์‚ญ์ œ ์•ˆ๋‚ด(์•„๋ž˜) ์ „์— ์ „๋ถ€ CLOSED ์ธ์ง€ ์žฌํ™•์ธ โ€” ๋ฏธ์™„ ์ด์Šˆ๊ฐ€ ์ปฌ๋Ÿผ ์ œ๊ฑฐ์™€ ํ•จ๊ป˜ ์€๋‹‰๋˜์ง€ ์•Š๋„๋ก.
for (const issue of doneIssues) {
  const st = (await Bash(`gh issue view ${issue.number} --json state -q .state`)).trim();
  if (st !==  " CLOSED " ) throw new Error(`Done ์ด์Šˆ #${issue.number} ๋ฏธ์ข…๋ฃŒ โ€” ํŒŒ์ดํ”„๋ผ์ธ ์‚ญ์ œ ๋ณด๋ฅ˜`);
}
  1. Guide Done pipeline removal (๋ชจ๋“  Done ์ด์Šˆ๊ฐ€ CLOSED ๊ฒ€์ฆ๋œ ๋’ค์—๋งŒ):

The ZenHub MCP API does not support pipeline deletion. Please manually remove the Done pipeline at the following URL:

https://app.zenhub.com/workspaces/{workspace_id}/board
โ†’ Done pipeline header (...) โ†’ Delete pipeline

Step 5: Query and Cache Issue Types#

const issueTypes = await mcp__zenhub__getIssueTypes();

Step 6: Generate zenhub-conventions.yaml#

Generate a .claude/config/bmad/zenhub-conventions.yaml file at the project root to cache IDs:

Note: cc-product's BMAD Method workflow (/product:workflow-init) generates an analogous cache at bmad/zenhub-conventions.yaml (no .claude/config/ prefix) with a different schema (see plugins/cc-product/references/templates/zenhub-conventions-template.md). The two caches are independent โ€” this command does not read or write the cc-product path, and vice versa.

# Auto-generated by /zenhub:init-workspace
# Date: {current_date}

repository:
  id:  " {repo.id} " 
   owner:  " {repo_owner} " 
   name:  " {repo_name} " 

 organization:
  id:  " {workspace.organizationId} " 

 issue_types:
  epic:  " {epicType.id} " 
   feature:  " {featureType.id} " 
   task:  " {taskType.id} " 
   bug:  " {bugType.id} " 

 pipelines:
  new_issues:  " {newIssuesPipeline.id} " 
   icebox:  " {iceboxPipeline.id} " 
   product_backlog:  " {backlogPipeline.id} " 
   sprint_backlog:  " {sprintBacklogPipeline.id} " 
   in_progress:  " {inProgressPipeline.id} " 
   review_qa:  " {reviewQAPipeline.id} " 
   # Done pipeline not used โ€” Closed on PR merge

sprints:
  active:
    id:  " " 
     name:  " " 
   upcoming:
    id:  " " 
     name:  " " 

 issue_creation:
  method:  " github " 
   title_prefixes:
    epic:  " " 
     story:  " " 
     sub_task:  " " 
     bug:  " [Bug] " 

 last_updated:  " {ISO_8601_timestamp} "

Step 7: Verify .mcp.json#

Verify that ZenHub MCP configuration exists in the project root's .mcp.json:

// Read .mcp.json file
const mcpConfig = readFile( " .mcp.json " );

// Check zenhub server configuration
if (!mcpConfig.mcpServers?.zenhub) {
  // Need to create .mcp.json or add zenhub configuration
}

Step 8: Completion Report#

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘  Workspace Initialization Complete                             โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘                                                                โ•‘
โ•‘  โœ… Pipeline analysis complete                                 โ•‘
โ•‘  โœ… Done issues ({N}) โ†’ Closed                                 โ•‘
โ•‘  โš ๏ธ  Done pipeline manual removal needed (URL guided)          โ•‘
โ•‘  โœ… zenhub-conventions.yaml generated                          โ•‘
โ•‘  โœ… .mcp.json verification complete                            โ•‘
โ•‘                                                                โ•‘
โ•‘  ๐Ÿ“‹ Missing Pipelines:                                         โ•‘
โ•‘     โ†’ Manual addition needed in ZenHub Board: {missing_names}  โ•‘
โ•‘                                                                โ•‘
โ•‘  ๐Ÿ Next Steps:                                                โ•‘
โ•‘     1. Manually remove Done pipeline                           โ•‘
โ•‘     2. Manually add missing pipelines                          โ•‘
โ•‘     3. Start development with /dev:run                         โ•‘
โ•‘                                                                โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Completion Rules#

  • All issues in Done pipeline are Closed (automatic)
  • Done pipeline deletion is manual (MCP API limitation)
  • Missing pipeline addition is manual (MCP API limitation)
  • zenhub-conventions.yaml is auto-generated (ID caching)
  • Re-run after pipeline changes to refresh cache
CommandDescription
/zenhub:managePR linking and pipeline state management
/zenhub:epicEpic & Story creation
/dev:runFull development cycle automation