# Door Closing

> 2단계 — develop fetch, 워크트리 생성, 구현 계획 작성

- **Type:** Skill
- **Install:** `agentstack add skill-circui-try-circuit-door-closing`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [CIrcui-try](https://agentstack.voostack.com/s/circui-try)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [CIrcui-try](https://github.com/CIrcui-try)
- **Source:** https://github.com/CIrcui-try/Circuit/tree/main/.codex/skills/door-closing
- **Website:** https://circui-try.github.io/Circuit/

## Install

```sh
agentstack add skill-circui-try-circuit-door-closing
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# door-closing

Use this skill when the user asks to run the `door-closing` workflow.

## Command Template

작업 준비 2단계. develop을 fetch하고 워크트리를 만든 뒤 구현 계획(`plan.md`)을 디스크에 작성한다. **코드 변경·푸시는 하지 않는다.**

`$ARGUMENTS` 형식: ` [--force]`. 예: `/door-closing CIR-15`.

## 인자 파싱

1. `$ARGUMENTS` 에서 `--force` 분리. 첫 번째 토큰을 `` 로 사용.
2. `` 가 없으면 사용법 안내 후 중단.

## 상태 파일 경로

- `MAIN_REPO_ROOT = $(git rev-parse --path-format=absolute --git-common-dir | xargs dirname)`
- `STATE_FILE = $MAIN_REPO_ROOT/.codex/state/.json`
- `PLAN_FILE = $MAIN_REPO_ROOT/.codex/state/.plan.md`

## 자동 체이닝

호출 시 `` 의 상태 파일을 읽어 다음 순서로 실행:

1. `stages.boarding.done_at` 이 `null` 이거나 `--force` 가 주어졌으면 `/boarding  [--force]` 를 먼저 실행. 채워져 있으면 `boarding skipped (done at )` 한 줄만 출력.
2. 그 다음 본 단계 진행.

## 자기 단계 실행 절차

1. **스킵 판정**: `stages.door_closing.done_at` 이 채워져 있고 `--force` 가 없으면 한 줄 요약 출력 후 종료.
2. **메인 레포로 이동**: 워크트리 안이라면 `cd $MAIN_REPO_ROOT`.
3. **현재 작업 상태 확인**: `git status` 로 미커밋 변경사항이 있으면 사용자에게 알리고 계속할지 확인.
4. **develop 최신화**: `git checkout develop && git pull origin develop`. 충돌 시 사용자 위임 후 중단.
5. **브랜치명 결정**: 상태 파일의 `branch` 필드(boarding 단계가 채움) 사용. 비어있으면 Linear MCP `get_issue` 의 `gitBranchName` 으로 다시 채움.
6. **티켓 상태 동기화**: Linear 이슈가 `Done`/`Canceled` 가 아니면 상태를 `In Progress` 로 직접 변경한다.
7. **워크트리 생성**:
   - 워크트리 경로: `.codex/worktrees/` (메인 레포 기준 상대경로).
   - `git worktree add .codex/worktrees/ -b  develop`.
   - 동일 브랜치/경로가 이미 있으면:
     - `--force` 면 사용자에게 “기존 워크트리 삭제 후 재생성?” 확인 받고 `git worktree remove --force .codex/worktrees/` 후 재생성.
     - `--force` 가 없으면 기존 워크트리 재사용 (`git worktree add .codex/worktrees/ `).
8. **구현 계획 작성**: 워크트리 안에서 코드 탐색 후 `PLAN_FILE` 작성:

   ```markdown
   #  구현 계획

   ## 목표
   - 

   ## 변경 파일
   - `` — 
   - ...

   ## 구현 단계
   1. ...
   2. ...

   ## 테스트 전략
   - 

   ## 수락 기준 매핑
   - 

   ## 리스크 / 미해결 질문
   - ...
   ```

   탐색 폭이 넓으면 Explore 서브에이전트 1개에 위임.
9. **상태 파일 갱신**: `worktree_path`, `plan_path` 채우고 `stages.door_closing.done_at = `.
10. **요약 출력**: 워크트리 경로, 변경 파일 수, 구현 단계 수를 한두 문장으로 안내.

## 주의사항

- 워크트리 안에서 `git push`, `gh pr create` 등 원격 부수효과 금지.
- 코드 변경·커밋도 금지. 다음 단계 `/taxiing` 에서만 수행.
- `develop` / `main` 브랜치에 직접 커밋·푸시 금지.
- Linear 티켓 상태는 자동화에 위임하지 않고 직접 `Todo` → `In Progress` → `Done` 으로만 처리한다.
- `--force` 시 `PLAN_FILE` 을 덮어쓴다.

## Codex Invocation

Use this as a Codex project skill. Invoke `door-closing` with the issue id and flags as described above; treat the user text after the skill name as ``.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [CIrcui-try](https://github.com/CIrcui-try)
- **Source:** [CIrcui-try/Circuit](https://github.com/CIrcui-try/Circuit)
- **License:** MIT
- **Homepage:** https://circui-try.github.io/Circuit/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-circui-try-circuit-door-closing
- Seller: https://agentstack.voostack.com/s/circui-try
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
