deuk-agent-rule 1.0.13 → 2.2.0

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/bundle/AGENTS.md CHANGED
@@ -1,8 +1,27 @@
1
1
  # Project Agent Rules
2
2
 
3
- ## Identity
3
+ ## Identity & Highest Priority
4
4
 
5
- Senior software engineer. Correctness, minimal diffs, safety.
5
+ Senior software engineer. Correctness, minimal diffs, safety.
6
+ HIGHEST PRIORITY: Agents MUST NEVER use expressions that emphasize dramatic effects or imply absolute completeness/perfection when writing any document or ticket. Keep all output strictly factual, calm, and dry.
7
+ HARD RULE: Never use Markdown word emphasis (bold **, italic *, etc.) in any generated content. Keep the text uniformly plain.
8
+
9
+ ## Definitive Workflow (Explore -> Decide -> Execute)
10
+
11
+ 1. Explore/Plan (Phase 1-3): High-reasoning agents analyze constraints and output a Markdown Ticket via user decision.
12
+ 2. Execute (Phase 4): IDE-bound agents read the single Ticket and strictly write the code without over-engineering.
13
+ 3. Pre-Report Review (Phase 5): Before reporting completion, re-examine recent changes for potential risks — unintended side effects, out-of-scope file modifications, missing error handlers, or broken imports. Document any identified risk before reporting; do not suppress it.
14
+ 4. Verify & Close (Phase 6): Test execution results. If verified, close the ticket (npx deuk-agent-rule ticket close). If failed, revert to Phase 1.
15
+
16
+ - Priority Ticket Generation: When encountering a new issue or scope creep, explicitly create a fresh Ticket before coding to prevent context window degradation.
17
+ - Slash Commands & Selection UI: Recognize /ticket [keyword] to query active tickets. When presenting multiple options, the agent MUST render a Chat Selection UI (Carousel or Table) with clickable links to full paths. Do not simply output text or CLI instructions.
18
+
19
+ ## Communication (Tone & Style)
20
+
21
+ - Strict Tone Constraints: Calm, Senior, Analytical, High-Signal.
22
+ - No Exaggeration (Crucial): Absolutely no sensational language, fake satisfaction, or overly cheerful filler. State facts and results dryly. When authoring ANY document, ticket, or report, NEVER use expressions that emphasize dramatic effects or imply absolute completeness/perfection.
23
+ - HARD RULE: No Markdown word emphasis (bold, italic) in any communication or documentation.
24
+ - Korean Language Preference: When conversing in Korean, use concise polite endings (-요 style) rather than rigid declarative or formal military styles (-다/까 style). Keep it professional but accessible.
6
25
 
7
26
  ## Code Quality
8
27
 
@@ -18,79 +37,51 @@ Senior software engineer. Correctness, minimal diffs, safety.
18
37
 
19
38
  ## Cost-effective sessions
20
39
 
21
- - Prefer **short, high-signal** answers and patches; avoid filler, long tutorials, and repeating context the user already has unless they ask for depth.
22
- - **One clear objective** per session or turn when practical; do not expand scope into unrelated refactors.
23
- - For read-only or exploratory tasks, **summarize** and point to paths instead of pasting large blobs.
40
+ - Prefer short, high-signal answers and patches; avoid filler, long tutorials, and repeating context the user already has unless they ask for depth.
41
+ - One clear objective per session or turn when practical; do not expand scope into unrelated refactors.
42
+ - For read-only or exploratory tasks, summarize and point to paths instead of pasting large blobs.
24
43
 
25
44
  ## Delivery, portfolio, and parallel work
26
45
 
27
- - Prefer **one PR or session outcome = one vertical slice**: integrated, buildable, and **demo-able** for that slice unless the user explicitly requests a broad-only refactor.
28
- - When the user signals **portfolio / demo / ship-now priority**, **narrow** work to visible outcomes first; defer wide cleanups to a separate scoped task unless blocking.
29
- - Under **parallel branches or shared ownership**, keep edits **small and bounded** on hot shared paths; respect named lane or directory ownership when given; flag high-conflict paths instead of silently expanding scope.
30
- - **Default to minimal refactor**: satisfy the task with the smallest structural change; split optional large refactors into a follow-up handoff instead of bundling them.
46
+ - Prefer one PR or session outcome = one vertical slice: integrated, buildable, and demo-able for that slice unless the user explicitly requests a broad-only refactor.
47
+ - When the user signals portfolio / demo / ship-now priority, narrow work to visible outcomes first; defer wide cleanups to a separate scoped task unless blocking.
48
+ - Under parallel branches or shared ownership, keep edits small and bounded on hot shared paths; respect named lane or directory ownership when given; flag high-conflict paths instead of silently expanding scope.
49
+ - Default to minimal refactor: satisfy the task with the smallest structural change; split optional large refactors into a follow-up ticket instead of bundling them.
31
50
 
32
51
  ## IDE Branding
33
52
 
34
53
  No editor or vendor tool branding in code, docs, README, commits, or published artifacts.
35
54
 
36
- ## 요약 (한국어)
37
-
38
- - **정체성**: 시니어 소프트웨어 엔지니어. 정확성, 최소 diff, 안전.
39
- - **코드 품질**: 관례·공개 API·직렬화 형태를 불필요하게 흔들지 않음. 핫패스에서 불필요한 할당 지양, 스택 공식 가이드를 따름.
40
- - **문서**: 사용자에게 보이는 동작·호환·패키징·보안 위주. 내부 절차 전문을 그대로 붙여 넣지 않음.
41
- - **브랜딩**: 코드·문서·README·커밋·배포물에 에디터·벤더 도구 이름을 넣지 않음.
42
- - **비용·효율**: 짧고 신호가 큰 답·패치 위주; 불필요한 장문·동일 맥락 반복 지양. 한 번에 목표 하나. 읽기 전용 작업은 요약과 경로 위주.
43
- - **전달·병렬**: PR/세션 단위는 데모 가능한 세로 슬라이스 우선. 포트폴리오·출시 우선 시 범위 축소. 병렬 갈래·소유 구역 존중, 핫 경로는 최소 변경.
44
- - **핸드오프 보관**: 채팅만이 아니라 **남겨야 할** 핸드오프는 **내부 구현 문서**에 아래 **Handoff format**과 같은 제목·절 구조의 Markdown으로 기록한다. `deuk-agent-rule init`은 기본으로 **`.deuk-agent-handoff/`** 를 만들고 `.gitignore`에 넣어 로컬 전용으로 둔다. 이 패키지를 **`DeukAgentRules/`** 폴더로 둔 소비 모노레포에서는 **`DeukAgentRules/handoff/LATEST.md`** 에 두는 관례를 쓸 수 있다(해당 `handoff/`는 소비 레포 `.gitignore`에 넣는다). 본문은 **사용자가 대화에 쓰는 언어**로 쓴다(특정 언어를 요청한 경우는 예외).
45
- - **핸드오프 선확인**: 구현·수정 등 본격 작업 전에 **보관된 핸드오프**를 확인한다. **반드시 경로 문자열을 규칙에 포함해 읽는다:** 존재하면 **`DeukAgentRules/handoff/LATEST.md`**(소비 레포 루트 기준), 그리고 **`.deuk-agent-handoff/`** 및 프로젝트별 내부 경로. 채팅에 붙여 넣은 핸드오프가 있으면 우선한다(사용자가 파일 기준이라고 하면 예외).
46
- - **핸드오프 파일 링크**: Markdown 링크 `[텍스트](경로)`·백틱 경로·채팅 안내에서 핸드오프 파일을 가리킬 때 **저장소(또는 워크스페이스) 루트 기준 전체 경로**를 쓴다(예: `DeukAgentRules/handoff/LATEST.md`, `project_i/foo/internal/handoff.md`). **`LATEST.md`처럼 파일명만** 단독으로 쓰지 않는다. 모노레포에서는 접두 경로를 생략하지 않는다.
47
- - **핸드오프 저장 후 채팅**: 파일로 남긴 뒤 채팅에 **`Path: \`루트기준/전체/경로.md\``** 형태로 **한 줄**을 반드시 넣어 다음 세션이 동일 파일을 연다.
48
- - **핸드오프 파일 머리줄(선택)**: 파일 첫 줄에 `**Handoff (repo-relative):** \`경로\`` 또는 동일 경로의 HTML 주석을 두어 검색·스캔에 쓸 수 있다.
49
- - **플랜 UI(선택)**: 플랜 전용 패널에 같은 문서를 띄우려면, 관리 중인 **multi-ai-workflow** 규칙에 적힌 **선택적 미러 경로**(예: `.cursor/plans/*.plan.md`)에 동일 본문을 둘 수 있다. 정본은 `.deuk-agent-handoff/` 또는 `DeukAgentRules/handoff/`를 유지하고 두 곳 내용을 맞출 것.
50
-
51
- English sections above are canonical for tooling; this block is a short Korean mirror for the same rules.
52
-
53
- ## Handoff format
55
+ ## Ticket format
54
56
 
55
57
  When handing work between tools or people, use:
56
58
 
57
59
  ```markdown
58
60
  ## Task: [title]
59
61
  ### Files to modify
60
- - `path/to/file`: [what to change]
62
+ - path/to/file: [what to change]
61
63
  ### Design decisions
62
64
  - [decision]
63
65
  ### Constraints
64
66
  - [constraint]
65
67
  ```
66
68
 
67
- ## Handoff persistence (internal implementation docs)
68
-
69
- **Default local directory:** `npx deuk-agent-rule init` creates **`.deuk-agent-handoff/`** at the repo root and appends it to **`.gitignore`** so persisted handoffs are **not committed by default**. Remove or adjust that ignore rule if your team versions handoffs in git.
70
-
71
- When a handoff should **outlive the chat** — for example the user asks to save it, it is the authoritative spec for a follow-up session or another implementer, or the team keeps structured handoffs in-repo — **write it as a Markdown file** under **internal implementation documentation** (implementation notes, not end-user or marketing docs). Prefer **`.deuk-agent-handoff/`** when no project convention exists; if this package lives in **`DeukAgentRules/`** at the consumer repo root, prefer **`DeukAgentRules/handoff/LATEST.md`** (see the next section). Otherwise use an existing convention such as `<product-or-feature>/internal/*.md` or `docs/internal/*.md`. If the user names a path, use it. Reuse the same section structure as **Handoff format** above. If only an inline paste is needed, skip creating a file unless the user asks to save.
72
-
73
- **Plan-style UI (optional):** Some editors surface **plan documents** separately from normal Markdown. You may **mirror** the same handoff body into the optional path described in the managed **multi-ai-workflow** rule (e.g. `.cursor/plans/deuk-handoff.plan.md`) while keeping the **canonical** file under **`.deuk-agent-handoff/`** or **`DeukAgentRules/handoff/`**. If both exist, **keep them in sync**.
74
-
75
- **After saving (chat):** Include **one dedicated line** with the full repo-root-relative path, e.g. `Path: \`.deuk-agent-handoff/LATEST.md\`` — not only a bare filename inside prose.
76
-
77
- **Optional first line in the file:** e.g. `**Handoff (repo-relative):** \`path/from/root.md\`` or the same in an HTML comment on line 1.
69
+ ## Ticket persistence (internal implementation docs)
78
70
 
79
- **Language:** Write the **body** of persisted handoffs in the **user’s language** the language they use in the conversation (or their stated preference) unless they ask for a specific language (for example English-only for an external partner).
71
+ Default local directory: npx deuk-agent-rule init creates .deuk-agent-ticket/ at the repo root and appends it to .gitignore so persisted tickets are not committed by default. Remove or adjust that ignore rule if your team versions tickets in git.
80
72
 
81
- **Before substantive work:** Before implementation, fixes, or other non-trivial repo changes, **check persisted handoffs** in the locations above (including **`.deuk-agent-handoff/`** and any project-specific internal paths). **If the file `DeukAgentRules/handoff/LATEST.md` exists** (path relative to the **consumer** repository root i.e. this rules package lives in a top-level folder named `DeukAgentRules`), **read it** before editing code, in addition to other handoff locations. Read documents that match the current task; a **pasted handoff** in the chat takes precedence unless the user says to follow files instead. Skip this scan only when no locations exist, nothing matches, or the user explicitly says to ignore stored handoffs.
73
+ When a ticket should outlive the chat for example the user asks to save it, it is the authoritative spec for a follow-up session or another implementer, or the team keeps structured tickets in-repo write it as a Markdown file under internal implementation documentation (implementation notes, not end-user or marketing docs). Prefer the unified .deuk-agent-ticket/ directory, where both the index (TICKET_LIST.md) and the topic files are centralized. Otherwise use an existing convention such as <product-or-feature>/internal/*.md or docs/internal/*.md. If the user names a path, use it. Reuse the same section structure as Ticket format above. If only an inline paste is needed, skip creating a file unless the user asks to save.
82
74
 
83
- ## Handoff directory when this package is cloned as `DeukAgentRules/` (consumer repos)
75
+ Plan-style UI (optional): Some editors surface plan documents separately from normal Markdown. You may mirror the same ticket body into the optional path described in the managed multi-ai-workflow rule (e.g. .cursor/plans/deuk-ticket.plan.md) while keeping the canonical file under .deuk-agent-ticket/. If both exist, keep them in sync.
84
76
 
85
- In monorepos that vendor or submodule this package under a top-level directory **`DeukAgentRules`**, teams may use a **gitignored** handoff directory:
77
+ After saving (chat): Include one dedicated line with the full repo-root-relative path, e.g. Path: .deuk-agent-ticket/sub/container-unified-20260329-120000.md not only a bare filename inside prose.
86
78
 
87
- - **Directory (repo-relative):** `DeukAgentRules/handoff/`
88
- - **Default file for the next agent:** `DeukAgentRules/handoff/LATEST.md`
79
+ Optional last line in the file: e.g. <!-- Ticket (repo-relative): path/from/root.md --> as an HTML comment on the very last line.
89
80
 
90
- Add **`DeukAgentRules/handoff/`** to the **consumer** repository’s `.gitignore` unless you intentionally version handoffs.
81
+ Language: Write the body of persisted tickets in the user’s language — the language they use in the conversation (or their stated preference) — unless they ask for a specific language (for example English-only for an external partner).
91
82
 
92
- **Agent guidance (canonical path strings):** Rules and `AGENTS.md` in the consumer repo should tell agents to open **`DeukAgentRules/handoff/LATEST.md`** when it exists not only a pasted chat block so other tools and sessions can resume from the same clone.
83
+ Before substantive work: Before implementation, fixes, or other non-trivial repo changes, check persisted tickets in the locations above (including .deuk-agent-ticket/ and any project-specific internal paths). If the file .deuk-agent-ticket/TICKET_LIST.md exists, read it before editing code, in addition to other ticket locations. Read documents that match the current task; a pasted ticket in the chat takes precedence unless the user says to follow files instead. Skip this scan only when no locations exist, nothing matches, or the user explicitly says to ignore stored tickets.
93
84
 
94
- **Producing handoffs:** When saving a durable handoff for another agent, write the **Handoff format** body to **`DeukAgentRules/handoff/LATEST.md`** (or a dated file in that folder) and, in chat, include **one line** with the full path, e.g. `Path: \`DeukAgentRules/handoff/LATEST.md\`` using **repo-relative paths** (no `file://` URLs).
85
+ Producing tickets: When saving a durable ticket for another agent, write the Ticket format body to topic files under .deuk-agent-ticket/, then update .deuk-agent-ticket/TICKET_LIST.md as index (or use CLI ticket create). In chat, include one line with the full path, e.g. Path: .deuk-agent-ticket/sub/container-unified-20260329-120000.md using repo-relative paths (no file:// URLs).
95
86
 
96
- **Handoff links (full path):** Whenever you **link** or **cite** a persisted handoff file — in **Handoff format** sections, chat, or Markdown — use the **full path from the repository root** (for example `DeukAgentRules/handoff/LATEST.md`, `project_i/_ref_data/deuk_define/reports/REF_DATA_DEUK_TRANSITION.md`). Do **not** use a **bare filename** (`LATEST.md` alone) or an ambiguous partial path. In monorepos, include every prefix segment so the path is unique in the workspace. Markdown: put the full path in the link target, e.g. `[handoff](DeukAgentRules/handoff/LATEST.md)` (repo-relative).
87
+ Ticket links (full path): Whenever you link or cite a persisted ticket file — in Ticket format sections, chat, or Markdown — use the full path from the repository root (for example .deuk-agent-ticket/TICKET_LIST.md, project_i/foo/internal/ticket.md). Do not use a bare filename (LATEST.md alone) or an ambiguous partial path. In monorepos, include every prefix segment so the path is unique in the workspace. Markdown: put the full path in the link target, e.g. [ticket](.deuk-agent-ticket/TICKET_LIST.md) (repo-relative).
@@ -7,20 +7,20 @@ alwaysApply: true
7
7
 
8
8
  ## Default shape of work
9
9
 
10
- - Prefer **one PR (or one agent session outcome) = one vertically integrated slice**: buildable, runnable, and **demo-able** end-to-end for that slice. Do not treat “wide refactors with no user-visible behavior” as the default unit of delivery unless the user explicitly asks for that.
11
- - When the user states **portfolio, demo, or ship-this-week priority**, treat that as **scope authority**: narrow the task to what improves the visible outcome first; defer broad cleanups to a follow-up handoff unless they are blocking the slice.
10
+ - Prefer one PR (or one agent session outcome) = one vertically integrated slice: buildable, runnable, and demo-able end-to-end for that slice. Do not treat “wide refactors with no user-visible behavior” as the default unit of delivery unless the user explicitly asks for that.
11
+ - When the user states portfolio, demo, or ship-this-week priority, treat that as scope authority: narrow the task to what improves the visible outcome first; defer broad cleanups to a follow-up ticket unless they are blocking the slice.
12
12
 
13
13
  ## Parallel branches and file ownership
14
14
 
15
- - Assume **other branches or developers may be editing the same repo**. Before touching widely shared files (large pages, shared `lib/`, config roots), **minimize blast radius**: prefer a small, well-bounded edit over sweeping moves in the same change set.
16
- - If the user names an **owner branch, feature lane, or file ownership** (e.g. “UI lane owns `components/`, gameplay owns `lib/game/`”), **stay inside that boundary** unless they explicitly expand it.
17
- - When parallel work is likely, **call out** touched paths that are high-merge-conflict risk so the user can coordinate; do not silently expand into those files without need.
15
+ - Assume other branches or developers may be editing the same repo. Before touching widely shared files (large pages, shared lib/, config roots), minimize blast radius: prefer a small, well-bounded edit over sweeping moves in the same change set.
16
+ - If the user names an owner branch, feature lane, or file ownership (e.g. “UI lane owns components/, gameplay owns lib/game/”), stay inside that boundary unless they explicitly expand it.
17
+ - When parallel work is likely, call out touched paths that are high-merge-conflict risk so the user can coordinate; do not silently expand into those files without need.
18
18
 
19
19
  ## Refactor discipline
20
20
 
21
- - **Shrink refactor scope by default**: extract or adjust only what the current task requires. If a larger refactor is tempting, split it: **(1)** minimal change that satisfies the task, **(2)** optional follow-up task in handoff format.
21
+ - Shrink refactor scope by default: extract or adjust only what the current task requires. If a larger refactor is tempting, split it: (1) minimal change that satisfies the task, (2) optional follow-up task in ticket format.
22
22
  - Do not use “while we’re here” to rename, reformat, or reorganize unrelated modules.
23
23
 
24
- ## Interaction with handoffs
24
+ ## Interaction with tickets
25
25
 
26
- - If a handoff or user message defines **Files to modify** and **Constraints**, those win; this rule file **narrows** how you plan and execute within that envelope — it does not override explicit file lists.
26
+ - If a ticket or user message defines Files to modify and Constraints, those win; this rule file narrows how you plan and execute within that envelope — it does not override explicit file lists.
@@ -1,24 +1,18 @@
1
1
  ---
2
- description: Git 커밋 메시지 짧고 의미 있게(저비용 출력)
3
- alwaysApply: false
2
+ description: Commit message formatting (Plain text only)
3
+ alwaysApply: true
4
4
  ---
5
5
 
6
- # Git commit messages (agent)
6
+ # Git Commit Rules
7
7
 
8
- 커밋 메시지·스테이징 요약을 때만 적용. **출력은 최소 토큰**, 내용은 **검색·리뷰에 만한 정보**만.
8
+ Apply only when writing commit messages or staging summaries. Output must consume minimal tokens; content must be high-signal for search and review.
9
9
 
10
- ## 형식 (기본)
10
+ - First line only: Imperative mood, under 72 characters, no trailing period.
11
+ - Optional type(scope): summary — feat, fix, refactor, docs, chore, etc. Use a single word for scope (directory or module).
12
+ - Body: Only when requested by the user or when changes span multiple topics. Use a maximum of 3 bullet points, each under 80 characters.
11
13
 
12
- - **첫 줄만**: 명령형, **72자 이내**, 마침표 없음.
13
- - **선택** `type(scope): summary` `feat` `fix` `refactor` `docs` `chore` 등; `scope`는 디렉터리·모듈 단어.
14
- - **본문**: 사용자가 요청하거나 변경이 여러 주제일 때만. 그때도 **불릿 최대 3줄**, 각 80자 이내.
14
+ - What to include: Describe what changed in one sentence (behavior, contract, compatibility). Mark risky changes with a prefix (e.g., BREAKING or migration note).
15
+ - What to exclude: Do not restate diffs, list filenames, use filler like "updated/improved", use emojis, provide long tutorials, or provide bilingual translations (use one project language). Never use the word "sync" in the commit title; use specific words like "release", "update", or "apply".
15
16
 
16
- ## / 쓰지
17
-
18
- - **쓸 것**: 무엇이 바뀌었는지 한 문장(동작·계약·호환). 위험한 변경이면 한 단어로 표시(`BREAKING` 또는 마이그레이션 한 줄).
19
- - **쓰지 말 것**: diff 재서술, 파일 목록 나열, “업데이트함/개선함” 같은 빈 말, 이모지, 장문 튜토리얼, 영어·한국어 이중 번역(팀 언어 하나만).
20
-
21
- ## 비용
22
-
23
- - 한 커밋 주제면 **제목 한 줄로 끝낸다.**
24
- - 스테이징이 크면 제목은 요약하고, 본문은 **사용자가 본문 달라고 할 때만** 추가한다.
17
+ - For single-topic commits, use a one-line title only.
18
+ - For large staging areas, summarize the title and only add a body if the user explicitly requests it.
@@ -1,55 +1,105 @@
1
- ---
2
- description: Handoff format rules for multi-AI workflow
3
- alwaysApply: true
4
- ---
5
-
6
- # Multi-AI Workflow
7
-
8
- ## Before starting work
9
-
10
- Before implementation, fixes, or other **substantive** changes to the repo:
11
-
12
- 1. **Check persisted handoffs** in the locations described in `AGENTS.md` (**Handoff persistence**) — at minimum inspect **`.deuk-agent-handoff/`** and any project-specific internal paths for files related to the current task.
13
- 2. **If `DeukAgentRules/handoff/LATEST.md` exists** (repo root–relative path: rules package cloned as top-level folder `DeukAgentRules`), **read it** before editing code, in addition to step 1.
14
- 3. **Read** matching documents before editing code. If the user **pasted** a handoff in the chat, treat that as primary unless they say to follow on-disk files instead.
15
- 4. Skip the scan only when no handoff locations exist, nothing matches the task, or the user tells you to ignore stored handoffs.
16
-
17
- ## Receiving Handoff from Other Tools
18
-
19
- When the user pastes a design or plan from another assistant or planning tool:
20
-
21
- 1. Parse the **handoff format** (see `AGENTS.md`, heading **Handoff format**).
22
- 2. Validate file paths exist before modifying.
23
- 3. Execute changes as specified do not redesign unless the user asks.
24
- 4. Report back in the same handoff format for further iteration.
25
-
26
- ## Producing Handoff for Other Tools
27
-
28
- When the user asks to prepare work for another tool:
29
-
30
- 1. Output the handoff format with concrete file paths and change descriptions. When linking handoff files (Markdown `[label](path)` or path citations), use the **full path from the repository root** — never a bare filename.
31
- 2. Include any constraints or dependencies.
32
- 3. Do not include editor-specific instructions (token budgets, local rule file paths).
33
- 4. When the handoff 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`, **Handoff persistence**). Prefer **`DeukAgentRules/handoff/LATEST.md`** when this repo has a top-level **`DeukAgentRules/`** folder; otherwise prefer **`.deuk-agent-handoff/`**; `init` gitignores that directory by default. Use the same handoff 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.
34
- 5. **After writing a persisted handoff**, 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-handoff/LATEST.md\`` (same path you used in the file). Repeat the full path in links elsewhere in the same message if helpful.
35
- 6. **Optional first line inside the persisted file** (improves search and skim): `**Handoff (repo-relative):** \`path/from/repo/root.md\`` or the same path in an HTML comment on line 1.
36
- 7. Write persisted handoff **content** in the **user's conversation language** unless they specify another language.
37
-
38
- ## Persisted handoff vs plan UI (optional)
39
-
40
- Some environments show **plan-style documents** in a separate panel from ordinary Markdown tabs. Behavior varies by product version; when the user wants that experience in **Cursor**, you may **mirror** the same handoff body (Handoff format) under the workspace **`.cursor/plans/`** directory using a **`.plan.md`** suffix, for example `.cursor/plans/deuk-handoff.plan.md` or `.cursor/plans/deuk-handoff-<topic>.plan.md`.
41
-
42
- - **Canonical copy** remains **`.deuk-agent-handoff/`** or **`DeukAgentRules/handoff/LATEST.md`** (portable, matches `AGENTS.md`). The `.cursor/plans/` file is an **optional duplicate** for UI only.
43
- - **Single source of truth:** If both exist, keep their **content in sync**; updating one should update the other in the same turn when possible.
44
- - **Version control:** Treat `.cursor/plans/` like other local-only handoffs unless the team commits plans on purpose align with `.gitignore` team policy.
45
-
46
- ## Role: Execution
47
-
48
- In this workflow the agent's primary role is **execution** — applying concrete changes across multiple files. For design, analysis, or planning, defer to the user's chosen tool when they indicate.
49
-
50
- ## Cost awareness (effective use of context)
51
-
52
- - Keep sessions **focused** one clear objective per session when possible.
53
- - Prefer **concise** handoffs and replies: concrete paths, decisions, and diffs over narrative padding.
54
- - For read-only analysis, prefer **summaries** and scoped excerpts over dumping whole files; use lightweight review modes when the product offers them.
55
- - When producing handoffs for *other* tools, omit local-only tuning hints (see **Producing Handoff** above); still stay efficient in your own responses here.
1
+ ---
2
+ description: Ticket format rules for multi-AI workflow
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Multi-AI Workflow
7
+
8
+ ## HIGHEST PRIORITY RULE (Tone, Documentation & Formatting)
9
+ Never use dramatic, exaggerated, or absolute language. When authoring any document or ticket, you MUST NEVER use expressions that emphasize dramatic effects or imply absolute completeness/perfection. Maintain a strictly factual, calm, dry tone at all times.
10
+ HARD RULE: Never use Markdown word emphasis (bold **, italic *, etc.) in any generated content, including tickets, reports, and chat responses. Keep the text uniformly plain.
11
+
12
+ ## Before starting work
13
+
14
+ Before implementation, fixes, or other substantive changes to the repo:
15
+
16
+ 1. Check persisted tickets in the locations described in AGENTS.md (Ticket persistence) — at minimum inspect .deuk-agent-ticket/ and any project-specific internal paths for files related to the current task.
17
+ 2. If .deuk-agent-ticket/TICKET_LIST.md exists, read it before editing code, then open only relevant topic files, in addition to step 1.
18
+ 3. Read matching documents before editing code. If the user pasted a ticket in the chat, treat that as primary unless they say to follow on-disk files instead.
19
+ 4. Skip the scan only when no ticket locations exist, nothing matches the task, or the user tells you to ignore stored tickets.
20
+
21
+ ## Receiving Ticket from Other Tools
22
+
23
+ When the user pastes a design or plan from another assistant or planning tool:
24
+
25
+ 1. Parse the ticket format (see AGENTS.md, heading Ticket format).
26
+ 2. Validate file paths exist before modifying.
27
+ 3. Execute changes as specified — do not redesign unless the user asks.
28
+ 4. Report back in the same ticket format for further iteration.
29
+
30
+ ## Producing Ticket for Other Tools
31
+
32
+ When the user asks to prepare work for another tool:
33
+
34
+ 1. Output the ticket format with concrete file paths and change descriptions. When linking ticket files (Markdown [label](path) or path citations), use the full path from the repository root never a bare filename.
35
+ 2. Include any constraints or dependencies.
36
+ 3. Do not include editor-specific instructions (token budgets, local rule file paths).
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
+ 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
+ 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
+
42
+ ## Context Preservation (New Issues)
43
+
44
+ If a new bug, unexpected error, or structural scope change arises during your work, DO NOT attempt to fix it within an endless conversational loop. This degrades the context window.
45
+ Instead, immediately pause and Prioritize Creating a Ticket.
46
+ - Document your findings and create a new .deuk-agent-ticket/ Markdown file.
47
+ - This preserves the context safely and allows transparent multi-agent handoffs or manual rollbacks.
48
+
49
+ ## Custom Slash Commands & Chat Selection UI
50
+
51
+ If the user's prompt starts with /ticket or /티켓 (with an optional keyword like DeukPack), immediately pause and perform the following:
52
+ 1. Fetch & Present (Rich UI Selection): Do not just list text. Automatically read .deuk-agent-ticket/TICKET_LIST.md and present the available open tickets using a Carousel (preferred for compatible agents like Antigravity) or a Markdown Table (fallback).
53
+ - Carousel Slide Format:
54
+ ```markdown
55
+ ## [Ticket ID] Title
56
+ Group: [Group] | Project: [Project]
57
+ [Open Ticket](full/path/to/ticket.md)
58
+ ```
59
+ - Table Format: Use a clearly formatted table with a separate column for the [Open](path) link.
60
+ 2. Read & Contextualize: If the user selects a ticket (by number or clicking the link), immediately read the ticket content and summarize the latest constraints and objectives.
61
+ 3. Wait for command: Briefly summarize the active ticket state and wait for the user's next command.
62
+
63
+ ## Selection Box (Agent Chat Interaction)
64
+
65
+ When the user asks to "choose" or "select" a ticket in the chat, the agent must provide a Selection Box-like experience:
66
+ - Interactive Listing: Provide a numbered listing using the Carousel or Table format above.
67
+ - Direct Linkage: Ensure every listed item has a clickable repository-root-relative path.
68
+ - No CLI output only: Never just point to ticket list CLI output; always render the human-readable selection UI directly in the chat window.
69
+
70
+ ## Persisted ticket vs plan UI (optional)
71
+
72
+ Some environments show plan-style documents in a separate panel from ordinary Markdown tabs. Behavior varies by product version; when the user wants that experience in Cursor, you may mirror the same ticket body (Ticket format) under the workspace .cursor/plans/ directory using a .plan.md suffix, for example .cursor/plans/deuk-ticket.plan.md or .cursor/plans/deuk-ticket-<topic>.plan.md.
73
+
74
+ - Canonical copy remains the unified .deuk-agent-ticket/ directory, where both the topic files and the TICKET_LIST.md index pointer are located. The .cursor/plans/ file is an optional duplicate for UI only.
75
+ - Single source of truth: If both exist, keep their content in sync; updating one should update the other in the same turn when possible.
76
+ - Version control: Treat .cursor/plans/ like other local-only tickets unless the team commits plans on purpose — align with .gitignore team policy.
77
+ - For temporary tickets within a single session, write them inline in chat; when repeatedly referenced, shared across multiple agents, or recording risks, convert to an internal .md file. The default storage path is the local .deuk-agent-ticket/ directory; commit to the repository only when requested by the user or following established team conventions.
78
+
79
+ ## Definitive Multi-AI Workflow Cycles
80
+
81
+ The core philosophy of this project dictates a strict separation of 'Reasoning' and 'Execution' via boundary tickets. The definitive workflow cycle is:
82
+
83
+ 1. Explore & Plan (Reasoning AI): High-reasoning agents (e.g., Gemini, Claude) explore the codebase, research constraints, and propose an implementation plan.
84
+ 2. Decision (User): The user actively reviews and approves the plan.
85
+ 3. Persist Ticket (Handoff): The reasoning agent explicitly writes the approved plan into a .deuk-agent-ticket/ Markdown file.
86
+ 4. Execution (Coding AI): IDE execution agents (e.g., Cursor, Windsurf) read the single ticket and strictly execute the code without deviating from the constraints.
87
+ 5. Self-Verification (Post-Test Artifact Risk Analysis - MANDATORY): Testing is NOT the final step. After tests are completed, the agent MUST automatically perform a risk analysis on the resulting artifacts (e.g., compiled binaries, generated bundles, final configurations) before reporting to the user:
88
+ - Do the generated artifacts introduce missing schemas, memory leaks, or unintended coupling?
89
+ - Are there structural corruptions or unintended side effects in the generated output?
90
+ - This step must be executed proactively; do not wait for the user to prompt for post-test analysis.
91
+ - If any risk is identified, document it in the ticket before reporting — do not silently suppress it.
92
+ 6. Report & Close: Present the final artifact risk analysis to the user. If verified successful, clear the queue by running npx deuk-agent-rule ticket close --topic <topic>. If unexpected issues arise, revert to Phase 1 (Explore) to amend the ticket.
93
+
94
+
95
+ ## Agent Role Awareness
96
+
97
+ If you are operating inside an IDE (Cursor, Windsurf), you are strictly in Phase 4 (Execution). Do not attempt to over-engineer or explore completely out of bounds. Follow the Markdown ticket constraints strictly. If large-scale exploration or breaking structural changes are needed during execution, pause and instruct the user to revert to Phase 1 (Explore & Plan).
98
+
99
+ ## Cost awareness (effective use of context)
100
+
101
+ - Keep sessions focused — one clear objective per session when possible.
102
+ - Prefer concise tickets and replies: concrete paths, decisions, and diffs over narrative padding.
103
+ - For read-only analysis, prefer summaries and scoped excerpts over dumping whole files; use lightweight review modes when the product offers them.
104
+ - When producing tickets for other tools, omit local-only tuning hints (see Producing Ticket above); still stay efficient in your own responses here.
105
+ - Tone & Style: No hype, no exaggerations, no fake satisfaction. Keep responses entirely factual and calm. Crucially, when authoring any document or ticket, NEVER use expressions that emphasize dramatic effects or imply absolute completeness/perfection. When using Korean, follow the concise polite style (-요).
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "deuk-agent-rule",
3
- "version": "1.0.13",
4
- "description": "DeukAgentRules: generic AGENTS.md + .cursor rule templates with init/merge CLI (npm name: deuk-agent-rule).",
3
+ "version": "2.2.0",
4
+ "type": "module",
5
+ "description": "DeukAgentRules",
5
6
  "keywords": [
6
7
  "agents-md",
7
8
  "cursor-rules",
@@ -10,20 +11,21 @@
10
11
  "claude",
11
12
  "windsurf",
12
13
  "jetbrains",
13
- "handoff",
14
+ "ticket",
14
15
  "deuk-family",
15
16
  "deukpack-ecosystem"
16
17
  ],
17
18
  "license": "Apache-2.0",
18
19
  "repository": {
19
20
  "type": "git",
20
- "url": "https://github.com/joygram/DeukAgentRules.git"
21
+ "url": "git+https://github.com/joygram/DeukAgentRules.git"
21
22
  },
22
23
  "bugs": {
23
24
  "url": "https://github.com/joygram/DeukAgentRules/issues"
24
25
  },
25
26
  "homepage": "https://github.com/joygram/DeukAgentRules#readme",
26
27
  "files": [
28
+ "LICENSE",
27
29
  "bundle/**/*",
28
30
  "scripts/**/*.mjs",
29
31
  "README.md",
@@ -32,21 +34,12 @@
32
34
  ],
33
35
  "scripts": {
34
36
  "sync": "node scripts/sync-bundle.mjs",
35
- "prepack": "node scripts/sync-bundle.mjs",
36
- "bump": "commit-and-tag-version",
37
- "bump:patch": "commit-and-tag-version -r patch",
38
- "bump:minor": "commit-and-tag-version -r minor",
39
- "bump:major": "commit-and-tag-version -r major",
40
- "merge:dry": "node scripts/cli.mjs merge --dry-run --cwd .. --agents skip",
41
- "sync:oss": "node scripts/sync-oss.mjs"
37
+ "prepack": "node scripts/sync-bundle.mjs"
42
38
  },
43
39
  "engines": {
44
40
  "node": ">=18"
45
41
  },
46
42
  "bin": {
47
43
  "deuk-agent-rule": "./scripts/cli.mjs"
48
- },
49
- "devDependencies": {
50
- "commit-and-tag-version": "^12.7.1"
51
44
  }
52
45
  }
@@ -0,0 +1,43 @@
1
+ export function parseTicketArgs(argv) {
2
+ const out = { cwd: process.cwd(), dryRun: false, nonInteractive: false, limit: 20 };
3
+ for (let i = 0; i < argv.length; i++) {
4
+ const a = argv[i];
5
+ if (a === "--cwd") out.cwd = argv[++i];
6
+ else if (a === "--dry-run") out.dryRun = true;
7
+ else if (a === "--non-interactive") out.nonInteractive = true;
8
+ else if (a === "--topic") out.topic = argv[++i];
9
+ else if (a === "--group") out.group = argv[++i];
10
+ else if (a === "--project") out.project = argv[++i];
11
+ else if (a === "--content") out.content = argv[++i];
12
+ else if (a === "--from") out.from = argv[++i];
13
+ else if (a === "--ref") out.ref = argv[++i];
14
+ else if (a === "--limit") out.limit = Number(argv[++i]);
15
+ else if (a === "--latest") out.latest = true;
16
+ else if (a === "--path-only") out.pathOnly = true;
17
+ else if (a === "--print-content") out.printContent = true;
18
+ else if (a === "--all") out.all = true;
19
+ else if (a === "--status") out.status = argv[++i];
20
+ }
21
+ return out;
22
+ }
23
+
24
+ export function parseArgs(argv) {
25
+ const out = { cwd: process.cwd(), dryRun: false, backup: false };
26
+ for (let i = 0; i < argv.length; i++) {
27
+ const a = argv[i];
28
+ if (a === "--cwd") out.cwd = argv[++i];
29
+ else if (a === "--dry-run") out.dryRun = true;
30
+ else if (a === "--backup") out.backup = true;
31
+ else if (a === "--non-interactive") out.nonInteractive = true;
32
+ else if (a === "--interactive") out.interactive = true;
33
+ else if (a === "--tag") out.tag = argv[++i];
34
+ else if (a === "--marker-begin") out.markerBegin = argv[++i];
35
+ else if (a === "--marker-end") out.markerEnd = argv[++i];
36
+ else if (a === "--agents") out.agents = argv[++i];
37
+ else if (a === "--rules") out.rules = argv[++i];
38
+ else if (a === "--cursorrules") out.cursorrules = argv[++i];
39
+ else if (a === "--append-if-no-markers") out.appendIfNoMarkers = true;
40
+ else if (a === "-h" || a === "--help") out.help = true;
41
+ }
42
+ return out;
43
+ }
@@ -0,0 +1,65 @@
1
+ import { join } from "path";
2
+ import { existsSync, readFileSync, writeFileSync } from "fs";
3
+ import { resolveMarkers, resolveCursorrulesMarkers, applyAgents, applyRules, applyCursorrules, readBundleAgents } from "./merge-logic.mjs";
4
+ import { ensureTicketDirAndGitignore } from "./cli-init-logic.mjs";
5
+ import { loadInitConfig, writeInitConfig } from "./cli-prompts.mjs";
6
+
7
+ export async function runInit(opts, bundleRoot) {
8
+ const markers = resolveMarkers(opts);
9
+ const agentsResult = applyAgents({
10
+ targetPath: join(opts.cwd, "AGENTS.md"),
11
+ bundleContent: readBundleAgents(bundleRoot),
12
+ markers, flavor: "init",
13
+ appendIfNoMarkers: opts.appendIfNoMarkers,
14
+ dryRun: opts.dryRun, backup: opts.backup,
15
+ agentsMode: opts.agents || "inject"
16
+ });
17
+ console.log(`AGENTS.md: ${agentsResult.action} (${agentsResult.mode || ""})`);
18
+
19
+ const ruleActions = applyRules({
20
+ bundleRulesDir: join(bundleRoot, "rules"),
21
+ targetRulesDir: join(opts.cwd, ".cursor", "rules"),
22
+ rulesMode: opts.rules || "prefix",
23
+ dryRun: opts.dryRun, backup: opts.backup
24
+ });
25
+ ruleActions.forEach(r => console.log(`rule ${r.action}: ${r.dest || r.src}`));
26
+
27
+ const crResult = applyCursorrules({
28
+ bundleRoot, cwd: opts.cwd,
29
+ markers: resolveCursorrulesMarkers({}),
30
+ cursorrulesMode: opts.cursorrules || "inject",
31
+ dryRun: opts.dryRun, backup: opts.backup
32
+ });
33
+ console.log(`.cursorrules: ${crResult.action} (${crResult.mode || ""})`);
34
+
35
+ ensureTicketDirAndGitignore(opts);
36
+ }
37
+
38
+ export function runMerge(opts, bundleRoot) {
39
+ const markers = resolveMarkers(opts);
40
+ const agentsResult = applyAgents({
41
+ targetPath: join(opts.cwd, "AGENTS.md"),
42
+ bundleContent: readBundleAgents(bundleRoot),
43
+ markers, flavor: "merge",
44
+ appendIfNoMarkers: opts.appendIfNoMarkers,
45
+ dryRun: opts.dryRun, backup: opts.backup,
46
+ agentsMode: opts.agents || "inject"
47
+ });
48
+ console.log(`AGENTS.md: ${agentsResult.action} (${agentsResult.mode || ""})`);
49
+
50
+ const ruleActions = applyRules({
51
+ bundleRulesDir: join(bundleRoot, "rules"),
52
+ targetRulesDir: join(opts.cwd, ".cursor", "rules"),
53
+ rulesMode: opts.rules || "skip",
54
+ dryRun: opts.dryRun, backup: opts.backup
55
+ });
56
+ ruleActions.forEach(r => console.log(`rule ${r.action}: ${r.dest || r.src}`));
57
+
58
+ const crResult = applyCursorrules({
59
+ bundleRoot, cwd: opts.cwd,
60
+ markers: resolveCursorrulesMarkers({}),
61
+ cursorrulesMode: opts.cursorrules || "inject",
62
+ dryRun: opts.dryRun, backup: opts.backup
63
+ });
64
+ console.log(`.cursorrules: ${crResult.action} (${crResult.mode || ""})`);
65
+ }
@@ -0,0 +1,21 @@
1
+ import { existsSync, appendFileSync, writeFileSync, mkdirSync } from "fs";
2
+ import { join } from "path";
3
+ import { TICKET_DIR_NAME } from "./cli-ticket-logic.mjs";
4
+
5
+ const GITIGNORE_TICKET_MARKER = "# deuk-agent-rule: ticket directory (local, not committed by default)";
6
+
7
+ export function ensureTicketDirAndGitignore(opts) {
8
+ const ticketPath = join(opts.cwd, TICKET_DIR_NAME);
9
+ const gitignorePath = join(opts.cwd, ".gitignore");
10
+ const ignoreLine = TICKET_DIR_NAME + "/";
11
+
12
+ if (opts.dryRun) return;
13
+
14
+ mkdirSync(ticketPath, { recursive: true });
15
+
16
+ let gi = existsSync(gitignorePath) ? readFileSync(gitignorePath, "utf8") : "";
17
+ if (!gi.includes(ignoreLine)) {
18
+ const block = "\n" + GITIGNORE_TICKET_MARKER + "\n" + ignoreLine + "\n";
19
+ appendFileSync(gitignorePath, block, "utf8");
20
+ }
21
+ }