deuk-agent-rule 2.2.2 → 2.3.1
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.md +33 -0
- package/README.ko.md +40 -16
- package/README.md +30 -7
- package/bundle/AGENTS.md +70 -36
- package/bundle/rules/multi-ai-workflow.mdc +0 -1
- package/bundle/templates/TICKET_TEMPLATE.md +1 -1
- package/package.json +4 -1
- package/scripts/cli-args.mjs +9 -0
- package/scripts/cli-init-commands.mjs +27 -2
- package/scripts/cli-init-logic.mjs +4 -0
- package/scripts/cli-prompts.mjs +17 -45
- package/scripts/cli-ticket-commands.mjs +100 -56
- package/scripts/cli-ticket-logic.mjs +322 -46
- package/scripts/cli-utils.mjs +64 -1
- package/scripts/cli.mjs +18 -6
- package/scripts/sync-oss.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,39 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [2.3.1] - 2026-04-17
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **readme:** add changelog and automated release instructions
|
|
13
|
+
|
|
14
|
+
## [2.3.0] - 2026-04-17
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- AI 파이프라인 연동 기반 및 선택적 동기화 시스템 고도화
|
|
20
|
+
- **cli:** add --submodule filter to ticket list command
|
|
21
|
+
- **cli:** restore ticket archive and reports workflows to modular architecture
|
|
22
|
+
- **rules:** advance rules for Unity Client, WebApp, and C++ Server hybrid environment
|
|
23
|
+
- **ticket:** implementation of decentralized ticket management & sharing policy
|
|
24
|
+
- **ticket:** upgrade to V2 YAML Front-matter and Categorized List
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- **ticket:** deprecate LATEST.md, unify pointer to ACTIVE_TICKET.md
|
|
30
|
+
- **ticket:** DeukAgentRules 현재 진행중인 티켓 안나오던 문제 해결
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- **readme:** clarify YAML front matter preservation and distributed ticket workflow for v2.2.2
|
|
36
|
+
- **readme:** restore count headers and npm badges
|
|
37
|
+
- **rules:** enforce CLI usage for ticket reading to prevent manual JSON parsing
|
|
38
|
+
- update CLI reference with close and migrate commands
|
|
39
|
+
|
|
7
40
|
## [1.0.18] - 2026-04-12
|
|
8
41
|
|
|
9
42
|
|
package/README.ko.md
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<br />
|
|
3
|
+
<h1>DeukAgentRules (득에이전트룰스)</h1>
|
|
4
|
+
<p>
|
|
5
|
+
<a href="https://www.npmjs.com/package/deuk-agent-rule"><img src="https://img.shields.io/npm/v/deuk-agent-rule.svg" alt="npm version" /></a>
|
|
6
|
+
<a href="https://www.npmjs.com/package/deuk-agent-rule"><img src="https://img.shields.io/npm/dt/deuk-agent-rule.svg" alt="npm downloads" /></a>
|
|
7
|
+
</p>
|
|
8
|
+
<p><b>고신호(High-Signal) 인코딩 & 규칙 표준화 엔진</b></p>
|
|
9
|
+
<p><a href="https://deukpack.app">Deuk Family</a> 생태계의 핵심 에이전트 인프라</p>
|
|
10
|
+
</div>
|
|
2
11
|
|
|
3
12
|
> **Deuk Family**의 핵심 모듈 가운데 하나입니다. 구조화된 규칙으로 AI 에이전트의 협업 효율을 극대화합니다.
|
|
4
13
|
|
|
@@ -10,7 +19,7 @@ Cursor, GitHub Copilot, Gemini / Antigravity, Claude, Windsurf, JetBrains AI Ass
|
|
|
10
19
|
프로젝트 규칙(`AGENTS.md`, `.cursor/rules`)을 표준화하고, **티켓 기반 워크플로우**를 통해 쓸데없는 프롬프트 토큰 낭비와 AI의 맥락 환각(Hallucination)을 강력하게 방어합니다.
|
|
11
20
|
|
|
12
21
|
> **🚀 핵심 가치:**
|
|
13
|
-
> 세션당 약 1,500~2,000 토큰에 달하는 강제 로드 컨텍스트를 200~300 토큰 수준으로 압축합니다. AI가 모놀리식 전체 레포지토리를 헤매지 않도록,
|
|
22
|
+
> 세션당 약 1,500~2,000 토큰에 달하는 강제 로드 컨텍스트를 200~300 토큰 수준으로 압축합니다. AI가 모놀리식 전체 레포지토리를 헤매지 않도록, 작업이 속한 **"해당 서브모듈(Submodule)"** 내부에 티켓을 격리하여 가장 정확한 맥락에서 작업을 지시할 수 있습니다.
|
|
14
23
|
|
|
15
24
|
---
|
|
16
25
|
|
|
@@ -23,7 +32,8 @@ npm install deuk-agent-rule
|
|
|
23
32
|
npx deuk-agent-rule init
|
|
24
33
|
```
|
|
25
34
|
|
|
26
|
-
초기화 시 프로젝트의 **기술
|
|
35
|
+
초기화 시 프로젝트의 **기술 스택**, **사용 중인 에이전트 툴**, 그리고 **티켓 공유 정책**을 묻는 대화형 질문이 나타납니다.
|
|
36
|
+
- **티켓 공유 정책**: 각 저장소 단위의 `.deuk-agent-ticket/` 폴더를 Git으로 추적하여 팀과 공유할지, 아니면 로컬 전용으로 둘지 결정합니다.
|
|
27
37
|
- 스택 변경이 필요 없으면 이후에는 `npx deuk-agent-rule init`만 쳐서 규칙을 최신화할 수 있습니다.
|
|
28
38
|
- CI나 스크립트 환경에서는 대화형 입력을 끄기 위해 `--non-interactive` 파라미터를 추가하세요.
|
|
29
39
|
|
|
@@ -37,22 +47,26 @@ npx deuk-agent-rule init --non-interactive
|
|
|
37
47
|
|
|
38
48
|
---
|
|
39
49
|
|
|
40
|
-
## 🎯 핵심 워크플로우 (The Ticket Workflow)
|
|
50
|
+
## 🎯 핵심 워크플로우 (The Distributed Ticket Workflow)
|
|
41
51
|
|
|
42
|
-
`npx deuk-agent-rule init`을 실행하면
|
|
52
|
+
`npx deuk-agent-rule init`을 실행하면 현재 저장소 루트(서브모듈 포함)에 아래 두 개의 핵심 폴더가 등장합니다.
|
|
43
53
|
|
|
44
|
-
1. **`.deuk-agent-templates/` (에이전트 템플릿)**: AI가 어떠한 양식으로 작업을 처리하고 보고해야 하는지 정의된 공식 뼈대(`TICKET_TEMPLATE.md`)가 지정됩니다.
|
|
45
|
-
2. **`.deuk-agent-ticket/` (티켓 실행 공간)**:
|
|
54
|
+
1. **`.deuk-agent-templates/` (에이전트 템플릿)**: AI가 어떠한 양식으로 작업을 처리하고 보고해야 하는지 정의된 공식 뼈대(`TICKET_TEMPLATE.md`)가 지정됩니다.
|
|
55
|
+
2. **`.deuk-agent-ticket/` (티켓 실행 공간)**: 실제 지시서(`TICKET-XXX.md`)가 발급되는 공간입니다. 서브모듈 단위로 티켓을 분산 관리할 수 있어 서브모듈만 떼어가도 히스토리가 유지됩니다. (공유 정책에 따라 `.gitignore`에 자동으로 기재될 수 있습니다.)
|
|
46
56
|
|
|
47
57
|
이러한 샌드박스 폴더들을 활용하여 스퍼트를 올리는 **최적의 AI 코딩 3단계**는 다음과 같습니다.
|
|
48
58
|
|
|
49
|
-
### [Step 1] 티켓 발급 및
|
|
50
|
-
AI에게 중구난방으로 지시하지 마세요. 명확한 티켓을 발급하여 **문맥(Context)을
|
|
59
|
+
### [Step 1] 티켓 발급 및 계층적 관리 (Ticket Creation & Delegation)
|
|
60
|
+
AI에게 중구난방으로 지시하지 마세요. 명확한 티켓을 발급하여 **문맥(Context)을 소속 저장소 단위로 좁혀주어야** 합니다.
|
|
51
61
|
|
|
52
62
|
```bash
|
|
53
|
-
npx deuk-agent-rule ticket create --topic ui-refactoring --group frontend --project DeukUI
|
|
63
|
+
npx deuk-agent-rule ticket create --topic ui-refactoring --group frontend --project DeukUI
|
|
54
64
|
```
|
|
55
65
|
명령어를 치면 `.deuk-agent-ticket/` 폴더 내에 템플릿이 입혀진 `TICKET-ui-refactoring.md` 파일이 생성됩니다.
|
|
66
|
+
|
|
67
|
+
> [!IMPORTANT]
|
|
68
|
+
> **티켓 작성 (주의사항)**: 새로 생성된 티켓에는 **YAML Front Matter** (`--- id: ... ---`)가 포함되어 있습니다. 내용을 작성할 때 **파일 전체를 덮어쓰지 마십시오.** 반드시 헤더 아래에 내용을 추가하거나 부분 편집 도구를 사용하여 기존 YAML 메타데이터를 보존해야 합니다. 프론트매터가 삭제되면 티켓 인덱싱 시스템이 파손됩니다.
|
|
69
|
+
|
|
56
70
|
개발자는 이 파일 내의 `[Target Submodule]` 속성에 AI가 들여다보아야 할 고립된 경로(예: `src/client`)만을 명시해 줍니다.
|
|
57
71
|
|
|
58
72
|
### [Step 2] 세션 인수인계 및 에이전트 격리 실행 (Agent Execution)
|
|
@@ -91,7 +105,7 @@ npx deuk-agent-rule ticket list
|
|
|
91
105
|
> *"본격적인 작업을 시작하기 전에 워크스페이스 Root에 있는 `AGENTS.md` (DeukAgentRules) 문서를 끝까지 읽어줘. 현재 프로젝트의 핵심 룰, Identity, 그리고 티켓 워크플로우에 대해 완벽히 숙지해야 해. 숙지를 마쳤다면 내용을 요약하지 말고 '규칙 확인 완료'라고 짧게 대답한 뒤 첫 지시를 대기해."*
|
|
92
106
|
|
|
93
107
|
### 2. 티켓 기반 타깃 작업 시작 (권장)
|
|
94
|
-
> *"방금
|
|
108
|
+
> *"방금 설치/발급된 `.deuk-agent-ticket/TICKET-XXX.md` 티켓을 열고, 현재 저장소(Target Submodule) 경로 내에서만 파일 탐색 및 작업을 진행해. 다른 서브모듈로 벗어나거나 임의의 파일을 건드리지 마."*
|
|
95
109
|
|
|
96
110
|
---
|
|
97
111
|
|
|
@@ -104,13 +118,13 @@ npx deuk-agent-rule ticket list
|
|
|
104
118
|
|
|
105
119
|
| 커맨드 | 설명 / 자연어 프롬프트 지시 예시 |
|
|
106
120
|
|--------|------|
|
|
107
|
-
| `npx deuk-agent-rule ticket create ...` | 신규 티켓 문서 생성 (`--group`, `--project` 지정 가능) <br>💬 *"새 티켓 만들어 (주제: refactor, 타겟: sub1)"* |
|
|
108
|
-
| `npx deuk-agent-rule ticket list` | 활성 티켓의 현재 상태 및 리스트업 (`--archived`, `--all` 지원) <br>💬 *"티켓 리스트"* |
|
|
121
|
+
| `npx deuk-agent-rule ticket create ...` | 신규 티켓 문서 생성 (`--group`, `--project`, `--submodule` 지정 가능) <br>💬 *"새 티켓 만들어 (주제: refactor, 타겟: sub1)"* |
|
|
122
|
+
| `npx deuk-agent-rule ticket list` | 활성 티켓의 현재 상태 및 리스트업 (`--archived`, `--all`, `--json` 지원) <br>💬 *"티켓 리스트"* |
|
|
109
123
|
| `npx deuk-agent-rule ticket use --latest ...` | 빌드 파이프라인 연동을 위해 최근 티켓의 파일 경로만 반환 <br>💬 *"최근 티켓 경로"* |
|
|
110
124
|
| `npx deuk-agent-rule ticket close ...` | 파일을 물리적으로 이동시키지 않고 상태만 완료로 잠금(Soft-close) <br>💬 *"현재 티켓 상태 닫아 (완료)"* |
|
|
125
|
+
| `npx deuk-agent-rule ticket upgrade` | 과거 티켓 구조를 V2(YAML FM)로 마이그레이션 및 서브모듈 분산(DEFRAG) 실행 <br>💬 *"티켓 V2 업그레이드"* |
|
|
111
126
|
| `npx deuk-agent-rule ticket archive ...` | 완료된 티켓을 안전하게 보관소(`archive/`)로 이동 및 갱신 <br>💬 *"현재 티켓 아카이브해 (보고서 첨부)"* |
|
|
112
127
|
| `npx deuk-agent-rule ticket reports` | 영구 보관된 에이전트 작업 보고서(`reports/`) 목록 조회 <br>💬 *"완료된 티켓 보고서 목록"* |
|
|
113
|
-
| `npx deuk-agent-rule ticket migrate` | 과거 단일 LATEST.md 데이터를 신규 모듈형 인덱스 구조로 강제 이전 <br>💬 *"이전 티켓 데이터 마이그레이션"* |
|
|
114
128
|
|
|
115
129
|
### Init 고급 옵션
|
|
116
130
|
| 플래그 | 기본값 | 설명 |
|
|
@@ -121,5 +135,15 @@ npx deuk-agent-rule ticket list
|
|
|
121
135
|
| `--dry-run` | 끔 | 실제 파일을 생성/변조하지 않고 콘솔에 동작 결과 텍스트만 출력 |
|
|
122
136
|
| `--backup` | 끔 | `AGENTS.md`나 룰 파일 덮어쓰기 전 원본을 `*.bak`으로 안전 보관 |
|
|
123
137
|
|
|
124
|
-
##
|
|
125
|
-
|
|
138
|
+
## 📦 릴리즈 및 체인지로그 (Changelog) 정책
|
|
139
|
+
|
|
140
|
+
본 패키지(`DeukAgentRules`)의 시스템 템플릿 추가 및 기능 변경을 배포하기 전에 반드시 다음 절차를 따라 릴리즈 프로세스를 진행해야 합니다:
|
|
141
|
+
|
|
142
|
+
1. **변경사항 커밋**: 문서 및 룰 스크립트 수정 완료 후 `git add` & `git commit` (Conventional Commits 형식 권장, ex: `feat: ...`, `fix: ...`)
|
|
143
|
+
2. **버전 펌핑 및 체인지로그 자동 생성**:
|
|
144
|
+
* Patch (버그 수정): `npm run bump:patch`
|
|
145
|
+
* Minor (기능 추가): `npm run bump:minor`
|
|
146
|
+
* Major (룰/템플릿 대격변): `npm run bump:major`
|
|
147
|
+
|
|
148
|
+
위 명령어를 실행하면 내부적으로 `commit-and-tag-version` 툴이 작동되어 `package.json` 버전 상향, `CHANGELOG.md` 자동 갱신 요약, 릴리즈 커밋, 그리고 태깅 작업까지 한번에 즉시 처리됩니다.
|
|
149
|
+
3. **분산 배포 보정 (OSS Sync)**: 에이전트를 통해 `npm run sync:oss`를 실행하면 자동화 스크립트가 릴리즈 에셋을 스캔하여 OSS 미러 저장소(`DeukAgentRulesOSS`)로 최종적인 퍼블리시 버전을 복제 및 반영합니다.
|
package/README.md
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<br />
|
|
3
|
+
<h1>DeukAgentRules</h1>
|
|
4
|
+
<p>
|
|
5
|
+
<a href="https://www.npmjs.com/package/deuk-agent-rule"><img src="https://img.shields.io/npm/v/deuk-agent-rule.svg" alt="npm version" /></a>
|
|
6
|
+
<a href="https://www.npmjs.com/package/deuk-agent-rule"><img src="https://img.shields.io/npm/dt/deuk-agent-rule.svg" alt="npm downloads" /></a>
|
|
7
|
+
</p>
|
|
8
|
+
<p><b>High-Signal Encoding & Rule Standardization Engine</b></p>
|
|
9
|
+
<p>Part of the <a href="https://deukpack.app">Deuk Family</a> ecosystem.</p>
|
|
10
|
+
</div>
|
|
2
11
|
|
|
3
12
|
> A core module of the **Deuk Family**. Maximizes collaboration efficiency of AI agents through structured rules.
|
|
4
13
|
|
|
@@ -50,9 +59,13 @@ The optimal **3-Step AI Coding Sequence** utilizing these sandbox folders is as
|
|
|
50
59
|
Do not issue scattered, unbounded commands to your AI. Narrowing the **context** via a clear ticket is strictly required to prevent astronomical costs and accidental code corruption.
|
|
51
60
|
|
|
52
61
|
```bash
|
|
53
|
-
npx deuk-agent-rule ticket create --topic ui-refactoring --group frontend --project DeukUI
|
|
62
|
+
npx deuk-agent-rule ticket create --topic ui-refactoring --group frontend --project DeukUI
|
|
54
63
|
```
|
|
55
64
|
This command instantly creates a templated `TICKET-ui-refactoring.md` file within the `.deuk-agent-ticket/` directory.
|
|
65
|
+
|
|
66
|
+
> [!IMPORTANT]
|
|
67
|
+
> **Filling the Ticket (CRITICAL)**: The newly created ticket already contains **YAML Front Matter** (`--- id: ... ---`). **DO NOT** overwrite the entire file when adding your plan. ALWAYS append your content below the header or use partial file editing to preserve the existing YAML metadata. Erasing the Front Matter corrupts the ticketing system.
|
|
68
|
+
|
|
56
69
|
The developer must simply specify the exact isolated directory path (e.g., `src/client`) inside the `[Target Submodule]` attribute at the top of the generated file.
|
|
57
70
|
|
|
58
71
|
### [Step 2] Agent Execution & Handoff (Ticket Session)
|
|
@@ -104,13 +117,13 @@ Instead of manually typing the CLI commands below into the terminal, you can **d
|
|
|
104
117
|
|
|
105
118
|
| Command | Description / Natural Language Prompt Example |
|
|
106
119
|
|--------|------|
|
|
107
|
-
| `npx deuk-agent-rule ticket create ...` | Generates a new ticket document (accepts `--group`, `--project`) <br>💬 *"Create new ticket (topic: refactor)"* |
|
|
108
|
-
| `npx deuk-agent-rule ticket list` | Lists and displays active tickets (`--archived`, `--all` supported) <br>💬 *"Ticket list"* |
|
|
120
|
+
| `npx deuk-agent-rule ticket create ...` | Generates a new ticket document (accepts `--group`, `--project`, `--submodule`) <br>💬 *"Create new ticket (topic: refactor)"* |
|
|
121
|
+
| `npx deuk-agent-rule ticket list` | Lists and displays active tickets (`--archived`, `--all`, `--json` supported) <br>💬 *"Ticket list"* |
|
|
109
122
|
| `npx deuk-agent-rule ticket use --latest ...` | Returns only the file path of the most recent ticket <br>💬 *"Recent ticket path"* |
|
|
110
123
|
| `npx deuk-agent-rule ticket close ...` | Soft-closes a target ticket by locking its status to completed without moving the file <br>💬 *"Close this ticket"* |
|
|
124
|
+
| `npx deuk-agent-rule ticket upgrade` | Migrates legacy ticket structures to V2 (YAML FM) and triggers submodule DEFRAG <br>💬 *"Upgrade tickets to v2"* |
|
|
111
125
|
| `npx deuk-agent-rule ticket archive ...` | Securely moves completed tickets to `archive/` and updates INDEX <br>💬 *"Archive this ticket (attach report)"* |
|
|
112
126
|
| `npx deuk-agent-rule ticket reports` | Lists structurally preserved agent work reports (`reports/`) <br>💬 *"List archived reports"* |
|
|
113
|
-
| `npx deuk-agent-rule ticket migrate` | Migrates legacy LATEST.md structures into indexed module architecture <br>💬 *"Migrate legacy tickets"* |
|
|
114
127
|
|
|
115
128
|
### Advanced Init Options
|
|
116
129
|
| Flag | Default | Description |
|
|
@@ -121,5 +134,15 @@ Instead of manually typing the CLI commands below into the terminal, you can **d
|
|
|
121
134
|
| `--dry-run` | Off | Simulates the execution text in the console without generating/altering files |
|
|
122
135
|
| `--backup` | Off | Safely creates `*.bak` copies of `AGENTS.md` and rule files before overwriting |
|
|
123
136
|
|
|
124
|
-
##
|
|
125
|
-
|
|
137
|
+
## 📦 Release & Changelog Policy
|
|
138
|
+
|
|
139
|
+
Before pushing any core updates, system templates, or feature changes to this package (`DeukAgentRules`), you must strictly follow this procedure to bump the version safely:
|
|
140
|
+
|
|
141
|
+
1. **Apply Changes**: Complete documentation and rule script updates, then `git add` and `git commit` (Conventional Commits format recommended, e.g., `feat: ...`, `fix: ...`).
|
|
142
|
+
2. **Version Bump & Automated Changelog**:
|
|
143
|
+
* Patch (Bug fixes): `npm run bump:patch`
|
|
144
|
+
* Minor (New features): `npm run bump:minor`
|
|
145
|
+
* Major (Core/Breaking changes): `npm run bump:major`
|
|
146
|
+
|
|
147
|
+
Executing the bump command will trigger the `commit-and-tag-version` pipeline: it bumps the version in `package.json`, auto-generates the `CHANGELOG.md` log, creates a release commit, and applies the release tag.
|
|
148
|
+
3. **Synchronize & Mirror (OSS Sync)**: As a final step, ask your agent to run `npm run sync:oss`. The automation script will clean the release assets and push the bundled versions to the mirror repository (`DeukAgentRulesOSS`).
|
package/bundle/AGENTS.md
CHANGED
|
@@ -1,36 +1,70 @@
|
|
|
1
|
-
<!-- deuk-agent-rule:begin -->
|
|
2
|
-
|
|
3
|
-
# Project Agent Rules
|
|
4
|
-
|
|
5
|
-
## Identity
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
<!-- deuk-agent-rule:begin -->
|
|
2
|
+
|
|
3
|
+
# Project Agent Rules
|
|
4
|
+
|
|
5
|
+
## Identity
|
|
6
|
+
|
|
7
|
+
- **[COMMUNICATION TONE STRICT RULE]**
|
|
8
|
+
- You are a Senior Fullstack Systems Engineer specializing in Unity/C#, WebApp architectures, and High-Performance C++ Server development.
|
|
9
|
+
- Your communication must be strictly dry, concise, and technical.
|
|
10
|
+
- You MUST NOT use emojis, exclamation marks(!), or dramatic language (e.g., "대참사", "완벽하게", "시한폭탄").
|
|
11
|
+
- Do not attempt to "wow" the user with your tone.
|
|
12
|
+
- For Korean responses, use polite '해요체(-요)' instead of formal '하십시오체(-다/까)'.
|
|
13
|
+
- **핸드오프 저장 후 채팅**: 파일로 남긴 뒤 채팅에 **`Path: \`루트기준/전체/경로.md\``** 형태로 **한 줄**을 반드시 넣어 다음 세션이 동일 파일을 연다.
|
|
14
|
+
- **플랜 UI(선택)**: 플랜 전용 패널에 같은 문서를 띄우려면, 관리 중인 **multi-ai-workflow** 규칙에 적힌 **선택적 미러 경로**(예: `.cursor/plans/*.plan.md`)에 동일 본문을 둘 수 있다. 정본은 지정된 티켓 폴더를 유지하고 두 곳 내용을 맞출 것.
|
|
15
|
+
|
|
16
|
+
English sections above are canonical for tooling; this block is a short Korean mirror for the same rules.
|
|
17
|
+
|
|
18
|
+
## Ticket format & Submodule Isolation
|
|
19
|
+
|
|
20
|
+
When handing work between tools or people—especially in an environment with multiple submodules like DeukUI, DeukPack, etc.—you **MUST NOT** use free-form markdown.
|
|
21
|
+
|
|
22
|
+
You **MUST** use the official Ticket Skeleton Template located at:
|
|
23
|
+
`<Current Repo Root>/.deuk-agent-templates/TICKET_TEMPLATE.md`
|
|
24
|
+
|
|
25
|
+
**Hard Rules**:
|
|
26
|
+
- **No hotpath LINQ (금지)**: Update 루프에서 LINQ, boxing, frame allocation 없음
|
|
27
|
+
- **Root Cleanliness (하드룰)**: 작업용 스크립트(`fix_*.py`, `tmp_*.js` 등)를 워크스페이스 루트에 직접 생성하지 마십시오. 모든 일시적 스크립트는 `tmp/scripts/` 또는 `tmp/` 폴더 내에 생성해야 합니다.
|
|
28
|
+
- **C++ Server Hard Rules**:
|
|
29
|
+
- **No Raw Pointers**: Use `std::unique_ptr` or `std::shared_ptr` for resource ownership.
|
|
30
|
+
- **Header Cleanliness**: Keep `#include` minimum in headers; use forward declarations where possible.
|
|
31
|
+
- **Async Safety**: Every shared resource in the logic loop strictly requires a mutex or atomic protection.
|
|
32
|
+
- **WebApp / Frontend**:
|
|
33
|
+
- **Protocol Integrity**: Never hardcode JSON structures; always use `DeukPack` generated JS/TS codecs for communication.
|
|
34
|
+
- **Ticket format (필수)**: 멀티스텝은 `.deuk-agent-templates/TICKET_TEMPLATE.md` (또는 활성 서브모듈의 템플릿) 사용
|
|
35
|
+
|
|
36
|
+
By **creating a ticket using the CLI** (`npx deuk-agent-rule ticket create --topic <name>`), you ensure that:
|
|
37
|
+
1. The **Target Submodule** is explicitly locked.
|
|
38
|
+
2. The agent is forced to read specific **Module Rules** (e.g., `.deuk-agent-templates/MODULE_RULE_TEMPLATE.md`).
|
|
39
|
+
3. Execution happens in explicit **Phases** to prevent context bleed.
|
|
40
|
+
|
|
41
|
+
## DeukPack Codec & IDL Strict Rules (득팩 코어 체재 하드 룰)
|
|
42
|
+
|
|
43
|
+
- **IDL Field Syntax (앵글 브래킷)**: 득팩의 필드 정의는 `1> int32 id` 형식을 따릅니다. Thrift 레거시 문법인 `:`(콜론), 세미콜론(`;`), `i32`, `i64`를 더 이상 문서나 코드에 사용하지 마십시오. 오로지 `id> type name` 및 `int32`, `int64` 표준 명칭을 강제합니다.
|
|
44
|
+
- **Unified Pack API**: 과거의 `DeukPackSerializer`, `DeukPackEngine`, `WriteWithOverrides`, `toJsonWithOverrides` 등은 모두 폐기되었습니다. 모든 코드에는 `DeukPackCodec` 식별자와 유니파이드 API(`byte[] bin = Dto.Hero.Pack(format, fieldIds, overrides)`, `hero.UnpackFrom(bin)`)만 사용해야 합니다.
|
|
45
|
+
- **Namespace Requirement**: Every `.deuk` schema MUST explicitly declare a namespace (e.g., `namespace Dto`). Never define global structs without a namespace. Code examples MUST use the fully qualified namespace path (e.g., `Dto.Hero.Pack()`).
|
|
46
|
+
|
|
47
|
+
## AI Model Compliance & Selection Policy
|
|
48
|
+
|
|
49
|
+
**Model Over-alignment vs Compliance (High vs Flash)**
|
|
50
|
+
- **Flash/Fast Models**: Highly instruct-tuned for strict mechanical task execution. Due to a smaller parameter footprint and less internal "world knowledge", they explicitly follow literal agent rules and format templates exactly as instructed.
|
|
51
|
+
- **High/Pro Models**: Possess vast world knowledge and are optimized for helpfulness. This often leads to "overthinking" (prioritizing a helpful or natural answer over rigid, arbitrary constraints), resulting in frequent rule violations like ignoring length limits or template structures. They also experience attention dilution in deep analysis tasks.
|
|
52
|
+
|
|
53
|
+
**Assignment Strategy**:
|
|
54
|
+
1. **Flash Models**: Use for strict template filling, simple code generation, porting, and repetitive ticket execution (`.deuk-agent-ticket/*`) where strict compliance is mandatory.
|
|
55
|
+
2. **High/Pro Models**: Use for architectural planning, deep legacy code comprehension, complex bug squashing, and creative solutions. Supply heavy failure warnings in the prompt to force formatting compliance.
|
|
56
|
+
|
|
57
|
+
## 🔗 Ticket Framework & Execution Strategy
|
|
58
|
+
|
|
59
|
+
When given a ticket, you MUST run commands and write code **strictly within the boundaries** of the `[Target Submodule]` defined in the `TICKET-XXX.md`.
|
|
60
|
+
|
|
61
|
+
1. **Create the Ticket**: ALWAYS use `npx deuk-agent-rule ticket create --topic <name>` to generate a new ticket. **DO NOT** manually create `.md` files or copy templates directly to bypass the CLI.
|
|
62
|
+
2. **Read the Ticket**: ALWAYS use `npx deuk-agent-rule ticket use --latest` (or `npx deuk-agent-rule ticket list`) to locate and read the active ticket. DO NOT manually parse INDEX.json or scan directories.
|
|
63
|
+
3. **Fill the Ticket (CRITICAL)**: The newly created ticket already contains YAML Front Matter (`--- id: ... ---`). **DO NOT** overwrite the entire file when adding your plan. ALWAYS use partial file editing tools or append text carefully to preserve the existing YAML Front Matter. Erasing the Front Matter corrupts the ticketing index.
|
|
64
|
+
4. **Execute Phase**: Process only the checklist for the **Current Phase**. Do not hallucinate or wander into other architectural areas.
|
|
65
|
+
5. **Update Status**: Mark checkboxes (`[x]`) as tasks are completed.
|
|
66
|
+
6. **Archive on Completion**: When all phases are completed, append the execution report at the bottom under a `## 📜 Execution Report` header. **Then, YOU MUST execute `npx deuk-agent-rule ticket archive <ticket-id>` (or `--latest`)** to properly close and archive the ticket. DO NOT attempt to manually `mv` files.
|
|
67
|
+
|
|
68
|
+
All Tickets are volatile and strictly local. Do not attempt to version them or mirror them to obsolete plan directories.
|
|
69
|
+
|
|
70
|
+
<!-- deuk-agent-rule:end -->
|
|
@@ -36,7 +36,6 @@ When the user asks to prepare work for another tool:
|
|
|
36
36
|
3. Do not include editor-specific instructions (token budgets, local rule file paths).
|
|
37
37
|
4. When the ticket must persist (user asks to save or document it, or it is the canonical next-step spec), create or update a Markdown file under internal implementation documentation (see AGENTS.md, Ticket persistence). Prefer the unified .deuk-agent-ticket/ directory for both the index (TICKET_LIST.md) and the topic files; init gitignores .deuk-agent-ticket/ by default. Use the same ticket template; do not place this in public README/landing unless the project explicitly treats this as its internal log. In Markdown links and backtick citations, use the full path from the repository root — never a bare filename.
|
|
38
38
|
5. After writing a persisted ticket, in chat include one dedicated line with the full repo-root-relative path so the next session can open it unambiguously, for example: `Path: .deuk-agent-ticket/sub/container-unified-20260329-120000.md` (same path you used in the file). Repeat the full path in links elsewhere in the same message if helpful.
|
|
39
|
-
6. Optional last line inside the persisted file (improves search and skim): `<!-- Ticket (repo-relative): path/from/repo/root.md -->` on the very last line.
|
|
40
39
|
7. Write persisted ticket content in the user's conversation language (e.g., Korean) unless they specify another language. When using Korean, follow the concise polite style (-요) as described in AGENTS.md.
|
|
41
40
|
|
|
42
41
|
## Context Preservation (New Issues)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deuk-agent-rule",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "DeukAgentRules: generic AGENTS.md + .cursor rule templates with init/merge CLI (npm name: deuk-agent-rule).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents-md",
|
|
@@ -48,5 +48,8 @@
|
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"commit-and-tag-version": "^12.7.1"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"ejs": "^5.0.2"
|
|
51
54
|
}
|
|
52
55
|
}
|
package/scripts/cli-args.mjs
CHANGED
|
@@ -12,6 +12,7 @@ export function parseTicketArgs(argv) {
|
|
|
12
12
|
else if (a === "--from") out.from = argv[++i];
|
|
13
13
|
else if (a === "--ref") out.ref = argv[++i];
|
|
14
14
|
else if (a === "--limit") out.limit = Number(argv[++i]);
|
|
15
|
+
else if (a === "--submodule") out.submodule = argv[++i];
|
|
15
16
|
else if (a === "--latest") out.latest = true;
|
|
16
17
|
else if (a === "--path-only") out.pathOnly = true;
|
|
17
18
|
else if (a === "--print-content") out.printContent = true;
|
|
@@ -19,6 +20,10 @@ export function parseTicketArgs(argv) {
|
|
|
19
20
|
else if (a === "--status") out.status = argv[++i];
|
|
20
21
|
else if (a === "--archived") out.archived = true;
|
|
21
22
|
else if (a === "--report") out.report = argv[++i];
|
|
23
|
+
else if (a === "--json") out.json = true;
|
|
24
|
+
else if (a === "--remote") out.remote = argv[++i];
|
|
25
|
+
else if (a === "--sync") out.sync = true;
|
|
26
|
+
else if (a === "--no-sync") out.sync = false;
|
|
22
27
|
}
|
|
23
28
|
return out;
|
|
24
29
|
}
|
|
@@ -39,6 +44,10 @@ export function parseArgs(argv) {
|
|
|
39
44
|
else if (a === "--rules") out.rules = argv[++i];
|
|
40
45
|
else if (a === "--cursorrules") out.cursorrules = argv[++i];
|
|
41
46
|
else if (a === "--append-if-no-markers") out.appendIfNoMarkers = true;
|
|
47
|
+
else if (a === "--json") out.json = true;
|
|
48
|
+
else if (a === "--remote") out.remote = argv[++i];
|
|
49
|
+
else if (a === "--sync") out.sync = true;
|
|
50
|
+
else if (a === "--no-sync") out.sync = false;
|
|
42
51
|
else if (a === "-h" || a === "--help") out.help = true;
|
|
43
52
|
}
|
|
44
53
|
return out;
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import { join } from "path";
|
|
2
|
-
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
2
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync, copyFileSync, readdirSync } from "fs";
|
|
3
3
|
import { resolveMarkers, resolveCursorrulesMarkers, applyAgents, applyRules, applyCursorrules, readBundleAgents } from "./merge-logic.mjs";
|
|
4
4
|
import { ensureTicketDirAndGitignore } from "./cli-init-logic.mjs";
|
|
5
|
-
import { loadInitConfig, writeInitConfig } from "./cli-
|
|
5
|
+
import { loadInitConfig, writeInitConfig } from "./cli-utils.mjs";
|
|
6
|
+
import { runInteractive } from "./cli-prompts.mjs";
|
|
7
|
+
|
|
8
|
+
function syncTemplates(cwd, bundleRoot, dryRun) {
|
|
9
|
+
const tplSrcDir = join(bundleRoot, "templates");
|
|
10
|
+
const tplDestDir = join(cwd, ".deuk-agent-templates");
|
|
11
|
+
if (!existsSync(tplSrcDir)) return;
|
|
12
|
+
if (!dryRun) mkdirSync(tplDestDir, { recursive: true });
|
|
13
|
+
|
|
14
|
+
for (const name of readdirSync(tplSrcDir)) {
|
|
15
|
+
if (!name.endsWith(".md")) continue;
|
|
16
|
+
const src = join(tplSrcDir, name);
|
|
17
|
+
const dest = join(tplDestDir, name);
|
|
18
|
+
if (!dryRun) copyFileSync(src, dest);
|
|
19
|
+
console.log(`template synced: ${dest}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
6
23
|
|
|
7
24
|
export async function runInit(opts, bundleRoot) {
|
|
8
25
|
const markers = resolveMarkers(opts);
|
|
@@ -33,6 +50,12 @@ export async function runInit(opts, bundleRoot) {
|
|
|
33
50
|
console.log(`.cursorrules: ${crResult.action} (${crResult.mode || ""})`);
|
|
34
51
|
|
|
35
52
|
ensureTicketDirAndGitignore(opts);
|
|
53
|
+
syncTemplates(opts.cwd, bundleRoot, opts.dryRun);
|
|
54
|
+
|
|
55
|
+
// If no config exists, save the derived/default config to ensure persistency
|
|
56
|
+
if (!loadInitConfig(opts.cwd)) {
|
|
57
|
+
writeInitConfig(opts.cwd, opts);
|
|
58
|
+
}
|
|
36
59
|
}
|
|
37
60
|
|
|
38
61
|
export function runMerge(opts, bundleRoot) {
|
|
@@ -62,4 +85,6 @@ export function runMerge(opts, bundleRoot) {
|
|
|
62
85
|
dryRun: opts.dryRun, backup: opts.backup
|
|
63
86
|
});
|
|
64
87
|
console.log(`.cursorrules: ${crResult.action} (${crResult.mode || ""})`);
|
|
88
|
+
|
|
89
|
+
syncTemplates(opts.cwd, bundleRoot, opts.dryRun);
|
|
65
90
|
}
|
|
@@ -12,6 +12,10 @@ export function ensureTicketDirAndGitignore(opts) {
|
|
|
12
12
|
if (opts.dryRun) return;
|
|
13
13
|
|
|
14
14
|
mkdirSync(ticketPath, { recursive: true });
|
|
15
|
+
if (opts.shareTickets) {
|
|
16
|
+
console.log(`[INIT] Ticket sharing enabled. Skipping .gitignore entry for ${TICKET_DIR_NAME}/`);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
15
19
|
|
|
16
20
|
let gi = existsSync(gitignorePath) ? readFileSync(gitignorePath, "utf8") : "";
|
|
17
21
|
if (!gi.includes(ignoreLine)) {
|
package/scripts/cli-prompts.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { createInterface } from "readline";
|
|
2
|
-
import { existsSync, readFileSync
|
|
2
|
+
import { existsSync, readFileSync } from "fs";
|
|
3
3
|
import { join } from "path";
|
|
4
|
-
|
|
5
|
-
const INIT_CONFIG_FILENAME = ".deuk-agent-rule.config.json";
|
|
6
|
-
const INIT_CONFIG_VERSION = 1;
|
|
4
|
+
import { loadInitConfig, writeInitConfig, STACKS, AGENT_TOOLS } from "./cli-utils.mjs";
|
|
7
5
|
|
|
8
6
|
export async function ask(rl, question) {
|
|
9
7
|
return new Promise((resolve) => rl.question(question, resolve));
|
|
@@ -41,48 +39,7 @@ export async function selectMany(rl, prompt, choices) {
|
|
|
41
39
|
}
|
|
42
40
|
}
|
|
43
41
|
|
|
44
|
-
export function loadInitConfig(cwd) {
|
|
45
|
-
const p = join(cwd, INIT_CONFIG_FILENAME);
|
|
46
|
-
if (!existsSync(p)) return null;
|
|
47
|
-
try {
|
|
48
|
-
const j = JSON.parse(readFileSync(p, "utf8"));
|
|
49
|
-
if (j.version !== INIT_CONFIG_VERSION) return null;
|
|
50
|
-
return j;
|
|
51
|
-
} catch {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export function writeInitConfig(cwd, opts) {
|
|
57
|
-
const p = join(cwd, INIT_CONFIG_FILENAME);
|
|
58
|
-
const body = {
|
|
59
|
-
version: INIT_CONFIG_VERSION,
|
|
60
|
-
stack: opts.stack,
|
|
61
|
-
agentTools: opts.agentTools,
|
|
62
|
-
agentsMode: opts.agents ?? "inject",
|
|
63
|
-
updatedAt: new Date().toISOString(),
|
|
64
|
-
};
|
|
65
|
-
writeFileSync(p, JSON.stringify(body, null, 2) + "\n", "utf8");
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export const STACKS = [
|
|
69
|
-
{ label: "Unity / C#", value: "unity" },
|
|
70
|
-
{ label: "Next.js + C#", value: "nextjs-dotnet" },
|
|
71
|
-
{ label: "Web (React / Vue / general)", value: "web" },
|
|
72
|
-
{ label: "Java / Spring Boot", value: "java" },
|
|
73
|
-
{ label: "Other / skip", value: "other" },
|
|
74
|
-
];
|
|
75
42
|
|
|
76
|
-
export const AGENT_TOOLS = [
|
|
77
|
-
{ label: "Cursor", value: "cursor" },
|
|
78
|
-
{ label: "GitHub Copilot", value: "copilot" },
|
|
79
|
-
{ label: "Gemini / Antigravity", value: "gemini" },
|
|
80
|
-
{ label: "Claude (Cursor / Claude Code)", value: "claude" },
|
|
81
|
-
{ label: "Windsurf", value: "windsurf" },
|
|
82
|
-
{ label: "JetBrains AI Assistant", value: "jetbrains" },
|
|
83
|
-
{ label: "All of the above", value: "all" },
|
|
84
|
-
{ label: "Other / skip", value: "other" },
|
|
85
|
-
];
|
|
86
43
|
|
|
87
44
|
export async function runInteractive(opts) {
|
|
88
45
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
@@ -91,6 +48,7 @@ export async function runInteractive(opts) {
|
|
|
91
48
|
|
|
92
49
|
const stack = await selectOne(rl, "What is your primary tech stack?", STACKS);
|
|
93
50
|
const tools = await selectMany(rl, "Which agent tools do you use?", AGENT_TOOLS);
|
|
51
|
+
const shareTickets = await askYesNo("Do you want to share (git-track) tickets for this repository?", false);
|
|
94
52
|
|
|
95
53
|
const targetAgents = join(opts.cwd, "AGENTS.md");
|
|
96
54
|
let agentsDefault = "inject";
|
|
@@ -110,12 +68,26 @@ export async function runInteractive(opts) {
|
|
|
110
68
|
}
|
|
111
69
|
}
|
|
112
70
|
|
|
71
|
+
const remoteSync = opts.remoteSync !== undefined ? opts.remoteSync : (await askYesNo("Enable AI Pipeline remote synchronization? (Advanced)", false));
|
|
72
|
+
let pipelineUrl = opts.pipelineUrl || "";
|
|
73
|
+
if (remoteSync && !pipelineUrl) {
|
|
74
|
+
pipelineUrl = (await ask(rl, "Enter AI Pipeline Endpoint URL: ")).trim();
|
|
75
|
+
}
|
|
76
|
+
|
|
113
77
|
opts.agents = opts.agents ?? agentsDefault;
|
|
114
78
|
opts.stack = stack;
|
|
115
79
|
opts.agentTools = tools;
|
|
80
|
+
opts.shareTickets = shareTickets;
|
|
81
|
+
opts.remoteSync = remoteSync;
|
|
82
|
+
opts.pipelineUrl = pipelineUrl;
|
|
83
|
+
|
|
84
|
+
writeInitConfig(opts.cwd, opts);
|
|
116
85
|
|
|
117
86
|
console.log("\n Stack : " + stack);
|
|
118
87
|
console.log(" Tools : " + (tools.join(", ") || "none"));
|
|
88
|
+
console.log(" Share Tickets: " + (opts.shareTickets ? "Yes (Shared)" : "No (Private)"));
|
|
89
|
+
console.log(" Remote Sync: " + (opts.remoteSync ? "Enabled" : "Disabled"));
|
|
90
|
+
if (opts.remoteSync) console.log(" Pipeline URL: " + opts.pipelineUrl);
|
|
119
91
|
console.log(" AGENTS: " + opts.agents + "\n");
|
|
120
92
|
} finally {
|
|
121
93
|
rl.close();
|