deuk-agent-flow 4.0.37 → 5.0.2

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.
Files changed (78) hide show
  1. package/CHANGELOG.ko.md +282 -0
  2. package/CHANGELOG.md +788 -120
  3. package/LICENSE +0 -0
  4. package/README.ko.md +97 -17
  5. package/README.md +108 -25
  6. package/bin/deuk-agent-flow.js +11 -13
  7. package/bin/deuk-agent-rule.js +1 -1
  8. package/bundled/README.md +3 -0
  9. package/bundled/deuk-agent-flow.vsix +0 -0
  10. package/core-rules/AGENTS.md +30 -118
  11. package/docs/architecture.ko.md +155 -2
  12. package/docs/architecture.md +155 -2
  13. package/docs/assets/agentflow-panel-skills.png +0 -0
  14. package/docs/assets/agentflow-panel.png +0 -0
  15. package/docs/how-it-works.ko.md +109 -52
  16. package/docs/how-it-works.md +128 -71
  17. package/docs/principles.ko.md +68 -68
  18. package/docs/principles.md +68 -68
  19. package/docs/usage-guide.ko.md +251 -212
  20. package/package.json +41 -34
  21. package/scripts/bundle-vscode-vsix.ts +67 -0
  22. package/scripts/{cli-args.mjs → cli-args.ts} +49 -12
  23. package/scripts/cli-init-commands.ts +99 -0
  24. package/scripts/cli-init-logic.ts +46 -0
  25. package/scripts/{cli-prompts.mjs → cli-prompts.ts} +19 -34
  26. package/scripts/{cli-rule-compiler.mjs → cli-rule-compiler.ts} +128 -112
  27. package/scripts/cli-skill-commands.ts +707 -0
  28. package/scripts/{cli-telemetry-commands.mjs → cli-telemetry-commands.ts} +25 -22
  29. package/scripts/cli-ticket-command-shared.ts +4 -0
  30. package/scripts/cli-ticket-commands.ts +3723 -0
  31. package/scripts/cli-ticket-index.ts +283 -0
  32. package/scripts/{cli-ticket-migration.mjs → cli-ticket-migration.ts} +44 -68
  33. package/scripts/cli-ticket-parser.ts +100 -0
  34. package/scripts/{cli-usage-commands.mjs → cli-usage-commands.ts} +325 -326
  35. package/scripts/cli-utils.ts +1560 -0
  36. package/scripts/cli.ts +695 -0
  37. package/scripts/{lint-md.mjs → lint-md.ts} +32 -42
  38. package/scripts/lint-rules.ts +203 -0
  39. package/scripts/{merge-logic.mjs → merge-logic.ts} +44 -44
  40. package/scripts/{plan-parser.mjs → plan-parser.ts} +53 -53
  41. package/templates/MODULE_RULE_TEMPLATE.md +11 -11
  42. package/templates/PROJECT_RULE.md +46 -47
  43. package/templates/TICKET_TEMPLATE.ko.md +48 -44
  44. package/templates/TICKET_TEMPLATE.md +48 -44
  45. package/templates/project-memory.md +19 -0
  46. package/templates/project-pilot/CONFORMANCE_GATE_TEMPLATE.md +25 -23
  47. package/templates/project-pilot/DRIFT_CHECKLIST.md +27 -19
  48. package/templates/project-pilot/FLOW_CONTRACT_TEMPLATE.md +26 -26
  49. package/templates/project-pilot/IMPLEMENTATION_MATRIX_TEMPLATE.md +30 -30
  50. package/templates/project-pilot/INTEGRATION_CONTRACT_TEMPLATE.md +26 -26
  51. package/templates/project-pilot/OWNER_MAP_TEMPLATE.md +15 -15
  52. package/templates/project-pilot/PROJECT_PILOT_RULE_TEMPLATE.md +34 -34
  53. package/templates/project-pilot/REFACTOR_CONTRACT_TEMPLATE.md +32 -32
  54. package/templates/project-pilot/REMEDIATION_PLAN_TEMPLATE.md +33 -33
  55. package/templates/rules.d/deukcontext-mcp.md +31 -31
  56. package/templates/rules.d/platform-coexistence.md +29 -29
  57. package/templates/skills/context-recall/SKILL.md +3 -1
  58. package/templates/skills/doc-sync/SKILL.md +111 -0
  59. package/templates/skills/generated-file-guard/SKILL.md +3 -1
  60. package/templates/skills/persona-maid/SKILL.md +65 -0
  61. package/templates/skills/project-pilot/SKILL.md +13 -52
  62. package/templates/skills/safe-refactor/SKILL.md +3 -1
  63. package/templates/skills/ticket-status-surface/SKILL.md +17 -0
  64. package/core-rules/GEMINI.md +0 -7
  65. package/docs/badges/npm-downloads.json +0 -8
  66. package/scripts/cli-init-commands.mjs +0 -1750
  67. package/scripts/cli-init-logic.mjs +0 -64
  68. package/scripts/cli-skill-commands.mjs +0 -201
  69. package/scripts/cli-ticket-commands.mjs +0 -2427
  70. package/scripts/cli-ticket-index.mjs +0 -298
  71. package/scripts/cli-ticket-parser.mjs +0 -209
  72. package/scripts/cli-utils.mjs +0 -602
  73. package/scripts/cli.mjs +0 -256
  74. package/scripts/lint-rules.mjs +0 -196
  75. package/scripts/publish-dual-npm.mjs +0 -141
  76. package/scripts/smoke-npm-docker.mjs +0 -102
  77. package/scripts/smoke-npm-local.mjs +0 -109
  78. package/scripts/update-download-badge.mjs +0 -103
package/LICENSE CHANGED
File without changes
package/README.ko.md CHANGED
@@ -2,10 +2,10 @@
2
2
  <br />
3
3
  <img src="docs/assets/architecture-v3.png" width="800" alt="DeukAgentFlow Architecture" />
4
4
  <br />
5
- <h1>Deuk Agent Flow v4.0.37</h1>
5
+ <h1>Deuk Agent Flow v5.0.2</h1>
6
6
  <p>
7
7
  <a href="https://www.npmjs.com/package/deuk-agent-flow"><img src="https://img.shields.io/npm/v/deuk-agent-flow.svg?label=deuk-flow" alt="deuk-flow npm version" /></a>
8
- <a href="https://www.npmjs.com/package/deuk-agent-flow"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fjoygram%2FDeukAgentFlow%2Fmaster%2Fdocs%2Fbadges%2Fnpm-downloads.json" alt="deuk-flow combined npm downloads" /></a>
8
+ <a href="https://www.npmjs.com/package/deuk-agent-flow"><img src="https://img.shields.io/npm/dm/deuk-agent-flow.svg?label=downloads" alt="deuk-agent-flow npm downloads" /></a>
9
9
  </p>
10
10
  <p><b>AI 코딩 작업이 대화창 밖으로 흘러내리지 않게.</b></p>
11
11
  <p><i>"다음", "진행", "정리"처럼 짧게 말해도 티켓, 범위, 검증, 기억이 레포에 붙어 있게 만듭니다.</i></p>
@@ -19,7 +19,7 @@
19
19
 
20
20
  대부분의 에이전트 설정은 "지침"에서 멈춥니다. Deuk Agent Flow는 짧은 대화를 작업 루프로 바꿉니다: 티켓, 범위, 실행, 검증, 보관. 긴 명령을 외우지 않아도 `AGENTS.md`, Copilot instructions, Cursor rules, Claude skills 같은 표면을 같은 흐름으로 묶습니다.
21
21
 
22
- 후킹 포인트는 단순합니다. 사용자가 "다음", "원인", "정리"라고만 해도 현재 에이전트가 그 의미를 붙잡을 레포 소유의 장소가 생깁니다. 진행 중인 작업은 `.deuk-agent/tickets/`에, 결정과 계획과 완료 근거는 코드베이스 옆에 남습니다. **Deuk Agent Flow**는 워크플로우 계층입니다. 이 흐름 전체에 별도 companion 제품인 **Deuk AgentContext**를 꽂으면 레포 전체가 확장된 프로젝트 브레인을 얻습니다. 검색 가능한 기억, 재사용되는 결정, 다음 에이전트가 실제로 쓰는 팀 패턴까지 붙습니다.
22
+ 후킹 포인트는 단순합니다. 사용자가 "다음", "원인", "정리"라고만 해도 현재 에이전트가 그 의미를 붙잡을 레포 소유의 장소가 생깁니다. 진행 중인 작업은 `~/.deuk/tickets/`에, 결정과 계획과 완료 근거는 코드베이스 옆에 남습니다. **Deuk Agent Flow**는 워크플로우 계층입니다. 이 흐름 전체에 별도 companion 제품인 **Deuk AgentContext**를 꽂으면 레포 전체가 확장된 프로젝트 브레인을 얻습니다. 검색 가능한 기억, 재사용되는 결정, 다음 에이전트가 실제로 쓰는 팀 패턴까지 붙습니다.
23
23
 
24
24
  ### 왜 지금인가
25
25
 
@@ -66,7 +66,7 @@ Deuk Agent Flow
66
66
  | 팀 기억 강화 | 완료된 작업이 검색 가능한 프로젝트 히스토리가 됨 |
67
67
 
68
68
  > **현재 배포 기준:**
69
- > v4.0.37에이전트 기반 리포지토리에 배포해 사용할 있는 상태입니다. 대화형 `init`은 이제 workspace 용도만 묻고, 나머지 설정은 프로젝트 디렉터리 성격으로 추론하며, Deuk AgentContext MCP 선택지는 설정에서 숨김 처리하고, 이전의 다중 질문/먹통 완료 실패를 피합니다. 이제 설치가 끝나면 완료 피드백과 짧은 사용 가이드도 다시 보입니다. 티켓 생성/사용 뒤에도 승인 요청 전에 클릭 가능한 `Ticket start` 줄이 계속 보이도록 했습니다. 현재는 **OpenAI Codex**와 **GitHub Copilot** 환경에서 가장 안정적으로 동작합니다. Cursor, Windsurf, Claude Code 포인터 구조로 지원하지만, 워크스페이스별 검증을 권장합니다. Deuk AgentContext MCP는 선택형 기억 계층이며, MCP 서버 등록은 `init`에 딸려 들어가지 않고 별도로 설정합니다.
69
+ > v5.0.0내부 시스템 전면 개편 메이저 릴리스입니다. 전역 저장소가 `~/.deuk/tickets/{uuid}/` (홈 기반)으로 이전되어 멀티 워크스페이스 공존·세션 인계가 가능합니다(기존 `~/.deuk-agent/`는 자동 마이그레이션 [업그레이드 가이드](#-50-업그레이드--홈-디렉토리-마이그레이션) 참고). XState 기반 티켓 워크플로 엔진과 VS Code Flow UI(배포)가 도입되었고, 스킬 시스템과 persona-maid·doc-sync 스킬이 디렉토리로 통합되었습니다. **Claude Code** 환경에 최적화되어 있으며, Deuk AgentContext MCP는 선택형 기억 계층으로 `init`과 별도로 설정합니다.
70
70
  > **아키텍처 기반:**
71
71
  > 거대하고 무거운 레거시 `.cursorrules` 방식을 공식적으로 폐기했습니다. v3.0은 `AGENTS.md`를 단일 진실 공급원으로 사용하는 **Hub-Spoke 모델**을 도입하여, IDE별 규칙은 얇은 진입점 포인터 역할만 수행합니다.
72
72
 
@@ -82,6 +82,7 @@ Deuk Agent Flow는 AI 에이전트가 코드를 분석하고 작성하는 흐름
82
82
  2. **티켓 주도 워크플로우 (TDW: Ticket-Driven Workflow)**
83
83
  - 계획(Plan) → 실행(Execute) → 검증(Verify) → 보관(Archive)의 분명한 라이프사이클로 작업을 이끕니다.
84
84
  - 활성화된 티켓(`ACTIVE_TICKET.md`)을 중심으로 변경을 연결해 범위와 진행 상태가 계속 보이게 합니다.
85
+ - CLI가 소유하는 workflow state table로 phase transition을 계산하고, DocMeta 기반 compact action surface를 에이전트에게 제공합니다.
85
86
 
86
87
  3. **플랫폼 공존 및 모드 인지형 게이트 (Mode-Aware Workflow Gate)**
87
88
  - 에이전트의 현재 모드(Plan Mode vs. Execute Mode)를 인지하여, Plan Mode에서는 분석과 구현 계획서(Artifacts) 작성에 집중하도록 APC를 적용합니다.
@@ -111,21 +112,76 @@ Karpathy식 skill은 한 작업 안에서 에이전트의 행동을 더 좋게
111
112
 
112
113
  둘을 함께 쓰면 skill은 작업 수행 품질을 끌어올리고, Deuk Agent Flow는 그 결과를 팀 흐름에 연결합니다. 앞단에서는 행동 playbook이 작동하고, 뒷단에서는 티켓 생명주기와 DeukAgentContext 기억 계층이 남습니다.
113
114
 
114
- ### 다음 개선 방향
115
+ ### 로드맵
115
116
 
116
- 다음 단계는 워크플로우를 보이고 쉽게 도입하게 만드는 것입니다. 실행 점검을 더 명확히 하고, CLI/RAG 결과에 짧은 재각인 신호를 붙이며, README/npm 포지셔닝을 강화하고, active ticket, phase, open ticket count, DeukAgentContext memory status보여주는 companion 표면을 준비하는 방향입니다. 목표는 팀이 쓰는 코딩 에이전트를 바꾸지 않고도 같은 작업 규율을 자연스럽게 얻는 것입니다.
117
+ **v5.0에서 배포됨** companion 표면이 도착했습니다: VS Code **Flow UI**(배포)가 사이드바에서 active ticket·phase·open ticket count를 보여줍니다. 전역 저장소가 디렉토리(`~/.deuk`)로 이전되어 워크스페이스 연속성이 확보됐고, 스킬 시스템(페르소나·doc-sync 포함)이 통합·홈 동기화됐습니다.
118
+
119
+ **다음** — 티켓 DocMeta 갱신 경로 안정화, DeukAgentContext 기억 연동 심화(phase/memory status 표면 강화), 모든 CLI·티켓 표면이 완전 현지화되도록 i18n 커버리지 확대. 목표는 그대로입니다 — 팀이 쓰는 코딩 에이전트를 바꾸지 않고도 같은 작업 규율을 얻는 것.
117
120
 
118
121
  ### 📚 상세 문서
119
122
  | 문서 | 용도 |
120
123
  |---|---|
121
124
  | [docs/usage-guide.ko.md](docs/usage-guide.ko.md) | **[추천]** 실전 배포 및 단계별 사용 가이드 |
125
+ | [docs/skills-guide.ko.md](docs/skills-guide.ko.md) | **v5.0 신규:** 스킬 시스템·페르소나 사용법·Flow UI 가이드 |
126
+ | [Flow UI 가이드](docs/skills-guide.ko.md#4-vs-code-flow-ui-agentflow-panel) | AgentFlow Panel — 워크스페이스·스킬 탭, 핸드오프, 활용 팁 |
122
127
  | [docs/architecture.ko.md](docs/architecture.ko.md) | 고수준 시스템 구조 및 시각적 인포그래픽 |
123
- | [docs/how-it-works.ko.md](docs/how-it-works.ko.md) | 상세 CLI 메커니즘, 초기화 생명주기 및 파일 역할 |
128
+ | [docs/how-it-works.ko.md](docs/how-it-works.ko.md) | 상세 CLI 메커니즘, ticket workflow 런타임, 초기화 생명주기 및 파일 역할 |
124
129
  | [docs/principles.ko.md](docs/principles.ko.md) | 설계 철학: Hub-Spoke, Zero-Legacy, 소스 주권 |
125
130
  | **English Docs** | [README.md](README.md) · [docs/architecture.md](docs/architecture.md) |
126
131
 
127
132
  ---
128
133
 
134
+ ## 🧩 VS Code 확장 — AgentFlow Panel
135
+
136
+ > **v5.0 신규 (첫 배포)** — AgentFlow Panel을 설치하면 VS Code 사이드패널에서 티켓 워크플로우 전체를 제어할 수 있습니다. 터미널 전환 불필요. 티켓이 `~/.deuk/tickets/`에 저장되어 워크스페이스 간 연속성이 보장됩니다.
137
+
138
+ <p align="center">
139
+ <img src="docs/assets/agentflow-panel.png" width="360" alt="AgentFlow Panel — VS Code 보조 사이드바의 티켓 목록" />
140
+ <br /><em>AgentFlow Panel — Workspace 탭의 티켓 목록·상태 필터·활성 티켓 chip.</em>
141
+ </p>
142
+
143
+ ### 워크플로에 UI를 활용하면 좋은 점
144
+
145
+ CLI 티켓 명령만으로도 워크플로를 돌릴 수 있지만, Flow UI를 곁들이면 **컨텍스트 전환 비용**이 크게 줄어듭니다.
146
+
147
+ | 상황 | CLI만 | Flow UI 활용 |
148
+ |---|---|---|
149
+ | 지금 어떤 티켓이 열려 있나? | `ticket status` 입력 | 사이드바에서 항상 노출 |
150
+ | 다른 티켓으로 넘어가기 | id 외워서 `ticket use` | 목록 클릭 한 번 |
151
+ | AI 챗에 컨텍스트 전달 | 수동 복사·붙여넣기 | **핸드오프** 버튼 → 클립보드 바로 복사 |
152
+ | 스킬 ON/OFF 조절 | `skill expose/unexpose` | 토글 클릭, 플랫폼별 개별 제어 |
153
+ | 티켓 상태·phase 변경 | `ticket move` 명령 | **상태 변경** 버튼 → 다이얼로그 |
154
+
155
+ > 터미널을 닫지 않아도 되고, 명령어를 외울 필요도 없습니다. 에이전트가 작업 중일 때 **사이드바로 흐름을 모니터링**하면서 필요한 시점에만 개입할 수 있습니다.
156
+ >
157
+ > → 상세 사용법: [Flow UI 가이드](docs/skills-guide.ko.md#4-vs-code-flow-ui-agentflow-panel)
158
+
159
+ ---
160
+
161
+ | 기능 | 설명 |
162
+ |---|---|
163
+ | **티켓 목록** | 1행 고밀도 포맷: 파일명 · m/s · phase · priority · 본문 스니펷 · 날짜 |
164
+ | **상태 필터** | Open / Close / All + 툴바에 활성 티켓 ID 강조 chip |
165
+ | **검색 팝업** | id·title·summary·body 전문 실시간 검색 |
166
+ | **미리보기 패널** | 파일명 + phase/priority + **open** 단쳐를 1줄로 표시 |
167
+ | **Copy handoff** | textarea 옆 고정 버튼 — `id / title / phase·status·priority / summary / continue ticket`을 클립보드에 복사, AI 챗에 바로 붙여넣기 |
168
+ | **멀티 워크스페이스** | 워크스페이스 셀렉터; 중첩 워크스페이스 탐지는 agent-rule 경계에서 자동 중단 |
169
+
170
+ ### 설치
171
+
172
+ ```bash
173
+ # 소스 빌드
174
+ cd /path/to/DeukAgentFlow
175
+ npm run bundle:vscode
176
+ npm run install:vscode
177
+ ```
178
+
179
+ `npm run install:vscode`는 번들된 VSIX를 데스크톱 VS Code와 VS Code Server에 함께 설치하고, 오래된 `deukpack.deuk-agent-flow-*` 폴더를 정리한 뒤, AgentFlow 관련 workspace webview 상태를 백업 후 초기화해 여러 workspace에 남아 있던 오래된 패널 상태가 다시 살아나지 않도록 합니다.
180
+
181
+ 또는 [releases 페이지](https://github.com/joygram/DeukAgentFlow/releases)에서 최신 `deuk-agent-flow.vsix`를 다운로드하고 **Extensions → Install from VSIX…** 로 설치하세요.
182
+
183
+ ---
184
+
129
185
  ## 🚀 빠른 시작 (Quick Start)
130
186
 
131
187
  가장 빠르게 Deuk Agent Flow를 현재 작업 프로젝트에 도입하는 방법입니다.
@@ -142,7 +198,7 @@ deuk-agent-flow init
142
198
 
143
199
  이후 일상 작업은 명령을 직접 치기보다 에이전트에게 짧게 말합니다. 예: "진행", "다음", "원인 다시 파악".
144
200
 
145
- 단일 저장소라면 해당 저장소 루트에서 `deuk-agent-flow init`을 실행합니다. 여러 DeukAgentFlow 프로젝트를 포함한 루트 워크스페이스라면 그 워크스페이스 루트에서 같은 명령을 실행합니다. `init`은 루트 포인터와 자체 `PROJECT_RULE.md` / `.deuk-agent/` 상태를 가진 하위 워크스페이스를 함께 갱신합니다.
201
+ 단일 저장소라면 해당 저장소 루트에서 `deuk-agent-flow init`을 실행합니다. 여러 DeukAgentFlow 프로젝트를 포함한 루트 워크스페이스라면 그 워크스페이스 루트에서 같은 명령을 실행합니다. `init`은 루트 포인터와 자체 `PROJECT_RULE.md` / `.deuk-workspace-id` 마커를 가진 하위 워크스페이스를 함께 갱신합니다.
146
202
 
147
203
  이렇게 사용하면 효과가 극대화됩니다. workspace 루트는 공통 진입점, 각 프로젝트 루트는 독립 티켓/규칙/검증 단위로 나누고, 중첩 서버나 앱은 필요할 때 별도 프로젝트로 초기화하세요.
148
204
 
@@ -169,7 +225,7 @@ deuk-agent-flow init
169
225
 
170
226
  단일 저장소라면 해당 저장소 루트에서 `deuk-agent-flow init`을 실행합니다.
171
227
 
172
- 여러 DeukAgentFlow 프로젝트를 포함한 루트 워크스페이스라면 그 워크스페이스 루트에서 같은 명령을 실행합니다. `init`은 루트 포인터와 자체 `PROJECT_RULE.md` / `.deuk-agent/` 상태를 가진 하위 워크스페이스를 함께 갱신하므로, 일반 사용자도 새 패키지 버전을 설치한 뒤 자신의 개인 워크스페이스 루트에서 AI agent rule을 갱신할 수 있습니다.
228
+ 여러 DeukAgentFlow 프로젝트를 포함한 루트 워크스페이스라면 그 워크스페이스 루트에서 같은 명령을 실행합니다. `init`은 루트 포인터와 자체 `PROJECT_RULE.md` / `.deuk-workspace-id` 마커를 가진 하위 워크스페이스를 함께 갱신하므로, 일반 사용자도 새 패키지 버전을 설치한 뒤 자신의 개인 워크스페이스 루트에서 AI agent rule을 갱신할 수 있습니다.
173
229
 
174
230
  사용하는 AI client 선택은 한 번으로 고정되지 않습니다. 나중에 다른 client를 쓰게 되면 `deuk-agent-flow init`을 다시 실행하고 추가할 AI client를 선택하면 됩니다.
175
231
 
@@ -210,13 +266,35 @@ npm run publish:dry
210
266
  npm run smoke:npm:docker
211
267
  ```
212
268
 
213
- 배포 후 필요하면 통합 다운로드 배지를 갱신합니다.
214
269
 
215
- ```bash
216
- npm run badge:downloads
217
- ```
270
+ ---
271
+
272
+ ## 🔄 5.0 업그레이드 — 홈 디렉토리 마이그레이션
273
+
274
+ **5.0은 전역 저장소를 `~/.deuk-agent/`에서 `~/.deuk/`로 옮깁니다.** 자동·멱등·자가치유 방식이라 `init`마다, 그리고 업그레이드 후 첫 티켓 명령에서 실행됩니다. 보통은 아무것도 안 하셔도 됩니다.
275
+
276
+ **동작 방식 (`ensureWorkspaceMigrated`):**
277
+ - **레거시만 있을 때** → `~/.deuk/`로 이름 변경(빠른 경로). 이름 변경이 실패하면(다른 에이전트가 디렉토리를 점유, `EBUSY`/`EPERM` 등) 재귀 복사로 폴백하고 **원본 `~/.deuk-agent/`는 그대로 보존**합니다.
278
+ - **둘 다 있을 때**(복사 후 잔여물) → `~/.deuk/`에 실제 데이터가 있는 것을 확인한 **후에만** 레거시 디렉토리를 제거하고, 이후 실행마다 재시도합니다.
279
+ - **안전장치** → `~/.deuk/`가 비어 있으면 레거시 디렉토리를 **절대** 삭제하지 않습니다(미완성 복사로 인한 데이터 유실 방지).
280
+
281
+ **수동 복구 (자동 마이그레이션이 완료되지 않은 경우):**
282
+
283
+ 1. **무엇이 있는지 확인** — 티켓이 최우선입니다:
284
+ ```bash
285
+ ls -la ~/.deuk/tickets ~/.deuk-agent/tickets 2>/dev/null
286
+ ```
287
+ 2. **`~/.deuk/`가 비었거나 없고 `~/.deuk-agent/`에 데이터가 있을 때** → 원본을 백업으로 남긴 채 직접 복사:
288
+ ```bash
289
+ cp -r ~/.deuk-agent ~/.deuk
290
+ ```
291
+ 3. **둘 다 있고 `~/.deuk/`에 최신 티켓이 있을 때** → 레거시는 오래된 잔여물입니다. `~/.deuk/`가 올바른지 확인한 뒤 제거:
292
+ ```bash
293
+ rm -rf ~/.deuk-agent
294
+ ```
295
+ 4. **티켓 명령을 다시 실행**(예: `deuk-agent-flow rules ticket --workspace <id>`) — 자가치유 패스가 남은 잔여물을 자동으로 정리합니다.
218
296
 
219
- 배지는 표기상 `deuk-flow`를 사용하되, `deuk-agent-flow`와 `deuk-agent-rule` 다운로드 수를 같은 total에 합산합니다.
297
+ > ⚠️ `~/.deuk/`가 비어 있는 동안 `~/.deuk-agent/`를 절대 삭제하지 마세요 과거 티켓의 유일한 사본입니다. 자동 안전장치도 이를 거부하니, 수동 작업 시에도 동일하게 지키세요.
220
298
 
221
299
  ---
222
300
 
@@ -224,7 +302,7 @@ npm run badge:downloads
224
302
 
225
303
  워크플로우는 **티켓 기반 실행 계약(Ticket-Driven Execution Contract)**에 의해 통제됩니다.
226
304
 
227
- 1. **스캐폴딩 (Scaffolding)**: `init` 명령어가 `AGENTS.md`와 `PROJECT_RULE.md` 같은 로컬 포인터를 배치합니다. 런타임 템플릿은 `.deuk-agent/templates/`가 아니라 패키지의 `templates/`를 단일 진실 공급원으로 사용합니다.
305
+ 1. **스캐폴딩 (Scaffolding)**: `init` 명령어가 `AGENTS.md`와 `PROJECT_RULE.md` 같은 로컬 포인터를 배치합니다. 런타임 템플릿은 워크스페이스별 복사본이 아니라 패키지의 `templates/`를 단일 진실 공급원으로 사용합니다.
228
306
  2. **티켓팅 (Plan Phase)**: 사용자가 짧게 지시하면 에이전트가 맥락을 읽고 내부 작업 지시서를 생성합니다. 이때 에이전트는 Plan Mode로 동작하며 코드를 수정할 수 없고 계획 수립에만 집중합니다.
229
307
  3. **실행 (Execute Phase)**: 사용자의 승인을 받은 후, 에이전트는 **타겟 서브모듈**에 고정되어 실질적인 코드 작성을 수행합니다. MCP Soft Gate가 인가되지 않은 파일의 수정을 감시합니다.
230
308
  4. **검증 (Verify Phase)**: 개발 작업 종료 전 사이드 이펙트 감사(Audit) 및 컨벤션(DC-DUP 등 아키텍처 규칙) 체크를 수행합니다.
@@ -246,7 +324,7 @@ npm run badge:downloads
246
324
 
247
325
  ### 티켓 파일 깃 관리 원칙
248
326
 
249
- - `.deuk-agent/tickets/**/*.md`와 `INDEX*.json`은 CLI가 바꾼 결과만 반영합니다.
327
+ - `~/.deuk/tickets/**/*.md`와 `INDEX*.json`은 CLI가 바꾼 결과만 반영합니다.
250
328
  - 티켓 본문만 커밋하고 index를 빼먹지 마세요. 다음 작업에서 상태가 맞지 않을 수 있습니다.
251
329
  - 생성이 실패한 뒤 티켓 파일을 손으로 만들거나 frontmatter로 상태를 바로 바꾸지 마세요.
252
330
  - `telemetry.jsonl`은 보통 실행 로그이므로 일반 코드 커밋에는 넣지 않는 편이 낫습니다.
@@ -272,7 +350,7 @@ first-party skill MVP는 이 경계를 명확히 유지합니다. skill은 반
272
350
 
273
351
  스킬 제공 방식:
274
352
 
275
- - `init` 전체 first-party skill 템플릿이 `.deuk-agent/skill-templates/`로 동기화됩니다.
353
+ - 스킬 소스는 패키지 `templates/skills/` 단일 진실 공급원에 있으며 `~/.deuk/skills/`(및 `~/.claude/skills/` 같은 네이티브 대상)로 동기화됩니다.
276
354
  - 기본 추천 장착: `safe-refactor`, `generated-file-guard`.
277
355
  - 선택 장착: `context-recall`, `project-pilot`.
278
356
 
@@ -284,6 +362,7 @@ first-party skill MVP는 이 경계를 명확히 유지합니다. skill은 반
284
362
  | `generated-file-guard` | 기본 추천: generated output 직접 수정 방지 |
285
363
  | `context-recall` | 선택: 과거 티켓/결정/실패 패턴 재사용 |
286
364
  | `project-pilot` | 선택: cross-language, protocol, generated/runtime drift 정리 |
365
+ | `persona-maid` | 선택: 친절하고 애교 넘치지만 실력은 확실한 메이드 페르소나 (정식 배포 시 기본 비활성, 수동 장착 필요) |
287
366
 
288
367
  ```bash
289
368
  npx deuk-agent-flow init
@@ -291,6 +370,7 @@ npx deuk-agent-flow skill list
291
370
  npx deuk-agent-flow skill add --skill safe-refactor
292
371
  npx deuk-agent-flow skill add --skill generated-file-guard
293
372
  npx deuk-agent-flow skill add --skill project-pilot
373
+ npx deuk-agent-flow skill add --skill persona-maid
294
374
  npx deuk-agent-flow skill expose --platform claude
295
375
  ```
296
376
 
package/README.md CHANGED
@@ -2,10 +2,10 @@
2
2
  <br />
3
3
  <img src="docs/assets/architecture-v3.png" width="800" alt="DeukAgentFlow Architecture" />
4
4
  <br />
5
- <h1>Deuk Agent Flow v4.0.37</h1>
5
+ <h1>Deuk Agent Flow v5.0.2</h1>
6
6
  <p>
7
7
  <a href="https://www.npmjs.com/package/deuk-agent-flow"><img src="https://img.shields.io/npm/v/deuk-agent-flow.svg?label=deuk-flow" alt="deuk-flow npm version" /></a>
8
- <a href="https://www.npmjs.com/package/deuk-agent-flow"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fjoygram%2FDeukAgentFlow%2Fmaster%2Fdocs%2Fbadges%2Fnpm-downloads.json" alt="deuk-flow combined npm downloads" /></a>
8
+ <a href="https://www.npmjs.com/package/deuk-agent-flow"><img src="https://img.shields.io/npm/dm/deuk-agent-flow.svg?label=downloads" alt="deuk-agent-flow npm downloads" /></a>
9
9
  </p>
10
10
  <p><b>Stop losing AI coding work between chats.</b></p>
11
11
  <p><i>Say "next" or "ship it"; Deuk Agent Flow keeps the ticket, scope, verification, and memory attached to your repo.</i></p>
@@ -19,7 +19,7 @@
19
19
 
20
20
  Most agent setups stop at instructions. Deuk Agent Flow turns short chat into an operating loop: ticket, scope, execute, verify, archive. It keeps `AGENTS.md`, Copilot instructions, Cursor rules, Claude skills, and related agent surfaces aligned without asking you to type long commands.
21
21
 
22
- The hook is simple: you can say "next", "inspect", or "clean this up", and the current agent has a repo-owned place to know what that means. Active work lives in `.deuk-agent/tickets/`; decisions, plans, and closeout evidence stay with the codebase instead of vanishing into a chat transcript. **Deuk Agent Flow** is the workflow layer. Plug that flow into the separate companion product **Deuk AgentContext**, and the whole repo gains an expanded project brain: searchable memory, reusable decisions, and team patterns the next agent can actually use.
22
+ The hook is simple: you can say "next", "inspect", or "clean this up", and the current agent has a repo-owned place to know what that means. Active work lives in `~/.deuk/tickets/`; decisions, plans, and closeout evidence stay with the codebase instead of vanishing into a chat transcript. **Deuk Agent Flow** is the workflow layer. Plug that flow into the separate companion product **Deuk AgentContext**, and the whole repo gains an expanded project brain: searchable memory, reusable decisions, and team patterns the next agent can actually use.
23
23
 
24
24
  ### Why Now
25
25
 
@@ -66,7 +66,7 @@ Repo-owned work
66
66
  | Better team memory | Completed work becomes searchable project history |
67
67
 
68
68
  > **Current readiness:**
69
- > v4.0.37 is deployment-ready for agent-driven repositories. Interactive `init` now asks only the workspace purpose, infers the remaining setup from the project directory, hides the Deuk AgentContext MCP choice during first setup, completes without the earlier multi-prompt stall, and ends with a visible completion line plus a short first-use prompt guide. Ticket creation/use also keeps the clickable `Ticket start` line visible before approval is requested. It is currently most reliable in **OpenAI Codex** and **GitHub Copilot** workflows. Cursor, Windsurf, and Claude Code remain supported through pointer-style integration, but they should be validated per workspace before rollout. Deuk AgentContext MCP is an optional memory layer; MCP server registration is separate from `init`.
69
+ > v5.0.0 is a major release a full internal overhaul. The global store moved to `~/.deuk/tickets/{uuid}/` (home-based) for multi-workspace co-existence and session takeover (existing `~/.deuk-agent/` is migrated automatically see the [upgrade guide](#-upgrading-to-50--home-directory-migration) above). It introduces an XState-based ticket workflow engine and the VS Code Flow UI (first release), and consolidates the skill system plus the persona-maid and doc-sync skills into the home directory. It is optimized for **Claude Code**; Deuk AgentContext MCP is an optional memory layer registered separately from `init`.
70
70
  > **Architecture foundation:**
71
71
  > We have officially deprecated monolithic `.cursorrules`. v3.0 introduces the **Hub-Spoke model** where `AGENTS.md` is the single source of truth, and IDE-specific rules act as thin entry-point pointers.
72
72
 
@@ -81,7 +81,8 @@ Deuk Agent Flow brings four core capabilities to day-to-day AI engineering:
81
81
 
82
82
  2. **Ticket-Driven Workflow (TDW)**
83
83
  - Guides work through a clear lifecycle: Plan → Execute → Verify → Archive.
84
- - Keeps changes connected to an active ticket in `.deuk-agent/tickets/`, so scope and progress stay visible.
84
+ - Keeps changes connected to an active ticket in `~/.deuk/tickets/`, so scope and progress stay visible.
85
+ - Uses a CLI-owned workflow state table to resolve phase transitions and emit DocMeta-backed compact action surfaces for the agent.
85
86
 
86
87
  3. **Platform Co-existence & Mode-Aware Workflow Gate**
87
88
  - Uses strong Agent Permission Contracts (APC) through a **Mode-Aware** workflow.
@@ -94,15 +95,15 @@ Deuk Agent Flow brings four core capabilities to day-to-day AI engineering:
94
95
 
95
96
  ### Why Not Just Instructions?
96
97
 
97
- The agent tooling space already has useful building blocks: `AGENTS.md`, GitHub Copilot instructions, Cursor rules, Claude skills, agent launchers, and general LLM guardrail frameworks. Deuk Agent Flow is positioned one layer above plain instruction sync: it turns those surfaces into a ticketed repository workflow.
98
+ The agent tooling space already has useful building blocks: `AGENTS.md`, GitHub Copilot instructions, Cursor rules, Claude skills, agent launchers, and general LLM policy frameworks. Deuk Agent Flow is positioned one layer above plain instruction sync: it turns those surfaces into a ticketed repository workflow.
98
99
 
99
100
  | Similar approach | What it helps with | Deuk Agent Flow adds |
100
101
  |---|---|---|
101
- | `AGENTS.md` open format | A predictable instruction file for coding agents | Ticket lifecycle, phase gates, verification, and archiveable memory |
102
+ | `AGENTS.md` open format | A predictable instruction file for coding agents | Ticket workflow, phase gates, verification, and archiveable memory |
102
103
  | Copilot instructions / Cursor rules / Claude memory | Tool-specific guidance | One repo-owned workflow shared across agent clients |
103
104
  | Claude or Copilot custom agents and skills | Reusable task playbooks | Skills route into scoped, ticketed execution instead of replacing the workflow |
104
- | Agent launchers and harnesses | Running many coding agents from one place | Lifecycle control inside the repository, independent of the chosen agent |
105
- | General LLM/MCP guardrails | Runtime policy checks for AI systems | Developer-facing work orders, scope contracts, Git-visible history, and closeout evidence |
105
+ | Agent launchers and harnesses | Running many coding agents from one place | Workflow control inside the repository, independent of the chosen agent |
106
+ | General LLM/MCP policy checks | Runtime policy checks for AI systems | Developer-facing work orders, scope contracts, Git-visible history, and closeout evidence |
106
107
 
107
108
  Use Deuk Agent Flow when you want AI coding work to stay coordinated, reviewable, and easy to carry forward across sessions and teammates.
108
109
 
@@ -110,23 +111,79 @@ Use Deuk Agent Flow when you want AI coding work to stay coordinated, reviewable
110
111
 
111
112
  Karpathy-style skills are great at improving how an agent behaves inside a task. Deuk Agent Flow is great at making that task ticketed, scoped, verified, and remembered at the repository level.
112
113
 
113
- Used together, skills can improve the quality of the move, while Deuk Agent Flow keeps the move connected to team workflow. The result is a better session and a better project record: behavior playbooks on the front end, ticket lifecycle and DeukAgentContext memory on the back end.
114
+ Used together, skills can improve the quality of the move, while Deuk Agent Flow keeps the move connected to team workflow. The result is a better session and a better project record: behavior playbooks on the front end, ticket workflow and DeukAgentContext memory on the back end.
114
115
 
115
- ### What's Next
116
+ ### Roadmap
116
117
 
117
- The next step is to make this flow even easier to see and adopt: clearer first-run checks, compact CLI/RAG reminders for agents, stronger README/npm positioning, and companion surfaces that show active ticket, phase, open-ticket count, and DeukAgentContext memory status without asking teams to switch coding agents.
118
+ **Shipped in v5.0** the companion surface is here: the VS Code **Flow UI** (first release) shows active ticket, phase, and open-ticket count in the sidebar. The global store moved to the home directory (`~/.deuk`) for cross-workspace continuity, and the skill system (including the persona and doc-sync skills) is consolidated and home-synced.
119
+
120
+ **Next** — stabilize the ticket DocMeta update path, deepen the DeukAgentContext memory integration (richer phase/memory status surfacing), and broaden i18n coverage so every CLI and ticket surface is fully localized. The goal stays the same: the same work discipline without asking teams to switch coding agents.
118
121
 
119
122
  ### 📚 Detailed Documentation
120
123
  | Doc | Purpose |
121
124
  |---|---|
122
125
  | [docs/usage-guide.ko.md](docs/usage-guide.ko.md) | **Recommended:** practical rollout and step-by-step usage guide |
126
+ | [docs/skills-guide.md](docs/skills-guide.md) | **New in v5.0:** skill system, persona usage, and VS Code Flow UI |
127
+ | [Flow UI Guide](docs/skills-guide.md#4-vs-code-flow-ui-agentflow-panel) | AgentFlow Panel — Workspace & Skill tabs, handoff, usage tips |
123
128
  | [docs/architecture.md](docs/architecture.md) | High-level system structure and visual infographics |
124
- | [docs/how-it-works.md](docs/how-it-works.md) | Detailed CLI mechanics, initialization lifecycle, and file roles |
129
+ | [docs/how-it-works.md](docs/how-it-works.md) | Detailed CLI mechanics, ticket workflow runtime, initialization lifecycle, and file roles |
125
130
  | [docs/principles.md](docs/principles.md) | Design philosophy: Hub-Spoke, Zero-Legacy, and Source Sovereignty |
126
131
  | **Korean Docs** | [README.ko.md](README.ko.md) · [docs/architecture.ko.md](docs/architecture.ko.md) · [docs/how-it-works.ko.md](docs/how-it-works.ko.md) |
127
132
 
128
133
  ---
129
134
 
135
+ ## 🧩 VS Code Extension — AgentFlow Panel
136
+
137
+ > **New in v5.0 (first release)** — The AgentFlow Panel brings the full ticket workflow into your editor sidebar. No terminal switching required. Tickets now persist in `~/.deuk/tickets/` for cross-workspace continuity.
138
+
139
+ <p align="center">
140
+ <img src="docs/assets/agentflow-panel.png" width="360" alt="AgentFlow Panel — ticket list in the VS Code Secondary Side Bar" />
141
+ <br /><em>AgentFlow Panel — the Workspace tab showing the ticket list, status filter, and active-ticket chip.</em>
142
+ </p>
143
+
144
+ ### Why use the UI in your workflow?
145
+
146
+ You can run the full workflow from the CLI alone, but the Flow UI cuts down **context-switching overhead** significantly.
147
+
148
+ | Situation | CLI only | With Flow UI |
149
+ |---|---|---|
150
+ | What tickets are open right now? | type `ticket status` | always visible in the sidebar |
151
+ | Switch to another ticket | remember the id, type `ticket use` | one click on the list |
152
+ | Pass context to AI chat | manual copy-paste | **Handoff** button → clipboard instantly |
153
+ | Toggle skill ON/OFF | `skill expose/unexpose` | toggle per platform, individually |
154
+ | Change ticket phase/status | `ticket move` command | **Change status** button → dialog |
155
+
156
+ > No need to leave the terminal open or memorize commands. Monitor the flow in the sidebar while the agent works, and step in only when you need to.
157
+ >
158
+ > → Details: [Flow UI Guide](docs/skills-guide.md#4-vs-code-flow-ui-agentflow-panel)
159
+
160
+ ---
161
+
162
+ Install the VSIX once and the panel appears in your Secondary Side Bar:
163
+
164
+ | Feature | Detail |
165
+ |---|---|
166
+ | **Ticket list** | Compact 1-row format: filename · m/s · phase · priority · summary snippet · date |
167
+ | **Status filter** | Open / Close / All with active-ticket chip in the toolbar |
168
+ | **Search popup** | Full-text search across id, title, summary, and body with live filtering |
169
+ | **Preview panel** | File path, phase, priority, and **open** shortcut in a single clutter-free line |
170
+ | **Copy handoff** | One button beside the textarea — copies `id / title / phase·status·priority / summary / continue ticket` directly to clipboard for any AI chat |
171
+ | **Multi-workspace** | Workspace selector; nested workspace detection stops at the first agent-rule boundary |
172
+
173
+ ### Install
174
+
175
+ ```bash
176
+ # Build from source
177
+ npm run bundle:vscode
178
+ npm run install:vscode
179
+ ```
180
+
181
+ `npm run install:vscode` installs the bundled VSIX to both desktop VS Code and VS Code Server, prunes older `deukpack.deuk-agent-flow-*` folders, and backs up then resets AgentFlow-related workspace webview state so stale panels do not survive across workspaces.
182
+
183
+ Or download the latest `deuk-agent-flow.vsix` from the [releases page](https://github.com/joygram/DeukAgentFlow/releases) and install via **Extensions → Install from VSIX…**
184
+
185
+ ---
186
+
130
187
  ## 🚀 Quick Start
131
188
 
132
189
  The fastest way to add Deuk Agent Flow to your current project:
@@ -143,7 +200,7 @@ Interactive init now ends its choices at the workspace purpose prompt. Document
143
200
 
144
201
  After that, day-to-day work starts through plain agent requests, not memorized commands. Say things like "continue", "next", or "inspect the cause".
145
202
 
146
- For a single repo, run `deuk-agent-flow init` from that repo root. For a root workspace that contains multiple DeukAgentFlow projects, run the same command from the workspace root; `init` refreshes the root pointer and discovered child workspaces that own their own `PROJECT_RULE.md` / `.deuk-agent/` state.
203
+ For a single repo, run `deuk-agent-flow init` from that repo root. For a root workspace that contains multiple DeukAgentFlow projects, run the same command from the workspace root; `init` refreshes the root pointer and discovered child workspaces that own their own `PROJECT_RULE.md` / `.deuk-workspace-id` marker.
147
204
 
148
205
  For practical rollout details, see [docs/usage-guide.ko.md](docs/usage-guide.ko.md).
149
206
 
@@ -168,12 +225,14 @@ deuk-agent-flow init
168
225
 
169
226
  For a single repo, run `deuk-agent-flow init` from that repo root.
170
227
 
171
- For a root workspace that contains multiple DeukAgentFlow projects, run the same command from the workspace root. `init` updates the root pointer and discovered child workspaces that own their own `PROJECT_RULE.md` / `.deuk-agent/` state, so ordinary users can refresh their AI agent rules from their personal workspace root after installing a new package version.
228
+ For a root workspace that contains multiple DeukAgentFlow projects, run the same command from the workspace root. `init` updates the root pointer and discovered child workspaces that own their own `PROJECT_RULE.md` / `.deuk-workspace-id` marker, so ordinary users can refresh their AI agent rules from their personal workspace root after installing a new package version.
172
229
 
173
230
  Agent client pointers are not a one-time decision. If you start using another client later, rerun `deuk-agent-flow init` and select the additional AI client.
174
231
 
175
232
  This is where the effect compounds: use the workspace root as the shared entry point, each project root as an independent ticket/rule/verification boundary, and nested apps or servers as separate projects only when they have their own lifecycle.
176
233
 
234
+ When DeukAgentContext MCP is present, the current operating model is shared server plus project-local attachment. DeukAgentFlow defines ticket/rule/verification boundaries, while DeukAgentContext provides search/memory tools through each project's `.mcp.json` or project-scope MCP registration. In current deployments, project registry and collection mappings live in `DeukAgentContext/.local/ingest.yaml`; infrastructure/search settings remain in `DeukAgentContext/.local/config.yaml`.
235
+
177
236
  ### 2. Local Source Development (Maintainer/Power User)
178
237
  The global command runs the installed package by default. If you are developing against a local checkout from another project directory, opt into local source routing explicitly.
179
238
 
@@ -211,13 +270,35 @@ Before publishing, run the Docker consumer smoke test. It installs the packed pa
211
270
  npm run smoke:npm:docker
212
271
  ```
213
272
 
214
- After publish, refresh the combined downloads badge when needed:
215
273
 
216
- ```bash
217
- npm run badge:downloads
218
- ```
274
+ ---
275
+
276
+ ## 🔄 Upgrading to 5.0 — Home Directory Migration
277
+
278
+ **5.0 moves the global store from `~/.deuk-agent/` to `~/.deuk/`.** This is automatic, idempotent, and self-healing: it runs on every `init` and on the first ticket command after upgrade. You normally do nothing.
279
+
280
+ **How it works (`ensureWorkspaceMigrated`):**
281
+ - **Legacy only present** → renamed to `~/.deuk/` (fast path). If the rename fails (e.g. another agent holds the directory, `EBUSY`/`EPERM`), it falls back to a recursive copy and **keeps the original `~/.deuk-agent/` intact**.
282
+ - **Both present** (a copy left a leftover) → the legacy directory is removed only **after** `~/.deuk/` actually holds data, then retried on each subsequent run.
283
+ - **Safety guard** → if `~/.deuk/` exists but is empty, the legacy directory is **never** deleted (prevents data loss from a half-finished copy).
284
+
285
+ **Manual recovery (if automatic migration did not complete):**
286
+
287
+ 1. **Check what exists** — your tickets are the priority:
288
+ ```bash
289
+ ls -la ~/.deuk/tickets ~/.deuk-agent/tickets 2>/dev/null
290
+ ```
291
+ 2. **`~/.deuk/` is empty or missing, `~/.deuk-agent/` has your data** → copy it over by hand, keeping the original as a backup:
292
+ ```bash
293
+ cp -r ~/.deuk-agent ~/.deuk
294
+ ```
295
+ 3. **Both exist and `~/.deuk/` has your latest tickets** → the legacy copy is a stale leftover; once you confirm `~/.deuk/` is correct, remove it:
296
+ ```bash
297
+ rm -rf ~/.deuk-agent
298
+ ```
299
+ 4. **Re-run a ticket command** (e.g. `deuk-agent-flow rules ticket --workspace <id>`) — the self-healing pass cleans up any remaining leftover automatically.
219
300
 
220
- The badge should display `deuk-flow` while still summing downloads from both `deuk-agent-flow` and `deuk-agent-rule`.
301
+ > ⚠️ Never delete `~/.deuk-agent/` while `~/.deuk/` is empty that is your only copy of past tickets. The automatic guard refuses to do this; do the same by hand.
221
302
 
222
303
  ---
223
304
 
@@ -225,8 +306,8 @@ The badge should display `deuk-flow` while still summing downloads from both `de
225
306
 
226
307
  The workflow is governed by a **Ticket-Driven Execution Contract**.
227
308
 
228
- 1. **Scaffolding**: `init` deploys `AGENTS.md` and local pointers like `PROJECT_RULE.md`; runtime templates come from the package `templates/` SSoT, not `.deuk-agent/templates/`.
229
- 2. **Ticketing (Plan Phase)**: The user describes the work in natural language, and the agent turns it into a bounded work order in `.deuk-agent/tickets/`. During this phase, agents operate in **Plan Mode** and are restricted from mutating files.
309
+ 1. **Scaffolding**: `init` deploys `AGENTS.md` and local pointers like `PROJECT_RULE.md`; runtime templates come from the package `templates/` SSoT, not a per-workspace copy.
310
+ 2. **Ticketing (Plan Phase)**: The user describes the work in natural language, and the agent turns it into a bounded work order in `~/.deuk/tickets/`. During this phase, agents operate in **Plan Mode** and are restricted from mutating files.
230
311
  3. **Execution (Execute Phase)**: Once authorized, the AI agent reads the ticket, locks onto the **Target Submodule**, and executes code changes. MCP Soft Gates ensure that unauthorized modifications are blocked.
231
312
  4. **Verification**: The agent performs a side-effect audit and convention (e.g., DC-DUP) check before closure.
232
313
  5. **Archiving (Archive Phase)**: Completed tickets undergo Zero-Token Knowledge Distillation and move to `reports/` to build the **Engineering Memory Engine** via DeukAgentContext.
@@ -247,7 +328,7 @@ Ask your AI agent in plain language. The CLI commands are the agent's execution
247
328
 
248
329
  ### Ticket File Git Hygiene
249
330
 
250
- - Treat `.deuk-agent/tickets/**/*.md` and `INDEX*.json` as CLI-managed lifecycle artifacts.
331
+ - Treat `~/.deuk/tickets/**/*.md` and `INDEX*.json` as CLI-managed workflow artifacts.
251
332
  - Do not commit a ticket body without the related index updates. The next session can restore the wrong active/archive state.
252
333
  - After `ticket create` fails, do not create or repair ticket files manually.
253
334
  - Do not flip ticket status by editing frontmatter directly. Use `ticket move`, `ticket close`, or `ticket archive`.
@@ -277,7 +358,7 @@ playbooks visible to Claude or Cursor without copying the full rule contract.
277
358
 
278
359
  Skill availability:
279
360
 
280
- - Synced by `init`: all first-party skill templates are copied into `.deuk-agent/skill-templates/`.
361
+ - Skill sources live in the package `templates/skills/` SSoT and sync to `~/.deuk/skills/` (and native targets like `~/.claude/skills/`).
281
362
  - Recommended default install: `safe-refactor`, `generated-file-guard`.
282
363
  - Optional install: `context-recall`, `project-pilot`.
283
364
 
@@ -289,6 +370,7 @@ Current first-party skills:
289
370
  | `generated-file-guard` | Default recommended: avoid direct edits to generated outputs |
290
371
  | `context-recall` | Optional: reuse prior ticket/rule memory without making RAG the source of truth |
291
372
  | `project-pilot` | Optional: control cross-language, protocol, generated/runtime drift refactors |
373
+ | `persona-maid` | Optional: subculture maid persona with strict technical skills (disabled by default in official release, manual install required) |
292
374
 
293
375
  ```bash
294
376
  npx deuk-agent-flow init
@@ -296,10 +378,11 @@ npx deuk-agent-flow skill list
296
378
  npx deuk-agent-flow skill add --skill safe-refactor
297
379
  npx deuk-agent-flow skill add --skill generated-file-guard
298
380
  npx deuk-agent-flow skill add --skill project-pilot
381
+ npx deuk-agent-flow skill add --skill persona-maid
299
382
  npx deuk-agent-flow skill expose --platform claude
300
383
  ```
301
384
 
302
385
  ---
303
386
 
304
387
  ### 🏷️ Keywords
305
- `#AI-Orchestration` `#Agentic-Workflow` `#DeukFamily` `#Engineering-Intelligence` `#Zero-Legacy` `#High-Signal-Coding` `#AI-Protocol` `#CursorRules` `#CopilotInstructions` `#ClaudeCode` `#ClaudeMD` `#AgentsMD` `#AgentSkills` `#CodingAgent` `#AI-Guardrails` `#LLM-Control-Plane`
388
+ `#AI-Orchestration` `#Agentic-Workflow` `#DeukFamily` `#Engineering-Intelligence` `#Zero-Legacy` `#High-Signal-Coding` `#AI-Protocol` `#CursorRules` `#CopilotInstructions` `#ClaudeCode` `#ClaudeMD` `#AgentsMD` `#AgentSkills` `#CodingAgent` `#DocMetaPolicy` `#LLM-Control-Plane`
@@ -4,20 +4,20 @@
4
4
  * Runs the bundled CLI by default. Maintainers can opt into local workspace
5
5
  * source routing with DEUK_AGENT_FLOW_USE_LOCAL=1 or DEUK_AGENT_FLOW_KIND=source.
6
6
  */
7
- const fs = require("fs");
8
- const path = require("path");
9
- const { spawnSync } = require("child_process");
7
+ import fs from "fs";
8
+ import path from "path";
9
+ import { spawnSync } from "child_process";
10
+ import { fileURLToPath } from "url";
11
+
12
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
10
13
 
11
14
  function findWorkspaceRoot(currentDir) {
12
15
  let dir = currentDir;
13
16
  while (true) {
14
- if (fs.existsSync(path.join(dir, "DeukAgentFlow", "scripts", "cli.mjs"))) {
15
- return dir;
16
- }
17
- if (fs.existsSync(path.join(dir, "DeukAgentRules", "scripts", "cli.mjs"))) {
17
+ if (fs.existsSync(path.join(dir, "DeukAgentFlow", "scripts", "out", "scripts", "cli.js"))) {
18
18
  return dir;
19
19
  }
20
- if (fs.existsSync(path.join(dir, ".git")) && (fs.existsSync(path.join(dir, "DeukAgentFlow")) || fs.existsSync(path.join(dir, "DeukAgentRules")))) {
20
+ if (fs.existsSync(path.join(dir, ".git")) && fs.existsSync(path.join(dir, "DeukAgentFlow"))) {
21
21
  return dir;
22
22
  }
23
23
  const parent = path.dirname(dir);
@@ -32,10 +32,8 @@ const shouldUseLocalSource = process.env.DEUK_AGENT_FLOW_USE_LOCAL === "1"
32
32
 
33
33
  const wsRoot = shouldUseLocalSource ? findWorkspaceRoot(process.cwd()) : null;
34
34
  if (wsRoot) {
35
- const localCli = fs.existsSync(path.join(wsRoot, "DeukAgentFlow", "scripts", "cli.mjs"))
36
- ? path.join(wsRoot, "DeukAgentFlow", "scripts", "cli.mjs")
37
- : path.join(wsRoot, "DeukAgentRules", "scripts", "cli.mjs");
38
- const bundledCli = path.resolve(path.join(__dirname, "..", "scripts", "cli.mjs"));
35
+ const localCli = path.join(wsRoot, "DeukAgentFlow", "scripts", "out", "scripts", "cli.js");
36
+ const bundledCli = path.resolve(path.join(__dirname, "..", "scripts", "out", "scripts", "cli.js"));
39
37
  if (fs.existsSync(localCli) && localCli !== bundledCli) {
40
38
  const args = process.argv.slice(2);
41
39
  const result = spawnSync("node", [localCli, ...args], { stdio: "inherit" });
@@ -43,7 +41,7 @@ if (wsRoot) {
43
41
  }
44
42
  }
45
43
 
46
- const myCli = path.join(__dirname, "..", "scripts", "cli.mjs");
44
+ const myCli = path.join(__dirname, "..", "scripts", "out", "scripts", "cli.js");
47
45
  if (fs.existsSync(myCli)) {
48
46
  const args = process.argv.slice(2);
49
47
  const result = spawnSync("node", [myCli, ...args], { stdio: "inherit" });
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- require("./deuk-agent-flow.js");
2
+ import "./deuk-agent-flow.js";
@@ -0,0 +1,3 @@
1
+ # Bundled VSIX
2
+
3
+ `deuk-agent-flow.vsix` is produced from `../vscode-extension/`.
Binary file