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.
- package/CHANGELOG.ko.md +282 -0
- package/CHANGELOG.md +788 -120
- package/LICENSE +0 -0
- package/README.ko.md +97 -17
- package/README.md +108 -25
- package/bin/deuk-agent-flow.js +11 -13
- package/bin/deuk-agent-rule.js +1 -1
- package/bundled/README.md +3 -0
- package/bundled/deuk-agent-flow.vsix +0 -0
- package/core-rules/AGENTS.md +30 -118
- package/docs/architecture.ko.md +155 -2
- package/docs/architecture.md +155 -2
- package/docs/assets/agentflow-panel-skills.png +0 -0
- package/docs/assets/agentflow-panel.png +0 -0
- package/docs/how-it-works.ko.md +109 -52
- package/docs/how-it-works.md +128 -71
- package/docs/principles.ko.md +68 -68
- package/docs/principles.md +68 -68
- package/docs/usage-guide.ko.md +251 -212
- package/package.json +41 -34
- package/scripts/bundle-vscode-vsix.ts +67 -0
- package/scripts/{cli-args.mjs → cli-args.ts} +49 -12
- package/scripts/cli-init-commands.ts +99 -0
- package/scripts/cli-init-logic.ts +46 -0
- package/scripts/{cli-prompts.mjs → cli-prompts.ts} +19 -34
- package/scripts/{cli-rule-compiler.mjs → cli-rule-compiler.ts} +128 -112
- package/scripts/cli-skill-commands.ts +707 -0
- package/scripts/{cli-telemetry-commands.mjs → cli-telemetry-commands.ts} +25 -22
- package/scripts/cli-ticket-command-shared.ts +4 -0
- package/scripts/cli-ticket-commands.ts +3723 -0
- package/scripts/cli-ticket-index.ts +283 -0
- package/scripts/{cli-ticket-migration.mjs → cli-ticket-migration.ts} +44 -68
- package/scripts/cli-ticket-parser.ts +100 -0
- package/scripts/{cli-usage-commands.mjs → cli-usage-commands.ts} +325 -326
- package/scripts/cli-utils.ts +1560 -0
- package/scripts/cli.ts +695 -0
- package/scripts/{lint-md.mjs → lint-md.ts} +32 -42
- package/scripts/lint-rules.ts +203 -0
- package/scripts/{merge-logic.mjs → merge-logic.ts} +44 -44
- package/scripts/{plan-parser.mjs → plan-parser.ts} +53 -53
- package/templates/MODULE_RULE_TEMPLATE.md +11 -11
- package/templates/PROJECT_RULE.md +46 -47
- package/templates/TICKET_TEMPLATE.ko.md +48 -44
- package/templates/TICKET_TEMPLATE.md +48 -44
- package/templates/project-memory.md +19 -0
- package/templates/project-pilot/CONFORMANCE_GATE_TEMPLATE.md +25 -23
- package/templates/project-pilot/DRIFT_CHECKLIST.md +27 -19
- package/templates/project-pilot/FLOW_CONTRACT_TEMPLATE.md +26 -26
- package/templates/project-pilot/IMPLEMENTATION_MATRIX_TEMPLATE.md +30 -30
- package/templates/project-pilot/INTEGRATION_CONTRACT_TEMPLATE.md +26 -26
- package/templates/project-pilot/OWNER_MAP_TEMPLATE.md +15 -15
- package/templates/project-pilot/PROJECT_PILOT_RULE_TEMPLATE.md +34 -34
- package/templates/project-pilot/REFACTOR_CONTRACT_TEMPLATE.md +32 -32
- package/templates/project-pilot/REMEDIATION_PLAN_TEMPLATE.md +33 -33
- package/templates/rules.d/deukcontext-mcp.md +31 -31
- package/templates/rules.d/platform-coexistence.md +29 -29
- package/templates/skills/context-recall/SKILL.md +3 -1
- package/templates/skills/doc-sync/SKILL.md +111 -0
- package/templates/skills/generated-file-guard/SKILL.md +3 -1
- package/templates/skills/persona-maid/SKILL.md +65 -0
- package/templates/skills/project-pilot/SKILL.md +13 -52
- package/templates/skills/safe-refactor/SKILL.md +3 -1
- package/templates/skills/ticket-status-surface/SKILL.md +17 -0
- package/core-rules/GEMINI.md +0 -7
- package/docs/badges/npm-downloads.json +0 -8
- package/scripts/cli-init-commands.mjs +0 -1750
- package/scripts/cli-init-logic.mjs +0 -64
- package/scripts/cli-skill-commands.mjs +0 -201
- package/scripts/cli-ticket-commands.mjs +0 -2427
- package/scripts/cli-ticket-index.mjs +0 -298
- package/scripts/cli-ticket-parser.mjs +0 -209
- package/scripts/cli-utils.mjs +0 -602
- package/scripts/cli.mjs +0 -256
- package/scripts/lint-rules.mjs +0 -196
- package/scripts/publish-dual-npm.mjs +0 -141
- package/scripts/smoke-npm-docker.mjs +0 -102
- package/scripts/smoke-npm-local.mjs +0 -109
- package/scripts/update-download-badge.mjs +0 -103
package/docs/principles.md
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
# Principles
|
|
2
|
-
|
|
3
|
-
These principles define the philosophy behind **DeukAgentFlow** as an AI Engineering Orchestration Protocol.
|
|
4
|
-
|
|
5
|
-
## 1. Zero-Copy Hub-Spoke Architecture (SSoT)
|
|
6
|
-
|
|
7
|
-
The documentation and rule system must have a single source of truth without unnecessary duplication.
|
|
8
|
-
|
|
9
|
-
- **Global Hub**: `AGENTS.md` contains all canonical rules.
|
|
10
|
-
- **Local Hub**: `PROJECT_RULE.md` defines project-specific rules.
|
|
11
|
-
- **Spoke (Zero-Copy)**: IDE-specific files act purely as absolute path pointers.
|
|
12
|
-
- **Why**: Duplicated and mismatched rules across IDEs create agent drift and unpredictable behavior.
|
|
13
|
-
|
|
14
|
-
## 2. Zero-Legacy Policy
|
|
15
|
-
|
|
16
|
-
Maintain repository cleanliness by physically purging obsolete structures.
|
|
17
|
-
|
|
18
|
-
- **Why**: Legacy `.cursorrules` or stale submodule stubs confuse agents and bloat the context window.
|
|
19
|
-
- **Mechanism**: Unconditional cleanup of deprecated markers and empty stubs during `init`.
|
|
20
|
-
|
|
21
|
-
## 3. Kind Src (Source Sovereignty)
|
|
22
|
-
|
|
23
|
-
Prioritize local development source over distributed binaries.
|
|
24
|
-
|
|
25
|
-
- **Why**: Distributed packages (npm) often lag behind local rule updates.
|
|
26
|
-
- **Mechanism**: The Global CLI Proxy ensures that `npx` always routes to the local `scripts/cli.mjs` if present.
|
|
27
|
-
|
|
28
|
-
## 4. Smart Backup (Custom Rule Protection)
|
|
29
|
-
|
|
30
|
-
Respect human-authored content while cleaning system-generated noise.
|
|
31
|
-
|
|
32
|
-
- **Why**: Users often add valuable custom rules to generated files.
|
|
33
|
-
- **Mechanism**: Files are only deleted if they contain pure system blocks. Anything else is backed up as `*.bak`.
|
|
34
|
-
|
|
35
|
-
## 5. Strict Phase-Driven Workflow (TDW)
|
|
36
|
-
|
|
37
|
-
Execution must be strictly bounded by a Ticket and its Phase.
|
|
38
|
-
|
|
39
|
-
- **Why**: AI agents wander without boundaries. Explicit scope locking reduces token usage and prevents scope-creep.
|
|
40
|
-
- **Mechanism**: Phase 1 issues or selects a ticket and fills the Agent Permission Contract (APC). Keep all planning in the main ticket's compact plan. When no active/open ticket exists, the agent inspects recent git history before creating a follow-up ticket. The ticket owns scope, contract, lifecycle checks, and verification outcomes; planning text must not contain progress checkboxes, execution logs, command transcripts, completion summaries, or verification results.
|
|
41
|
-
|
|
42
|
-
## 6. Plan Before Mutation
|
|
43
|
-
|
|
44
|
-
Design must be explicit before state changes occur.
|
|
45
|
-
|
|
46
|
-
- **Why**: Intent and scope should be recorded before code or config files are modified. Ticket and plan documents are records, not a reason to create duplicate tickets.
|
|
47
|
-
- **Mechanism**: Before writing code, the ticket APC blocks (`[BOUNDARY]`, `[CONTRACT]`, `[PATCH PLAN]`) must be filled. APC records boundary and contract only. The reasoning behind diagnosis and chosen approach stays in the main ticket's compact plan and is not a destination for execution records.
|
|
48
|
-
|
|
49
|
-
## 7. Documentation Complements RAG
|
|
50
|
-
|
|
51
|
-
Stable principles and dynamic knowledge must work together.
|
|
52
|
-
|
|
53
|
-
- **Docs**: Explain the stable model and operating assumptions.
|
|
54
|
-
- **RAG (DeukAgentContext)**: Synchronizes engineering memory and past decisions through the online MCP layer only.
|
|
55
|
-
- **Why**: Local files stay the source of truth, RAG stays advisory, and archive preserves durable history without mixing live state into the memory layer.
|
|
56
|
-
|
|
57
|
-
## 8. Archive Preservation
|
|
58
|
-
|
|
59
|
-
Archive is a required lifecycle layer, not an optional afterthought.
|
|
60
|
-
|
|
61
|
-
- **Why**: Live context should stay small and current, while completed work must be moved into archive/knowledge so the history remains searchable without polluting active context.
|
|
62
|
-
- **Mechanism**: Use ticket archive and distillation to move finished work out of the active loop, then treat the archived result as durable reference material.
|
|
63
|
-
|
|
64
|
-
## 9. Bilingual Parity
|
|
65
|
-
|
|
66
|
-
English and Korean documentation are mirrors of a single model.
|
|
67
|
-
|
|
68
|
-
- **Why**: Engineering teams are often bilingual. Mismatched docs lead to workflow fragmentation.
|
|
1
|
+
# Principles
|
|
2
|
+
|
|
3
|
+
These principles define the philosophy behind **DeukAgentFlow** as an AI Engineering Orchestration Protocol.
|
|
4
|
+
|
|
5
|
+
## 1. Zero-Copy Hub-Spoke Architecture (SSoT)
|
|
6
|
+
|
|
7
|
+
The documentation and rule system must have a single source of truth without unnecessary duplication.
|
|
8
|
+
|
|
9
|
+
- **Global Hub**: `AGENTS.md` contains all canonical rules.
|
|
10
|
+
- **Local Hub**: `PROJECT_RULE.md` defines project-specific rules.
|
|
11
|
+
- **Spoke (Zero-Copy)**: IDE-specific files act purely as absolute path pointers.
|
|
12
|
+
- **Why**: Duplicated and mismatched rules across IDEs create agent drift and unpredictable behavior.
|
|
13
|
+
|
|
14
|
+
## 2. Zero-Legacy Policy
|
|
15
|
+
|
|
16
|
+
Maintain repository cleanliness by physically purging obsolete structures.
|
|
17
|
+
|
|
18
|
+
- **Why**: Legacy `.cursorrules` or stale submodule stubs confuse agents and bloat the context window.
|
|
19
|
+
- **Mechanism**: Unconditional cleanup of deprecated markers and empty stubs during `init`.
|
|
20
|
+
|
|
21
|
+
## 3. Kind Src (Source Sovereignty)
|
|
22
|
+
|
|
23
|
+
Prioritize local development source over distributed binaries.
|
|
24
|
+
|
|
25
|
+
- **Why**: Distributed packages (npm) often lag behind local rule updates.
|
|
26
|
+
- **Mechanism**: The Global CLI Proxy ensures that `npx` always routes to the local `scripts/cli.mjs` if present.
|
|
27
|
+
|
|
28
|
+
## 4. Smart Backup (Custom Rule Protection)
|
|
29
|
+
|
|
30
|
+
Respect human-authored content while cleaning system-generated noise.
|
|
31
|
+
|
|
32
|
+
- **Why**: Users often add valuable custom rules to generated files.
|
|
33
|
+
- **Mechanism**: Files are only deleted if they contain pure system blocks. Anything else is backed up as `*.bak`.
|
|
34
|
+
|
|
35
|
+
## 5. Strict Phase-Driven Workflow (TDW)
|
|
36
|
+
|
|
37
|
+
Execution must be strictly bounded by a Ticket and its Phase.
|
|
38
|
+
|
|
39
|
+
- **Why**: AI agents wander without boundaries. Explicit scope locking reduces token usage and prevents scope-creep.
|
|
40
|
+
- **Mechanism**: Phase 1 issues or selects a ticket and fills the Agent Permission Contract (APC). Keep all planning in the main ticket's compact plan. When no active/open ticket exists, the agent inspects recent git history before creating a follow-up ticket. The ticket owns scope, contract, lifecycle checks, and verification outcomes; planning text must not contain progress checkboxes, execution logs, command transcripts, completion summaries, or verification results.
|
|
41
|
+
|
|
42
|
+
## 6. Plan Before Mutation
|
|
43
|
+
|
|
44
|
+
Design must be explicit before state changes occur.
|
|
45
|
+
|
|
46
|
+
- **Why**: Intent and scope should be recorded before code or config files are modified. Ticket and plan documents are records, not a reason to create duplicate tickets.
|
|
47
|
+
- **Mechanism**: Before writing code, the ticket APC blocks (`[BOUNDARY]`, `[CONTRACT]`, `[PATCH PLAN]`) must be filled. APC records boundary and contract only. The reasoning behind diagnosis and chosen approach stays in the main ticket's compact plan and is not a destination for execution records.
|
|
48
|
+
|
|
49
|
+
## 7. Documentation Complements RAG
|
|
50
|
+
|
|
51
|
+
Stable principles and dynamic knowledge must work together.
|
|
52
|
+
|
|
53
|
+
- **Docs**: Explain the stable model and operating assumptions.
|
|
54
|
+
- **RAG (DeukAgentContext)**: Synchronizes engineering memory and past decisions through the online MCP layer only.
|
|
55
|
+
- **Why**: Local files stay the source of truth, RAG stays advisory, and archive preserves durable history without mixing live state into the memory layer.
|
|
56
|
+
|
|
57
|
+
## 8. Archive Preservation
|
|
58
|
+
|
|
59
|
+
Archive is a required lifecycle layer, not an optional afterthought.
|
|
60
|
+
|
|
61
|
+
- **Why**: Live context should stay small and current, while completed work must be moved into archive/knowledge so the history remains searchable without polluting active context.
|
|
62
|
+
- **Mechanism**: Use ticket archive and distillation to move finished work out of the active loop, then treat the archived result as durable reference material.
|
|
63
|
+
|
|
64
|
+
## 9. Bilingual Parity
|
|
65
|
+
|
|
66
|
+
English and Korean documentation are mirrors of a single model.
|
|
67
|
+
|
|
68
|
+
- **Why**: Engineering teams are often bilingual. Mismatched docs lead to workflow fragmentation.
|
package/docs/usage-guide.ko.md
CHANGED
|
@@ -1,212 +1,251 @@
|
|
|
1
|
-
# DeukAgentFlow 실전 사용 가이드 (Practical Usage Guide)
|
|
2
|
-
|
|
3
|
-
이 가이드는 DeukAgentFlow를 실제 프로젝트에 배포하고 에이전트와 함께 효율적으로 사용하는 방법을 단계별로 설명합니다.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 1. 워크스페이스 적용 모델 (Deployment)
|
|
8
|
-
|
|
9
|
-
DeukAgentFlow의 초기화 단위는 단순히 "현재 폴더 하나"가 아닙니다. 실제 운영은 보통 **workspace 루트 + 여러 프로젝트 루트 + 필요 시 중첩 프로젝트** 구조로 잡습니다.
|
|
10
|
-
|
|
11
|
-
예:
|
|
12
|
-
|
|
13
|
-
```text
|
|
14
|
-
~/workspace/
|
|
15
|
-
AGENTS.md # workspace 전체 포인터
|
|
16
|
-
PROJECT_RULE.md # workspace 기본 규칙
|
|
17
|
-
DeukPack/
|
|
18
|
-
AGENTS.md
|
|
19
|
-
PROJECT_RULE.md
|
|
20
|
-
.deuk-agent/
|
|
21
|
-
DeukAgentContext/
|
|
22
|
-
AGENTS.md
|
|
23
|
-
PROJECT_RULE.md
|
|
24
|
-
.deuk-agent/
|
|
25
|
-
i/
|
|
26
|
-
AGENTS.md
|
|
27
|
-
PROJECT_RULE.md
|
|
28
|
-
.deuk-agent/
|
|
29
|
-
i_server/
|
|
30
|
-
AGENTS.md
|
|
31
|
-
PROJECT_RULE.md
|
|
32
|
-
.deuk-agent/
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
이 모델에서 workspace 루트는 "공통 진입점"이고, 실제 작업 단위는 각 프로젝트의 `.deuk-agent/`입니다. 에이전트는
|
|
36
|
-
|
|
37
|
-
이렇게 사용하면 효과가 극대화됩니다.
|
|
38
|
-
|
|
39
|
-
- workspace 루트에는 공통 포인터만 둬서 어느 대화창에서 시작해도 같은 코어 규칙을 읽게 합니다.
|
|
40
|
-
- 각 프로젝트 루트에는 별도 `PROJECT_RULE.md`와 `.deuk-agent/`를 둬서 작업 맥락, 티켓, 검증 기록이 섞이지 않게 합니다.
|
|
41
|
-
- 서버/앱/패키지처럼 lifecycle이 다른 하위 폴더는 중첩 프로젝트로 초기화해 독립 티켓을 갖게 합니다.
|
|
42
|
-
- 에이전트에게는 긴 명령 대신 "진행", "다음", "원인", "정리"처럼 짧게 말하고, 에이전트가
|
|
43
|
-
- 공통 규칙은 코어 허브에서, 프로젝트별 아키텍처/빌드/검증 규칙은 해당 프로젝트의 `PROJECT_RULE.md`에서 관리합니다.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
|
189
|
-
|
|
190
|
-
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
-
|
|
1
|
+
# DeukAgentFlow 실전 사용 가이드 (Practical Usage Guide)
|
|
2
|
+
|
|
3
|
+
이 가이드는 DeukAgentFlow를 실제 프로젝트에 배포하고 에이전트와 함께 효율적으로 사용하는 방법을 단계별로 설명합니다.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. 워크스페이스 적용 모델 (Deployment)
|
|
8
|
+
|
|
9
|
+
DeukAgentFlow의 초기화 단위는 단순히 "현재 폴더 하나"가 아닙니다. 실제 운영은 보통 **workspace 루트 + 여러 프로젝트 루트 + 필요 시 중첩 프로젝트** 구조로 잡습니다.
|
|
10
|
+
|
|
11
|
+
예:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
~/workspace/
|
|
15
|
+
AGENTS.md # workspace 전체 포인터
|
|
16
|
+
PROJECT_RULE.md # workspace 기본 규칙
|
|
17
|
+
DeukPack/
|
|
18
|
+
AGENTS.md
|
|
19
|
+
PROJECT_RULE.md
|
|
20
|
+
.deuk-agent/
|
|
21
|
+
DeukAgentContext/
|
|
22
|
+
AGENTS.md
|
|
23
|
+
PROJECT_RULE.md
|
|
24
|
+
.deuk-agent/
|
|
25
|
+
i/
|
|
26
|
+
AGENTS.md
|
|
27
|
+
PROJECT_RULE.md
|
|
28
|
+
.deuk-agent/
|
|
29
|
+
i_server/
|
|
30
|
+
AGENTS.md
|
|
31
|
+
PROJECT_RULE.md
|
|
32
|
+
.deuk-agent/
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
이 모델에서 workspace 루트는 "공통 진입점"이고, 실제 작업 단위는 각 프로젝트의 `.deuk-agent/`입니다. 에이전트는 전역 registry, 명시적 workspace id, ticket id를 기준으로 프로젝트 규칙과 티켓을 선택합니다.
|
|
36
|
+
|
|
37
|
+
이렇게 사용하면 효과가 극대화됩니다.
|
|
38
|
+
|
|
39
|
+
- workspace 루트에는 공통 포인터만 둬서 어느 대화창에서 시작해도 같은 코어 규칙을 읽게 합니다.
|
|
40
|
+
- 각 프로젝트 루트에는 별도 `PROJECT_RULE.md`와 `.deuk-agent/`를 둬서 작업 맥락, 티켓, 검증 기록이 섞이지 않게 합니다.
|
|
41
|
+
- 서버/앱/패키지처럼 lifecycle이 다른 하위 폴더는 중첩 프로젝트로 초기화해 독립 티켓을 갖게 합니다.
|
|
42
|
+
- 에이전트에게는 긴 명령 대신 "진행", "다음", "원인", "정리"처럼 짧게 말하고, 에이전트가 registry와 ticket id 기준으로 맞는 프로젝트 티켓을 선택하게 합니다.
|
|
43
|
+
- 공통 규칙은 코어 허브에서, 프로젝트별 아키텍처/빌드/검증 규칙은 해당 프로젝트의 `PROJECT_RULE.md`에서 관리합니다.
|
|
44
|
+
|
|
45
|
+
workspace 루트에 여러 프로젝트가 있을 때는 명시적 `--workspace` 값이 있는 경우에만 sibling project root 이름으로 target repo를 전환합니다. `--project`는 티켓 메타데이터/필터로만 사용하고 저장소 전환에는 사용하지 않습니다. `DeukAgentFlow`, `DeukAIContext`처럼 각 프로젝트 루트에 `.deuk-agent/`가 있으면 `--workspace DeukAgentFlow`, `--workspace agent-flow`, `--workspace flow`처럼 정확한 이름/별칭으로 resolve합니다. title/summary 본문은 target 선택에 사용하지 않습니다.
|
|
46
|
+
|
|
47
|
+
target repo를 확정한 뒤에는 해당 repo의 `.deuk-agent/tickets`에서만 workflow를 실행합니다. target 없이 티켓을 만들면 registry의 단일 workspace 또는 ticket id로 확인된 workspace만 사용하며, 여러 workspace가 가능하면 `--workspace`로 명확히 지정합니다.
|
|
48
|
+
|
|
49
|
+
티켓 workflow 상태 메시지는 Flow 표준 prefix로 구분합니다.
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
flow:[workspace:티켓시작] [ticket-id](/absolute/path/to/ticket.md)
|
|
53
|
+
승인하려면 `승인`이라고 입력해 주세요.
|
|
54
|
+
|
|
55
|
+
flow:[workspace:티켓종료] [ticket-id](/absolute/path/to/ticket.md)
|
|
56
|
+
티켓 작업이 종료되었습니다.
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### MCP 연결 구조
|
|
60
|
+
|
|
61
|
+
DeukAgentFlow와 DeukAgentContext를 함께 쓸 때는 `워크스페이스 공용 서버 + 프로젝트별 연결` 구조로 이해하면 가장 정확합니다.
|
|
62
|
+
|
|
63
|
+
- `DeukAgentFlow`는 티켓, 승인, 검증, project 경계를 정의합니다.
|
|
64
|
+
- `DeukAgentContext`는 검색, 기억, telemetry를 제공하는 MCP 서버입니다.
|
|
65
|
+
- IDE 연결은 각 프로젝트 루트의 `.mcp.json` 또는 Claude project-scope MCP 등록으로 붙습니다.
|
|
66
|
+
- 현재 등록 프로젝트 목록과 collection mapping의 사실상 소스는 `DeukAgentContext/.local/ingest.yaml`입니다.
|
|
67
|
+
- `DeukAgentContext/.local/config.yaml`은 프로젝트 목록보다는 인프라/search/telemetry 설정에 가깝습니다.
|
|
68
|
+
|
|
69
|
+
즉, 실제 사용감은 "Flow가 MCP를 소유한다"보다 "MCP가 연결된 프로젝트에서 Flow가 그 사용 규칙을 지휘한다"에 가깝습니다.
|
|
70
|
+
|
|
71
|
+
현재 구조에서 새 workspace를 AgentContext registry로 끌어올릴 때는 아래 순서가 가장 자연스럽습니다.
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx deuk-agent-flow context derive-agentflow --workspace ~/workspace
|
|
75
|
+
npx deuk-agent-flow context derive-agentflow --workspace ~/workspace --apply
|
|
76
|
+
npx deuk-agent-flow context setup-ide
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
- `derive-agentflow`는 DeukAgentFlow 프로젝트 루트(`PROJECT_RULE.md` + `.deuk-agent/`)를 스캔해 `ingest.yaml` 후보를 만듭니다.
|
|
80
|
+
- `--apply`를 주면 현재 `ingest.yaml`에 반영합니다.
|
|
81
|
+
- `setup-ide`는 반영된 registry를 기준으로 각 프로젝트 `.mcp.json` 또는 Claude project-scope MCP 연결을 갱신합니다.
|
|
82
|
+
- `deuk-agent-flow context ...`는 사용자 실행 흐름을 Flow에 두고, 내부적으로 DeukAgentContext CLI를 호출합니다.
|
|
83
|
+
|
|
84
|
+
### 적용 기준
|
|
85
|
+
|
|
86
|
+
| 위치 | 역할 | 초기화 여부 |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| workspace 루트 | 여러 프로젝트가 공유하는 포인터와 기본 규칙 | 선택 |
|
|
89
|
+
| 개별 프로젝트 루트 | 실제 작업 티켓, 로컬 규칙, 에이전트 포인터 | 권장 |
|
|
90
|
+
| 중첩 프로젝트 | 독립 배포/서버/앱처럼 별도 lifecycle이 있는 하위 프로젝트 | 필요 시 |
|
|
91
|
+
| generated/output 폴더 | 빌드 산출물 | 금지 |
|
|
92
|
+
|
|
93
|
+
### 1단계: 글로벌 설치
|
|
94
|
+
`npx` 캐시 문제를 피하고 어디서든 명령어를 사용할 수 있도록 글로벌 설치를 권장합니다.
|
|
95
|
+
```bash
|
|
96
|
+
npm install -g deuk-agent-flow
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 2단계: 프로젝트 루트 초기화
|
|
100
|
+
작업을 관리할 각 프로젝트 루트에서 초기화 명령을 실행합니다.
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
deuk-agent-flow init
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
이 명령은 다음 파일들을 생성/업데이트합니다:
|
|
107
|
+
- `PROJECT_RULE.md`: 현재 프로젝트의 고유 규칙 (전역 `AGENTS.md`를 오버라이드).
|
|
108
|
+
- `.deuk-agent/`: 티켓, 템플릿, 설정이 저장되는 디렉토리.
|
|
109
|
+
- `.cursor/rules/deuk-agent.mdc`, `GEMINI.md` 등: 각 에이전트 환경에 맞는 얇은 포인터 파일.
|
|
110
|
+
|
|
111
|
+
여러 프로젝트를 한 workspace에서 관리한다면 각 루트에서 반복 실행합니다.
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
cd ~/workspace/DeukPack && deuk-agent-flow init
|
|
115
|
+
cd ~/workspace/DeukAgentContext && deuk-agent-flow init
|
|
116
|
+
cd ~/workspace/i && deuk-agent-flow init
|
|
117
|
+
cd ~/workspace/i/i_server && deuk-agent-flow init
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
초기화 후에는 각 프로젝트의 `PROJECT_RULE.md`를 채워야 합니다. 기본 템플릿 상태라면 에이전트는 아키텍처를 임의로 추측하지 말고, 사용자에게 규칙 정의를 요청하거나 코드베이스 분석 초안을 제안해야 합니다.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 2. 에이전트와 협업하기 (Daily Workflow)
|
|
125
|
+
|
|
126
|
+
에이전트에게 작업을 시킬 때는 **짧게 말하면 됩니다**. 티켓 생성과 Phase 전환은 에이전트가 내부적으로 처리하고, 사용자는 방향과 승인 여부에 집중합니다.
|
|
127
|
+
|
|
128
|
+
### 1단계: 티켓 생성 (Phase 1: Ticket + Plan)
|
|
129
|
+
에이전트에게 짧게 말해 작업을 시작합니다.
|
|
130
|
+
> "티켓 잡고 진행"
|
|
131
|
+
|
|
132
|
+
에이전트는 맥락에서 주제를 잡고, 내부적으로 티켓/APC/compact plan을 채웁니다. 사용자가 직접 `ticket create` 옵션을 외우거나 입력할 필요는 없습니다.
|
|
133
|
+
|
|
134
|
+
기존 작업을 이어받으려는데 `ticket next`가 진행 가능한 티켓을 찾지 못하면, 에이전트는 새 티켓을 즉시 만들지 않고 최근 git history를 먼저 분석해 실제 후속 작업 후보를 복원합니다. 새 티켓은 그 분석 근거를 메인 티켓의 compact plan에 기록한 뒤 생성합니다.
|
|
135
|
+
|
|
136
|
+
### 2단계: APC(Agent Permission Contract) 기록
|
|
137
|
+
생성된 티켓은 기본적으로 **Phase 1 (Ticket + Plan)** 상태입니다. 에이전트는 코드를 수정하기 전에 티켓 내의 APC 블록(`[BOUNDARY]`, `[CONTRACT]`, `[PATCH PLAN]`)을 채워야 합니다.
|
|
138
|
+
|
|
139
|
+
티켓은 스코프, 제약, APC 계약, 라이프사이클 체크, 검증 결과를 맡습니다. 실행 로그, 명령 transcript, 완료 요약, 검증 결과를 계획 문구와 섞지 않습니다.
|
|
140
|
+
|
|
141
|
+
사용자가 실행을 명확히 요청했고 Phase 1 기록이 완성되어 있으면, 에이전트가 내부적으로 Phase 승급을 시도합니다.
|
|
142
|
+
만약 APC나 compact plan이 비어있거나 불완전하다면, 에이전트는 코딩 전에 이를 먼저 채웁니다.
|
|
143
|
+
|
|
144
|
+
이슈/회귀/정책 위반을 제기한 경우에는 티켓 생성 직후 바로 실행하지 않습니다. 에이전트는 Phase 1에 원인 가설, 범위, APC, 패치 계획을 채운 뒤 멈추고 사용자의 검토 승인을 기다립니다. 원래 요청에 "수정", "해결"이 포함되어 있어도 티켓 계획을 본 뒤의 승인으로 보지 않습니다.
|
|
145
|
+
|
|
146
|
+
### 3단계: 작업 실행 (Phase 2: Execute)
|
|
147
|
+
티켓이 **Phase 2 (Execute)** 로 승급되면, 에이전트는 제한된 경계 내에서 코드를 수정하고 단위 테스트 등 검증 작업을 수행합니다.
|
|
148
|
+
|
|
149
|
+
### 4단계: 작업 완료 및 아카이빙
|
|
150
|
+
작업이 끝나면 정리만 짧게 요청하세요.
|
|
151
|
+
> "검증 기록하고 정리"
|
|
152
|
+
|
|
153
|
+
이때 아카이브 작업 중 **Zero-Token 지식 증류(Knowledge Distillation)**가 동작하여 불필요한 컨텍스트 토큰 소모를 줄이도록 핵심 정보만 압축되어 저장됩니다.
|
|
154
|
+
|
|
155
|
+
### 5단계: 티켓 파일 깃 관리
|
|
156
|
+
티켓 파일도 깃 기록의 일부이지만, 소스 코드처럼 무심코 다루면 active/archive 상태가 쉽게 꼬입니다.
|
|
157
|
+
|
|
158
|
+
- `ticket create`, `ticket move`, `ticket close`, `ticket archive`로 바뀐 `.deuk-agent/tickets/INDEX*.json`은 함께 커밋합니다. 티켓 본문만 커밋하고 index를 빼면 다음 작업에서 상태가 맞지 않을 수 있습니다.
|
|
159
|
+
- `.deuk-agent/tickets/**/*.md`는 CLI가 만든 결과만 따라갑니다. 티켓 생성이 실패한 뒤 파일을 손으로 만들거나 고치지 않습니다.
|
|
160
|
+
- 작업 중 티켓 본문을 다듬는 것은 괜찮지만, 상태를 바꿀 때는 frontmatter를 직접 고치지 말고 반드시 CLI를 사용합니다.
|
|
161
|
+
- `.deuk-agent/telemetry.jsonl`은 보통 실행 로그에 가깝기 때문에, 저장소 정책상 꼭 추적하는 경우가 아니라면 커밋 목록에 넣지 않는 편이 안전합니다.
|
|
162
|
+
- 작업을 끝냈다면 `ticket archive`까지 마친 뒤 커밋하는 편이 좋습니다. archive는 티켓 파일 위치와 archive index를 함께 정리하므로, 중간에 손으로 옮기면 기록 흐름이 흐려집니다.
|
|
163
|
+
- 여러 작업을 한 커밋에 섞지 말고, 가능하면 "코드 변경 + 해당 티켓 workflow 변경" 묶음으로 나눕니다.
|
|
164
|
+
|
|
165
|
+
빠르게 확인할 때는 아래 정도를 습관처럼 보면 좋습니다.
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
git status --short
|
|
169
|
+
git diff -- .deuk-agent/tickets/INDEX.json
|
|
170
|
+
git diff -- .deuk-agent/tickets/INDEX.archive.*.json
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
티켓 관련 변경이 보일 때는 "이 변경이 CLI workflow의 결과인가?"를 먼저 확인하세요. 아니라면 손으로 고치기보다 `ticket status`, `ticket list`, `ticket archive` 같은 명령으로 상태를 다시 맞추는 편이 안전합니다.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 3. 에이전트 프롬프트 가이드 (Agent Prompting)
|
|
178
|
+
|
|
179
|
+
에이전트가 DeukAgentFlow 프로토콜을 엄격히 준수하도록 하려면 프로젝트 시작 시 짧은 지침이면 충분합니다.
|
|
180
|
+
|
|
181
|
+
> **에이전트 지침 예시:**
|
|
182
|
+
> "DeukAgentFlow 규칙을 따르고, 사용자의 짧은 지시를 티켓/Phase/검증 기록으로 처리해라. 코드 수정 전에는 APC와 계획을 먼저 남긴다."
|
|
183
|
+
|
|
184
|
+
### `/` 단축 명령
|
|
185
|
+
|
|
186
|
+
지원되는 에이전트에서는 짧은 요청을 slash command로 노출할 수 있습니다. 다만 모든 클라이언트가 같은 방식으로 커스텀 `/` 명령을 지원하지는 않으므로, 기본 UX는 짧은 자연어 요청으로 둡니다.
|
|
187
|
+
|
|
188
|
+
| 의도 | 자연어 fallback | slash 후보 |
|
|
189
|
+
|---|---|---|
|
|
190
|
+
| 다음 단계 | "다음" | `/next` |
|
|
191
|
+
| 티켓 시작 | "진행" | `/flow` |
|
|
192
|
+
| 원인 분석 | "원인" | `/inspect` |
|
|
193
|
+
| 검증/정리 | "정리" | `/closeout` |
|
|
194
|
+
|
|
195
|
+
권장 매핑:
|
|
196
|
+
|
|
197
|
+
- Claude Code: 프로젝트 `.claude/skills/<name>/SKILL.md` 또는 `.claude/commands/<name>.md`
|
|
198
|
+
- Cursor: 프로젝트 `.cursor/commands/<name>.md`
|
|
199
|
+
- VS Code Copilot: 프로젝트 `.github/prompts/<name>.prompt.md`
|
|
200
|
+
- Codex: 우선 짧은 자연어와 skill 호출을 사용하고, 커스텀 slash 표준이 확인되면 별도 노출
|
|
201
|
+
|
|
202
|
+
### 스킬 리스트와 기존 스킬 추가
|
|
203
|
+
|
|
204
|
+
스킬은 전체 workflow를 대체하지 않는 짧은 행동 playbook입니다. DeukAgentFlow에서는 티켓/APC/Phase Gate가 계속 상위 권한이고, 스킬은 특정 실패 패턴에서 에이전트의 움직임만 더 날카롭게 만듭니다.
|
|
205
|
+
|
|
206
|
+
`init`은 first-party 스킬 원본을 프로젝트 안으로 복제하지 않습니다. 스킬 원본은 DeukAgentFlow 패키지의 `templates/skills/`가 SSoT입니다.
|
|
207
|
+
|
|
208
|
+
기본 추천 장착:
|
|
209
|
+
|
|
210
|
+
| 스킬 | 이유 |
|
|
211
|
+
|---|---|
|
|
212
|
+
| `safe-refactor` | 대부분의 AI 코딩 사고가 과한 리팩터링과 범위 확장에서 시작하기 때문 |
|
|
213
|
+
| `generated-file-guard` | generated output 직접 수정은 리뷰와 재생성 단계에서 가장 자주 깨지기 때문 |
|
|
214
|
+
|
|
215
|
+
선택 장착:
|
|
216
|
+
|
|
217
|
+
| 스킬 | 쓸 때 |
|
|
218
|
+
|---|---|
|
|
219
|
+
| `context-recall` | 과거 티켓/결정/실패 패턴을 찾아야 할 때 |
|
|
220
|
+
| `project-pilot` | 다국어, generated/runtime, protocol, 반복 drift 리팩터링 |
|
|
221
|
+
|
|
222
|
+
사용자는 이렇게 짧게 말해도 됩니다.
|
|
223
|
+
|
|
224
|
+
| 하고 싶은 일 | 말하기 |
|
|
225
|
+
|---|---|
|
|
226
|
+
| 설치 가능한 스킬 보기 | "스킬 리스트" |
|
|
227
|
+
| 기존 스킬 추가 | "safe-refactor 추가" |
|
|
228
|
+
| Claude에 노출 | "스킬 Claude에 노출" |
|
|
229
|
+
| Cursor에 노출 | "스킬 Cursor에 노출" |
|
|
230
|
+
|
|
231
|
+
메인테이너/자동화에서는 CLI를 직접 사용할 수 있습니다.
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
deuk-agent-flow skill list
|
|
235
|
+
deuk-agent-flow skill add --skill safe-refactor
|
|
236
|
+
deuk-agent-flow skill add --skill generated-file-guard
|
|
237
|
+
deuk-agent-flow skill add --skill context-recall
|
|
238
|
+
deuk-agent-flow skill add --skill project-pilot
|
|
239
|
+
deuk-agent-flow skill expose --platform claude
|
|
240
|
+
deuk-agent-flow skill expose --platform cursor
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
`skill add`/`skill expose`는 스킬 사용 경로를 열지만, `init`은 로컬 스킬 템플릿 복제본을 만들거나 보존하지 않습니다.
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## 4. 팁 및 모범 사례
|
|
248
|
+
|
|
249
|
+
- **No Ticket, No Code**: 티켓 없이 코드를 수정하는 것은 금지됩니다. 사용자는 짧게 말하고, 에이전트가 티켓 기록을 남깁니다.
|
|
250
|
+
- **RAG 활용**: `mcp_deukcontext_search_*` 도구를 사용하여 과거 티켓이나 구현 사례를 검색하면 환각을 줄일 수 있습니다.
|
|
251
|
+
- **주기적 동기화**: 프로젝트 규칙이 변경되었다면 `deuk-agent-flow init`을 다시 실행하여 모든 에이전트 포인터를 갱신하세요.
|