deuk-agent-rule 1.0.13 → 2.2.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/README.md CHANGED
@@ -1,106 +1,123 @@
1
- # DeukAgentRules
2
-
3
- > **Part of the Deuk Family** — Empowering AI Agents with structured rules.
4
-
5
- **npm package:** `deuk-agent-rule` · **CLI:** `deuk-agent-rule`
6
-
7
- **한국어:** [README.ko.md](https://github.com/joygram/DeukAgentRules/blob/master/README.ko.md)
8
-
9
- Versioned templates for `AGENTS.md` and `.cursor/rules` for Cursor, GitHub Copilot, Gemini / Antigravity, Claude (via Cursor or Claude Code), Windsurf, JetBrains AI Assistant, and other coding agents that read project rules: shared handoff format, concise execution, stronger cost-efficiency and responsiveness.
10
-
11
- ## Initialize a workspace
12
-
13
- ```bash
14
- npm install deuk-agent-rule
15
- npx deuk-agent-rule init
16
- ```
17
-
18
- On the **first** `init` in a repo (no `.deuk-agent-rule.config.json`), a short **interactive** setup runs. **Later** `npx deuk-agent-rule init` reuses those choices and only applies template updates — no need for `--non-interactive` unless you are in **CI**. Use **`--interactive`** to change answers, or delete/edit the config file.
19
-
20
- Running `init` for the first time (example):
21
-
22
- ```
23
- $ npx deuk-agent-rule init
24
-
25
- DeukAgentRules init — let's configure your workspace.
26
-
27
- ? What is your primary tech stack?
28
- 1) Unity / C#
29
- 2) Next.js + C#
30
- 3) Web (React / Vue / general)
31
- 4) Java / Spring Boot
32
- 5) Other / skip
33
- Choice [1-5]: 3
34
-
35
- ? Which agent tools do you use? (comma-separated numbers, or 'all')
36
- 1) Cursor
37
- 2) GitHub Copilot
38
- 3) Gemini / Antigravity
39
- 4) Claude (Cursor / Claude Code)
40
- 5) Windsurf
41
- 6) JetBrains AI Assistant
42
- 7) All of the above
43
- 8) Other / skip
44
- Choices: all
45
-
46
- Stack : web
47
- Tools : cursor, copilot, gemini, claude, windsurf, jetbrains, all, other
48
-
49
- AGENTS.md: injected (inject)
50
- rule copied: .cursor/rules/deuk-agent-rule-multi-ai-workflow.mdc
51
- rule copied: .cursor/rules/deuk-agent-rule-delivery-and-parallel-work.mdc
52
- rule copied: .cursor/rules/deuk-agent-rule-git-commit.mdc
53
- ```
54
-
55
- To skip questions (CI or scripted use):
56
-
57
- ```bash
58
- npx deuk-agent-rule init --non-interactive
59
- ```
60
-
61
- After a package upgrade:
62
-
63
- ```bash
64
- npm update deuk-agent-rule
65
- npx deuk-agent-rule init
66
- ```
67
-
68
- Use `init --non-interactive` only in **CI** or headless scripts. You do **not** need a separate `merge` for routine upgrades: **`init` refreshes** the bundled `.cursor/rules` files. With default `--rules prefix`, existing **`deuk-agent-rule-*.mdc`** copies are **overwritten** from the new package so template fixes reach your repo. Unprefixed rule files you keep for local overrides are not touched. Only the **marker region** in `AGENTS.md` is replaced; your text outside stays.
69
-
70
- ### Handoffs (multi-session and tool handover)
71
-
72
- `init` creates **`.deuk-agent-handoff/`** (and adds it to **`.gitignore`** by default) so you can **persist** structured specs beyond a single chat. Use the same sections as in `AGENTS.md` (**Handoff format**): task title, files to modify, decisions, constraints. That lets the next session or another tool pick up where you left off without re-explaining the repo.
73
-
74
- Optionally, if you use an editor with a **Plans** panel, mirror the same Markdown body under **`.cursor/plans/deuk-handoff.plan.md`** (or `deuk-handoff-<topic>.plan.md`) so it appears there; keep it in sync with the canonical file under `.deuk-agent-handoff/` or `DeukAgentRules/handoff/LATEST.md`. See the bundled **`multi-ai-workflow.mdc`** rule for agent-side details.
75
-
76
- ### Key options
77
-
78
- | Flag | Default | Description |
79
- |------|---------|-------------|
80
- | `--non-interactive` | off | CI/scripts: no prompts; no saved-config path |
81
- | `--interactive` | off | Force the setup questions even if `.deuk-agent-rule.config.json` exists |
82
- | `--cwd <path>` | current directory | Target repo root |
83
- | `--dry-run` | off | Print actions without writing |
84
- | `--tag <id>` | `deuk-agent-rule` | Marker id: `<!-- <id>:begin/end -->` |
85
- | `--agents <mode>` | `inject` | `inject` \| `skip` \| `overwrite` |
86
- | `--rules <mode>` | `prefix` | `prefix` \| `skip` \| `overwrite` |
87
- | `--backup` | off | Write `*.bak` before overwrite |
88
-
89
- ### Bundled rules
90
-
91
- - **`multi-ai-workflow.mdc`** — `alwaysApply: true`
92
- - **`delivery-and-parallel-work.mdc`** — `alwaysApply: true` (vertical slices, portfolio priority, parallel ownership, scoped refactors)
93
- - **`git-commit.mdc`** `alwaysApply: false`
94
-
95
- ### `merge` (stricter)
96
-
97
- Same flags; `AGENTS.md` inject fails without markers unless `--append-if-no-markers`. Default `--rules skip`.
98
-
99
- ### Caveats
100
-
101
- - Multiple `alwaysApply: true` rules all apply — trim duplicates if context grows too large.
102
- - Do **not** run `init` from `postinstall` without an explicit team decision.
103
-
104
- ## Versioning
105
-
106
- Bump `version` in `package.json` before publishing.
1
+ <div align="center">
2
+ <br />
3
+ <h1>DeukAgentRules</h1>
4
+ <p>High-Signal Encoding & Rule Standardization Engine</p>
5
+ <p>Part of the <a href="https://deukpack.app">Deuk Family</a> ecosystem.</p>
6
+ </div>
7
+
8
+ <div align="center">
9
+ <a href="https://www.npmjs.com/package/deuk-agent-rule"><img src="https://img.shields.io/npm/v/deuk-agent-rule.svg?color=black&style=flat-square" alt="NPM Version" /></a>
10
+ <a href="https://www.npmjs.com/package/deuk-agent-rule"><img src="https://img.shields.io/npm/dm/deuk-agent-rule.svg?color=blue&style=flat-square" alt="NPM Downloads" /></a>
11
+ <a href="https://github.com/joygram/DeukAgentRules"><img src="https://img.shields.io/github/stars/joygram/DeukAgentRules.svg?style=flat-square&color=orange" alt="GitHub Stars" /></a>
12
+ <a href="https://github.com/joygram/DeukAgentRules/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/deuk-agent-rule.svg?style=flat-square" alt="License" /></a>
13
+ <br /><br />
14
+ <a href="https://github.com/joygram/DeukAgentRules/blob/master/README.ko.md">한국어 (Korean)</a>
15
+ </div>
16
+
17
+ ***
18
+
19
+ ## Abstract
20
+
21
+ DeukAgentRules defines a project-agnostic rule architecture for AI engineering agents (Cursor, GitHub Copilot, Gemini/Antigravity, Claude, Windsurf, JetBrains AI). It separates persistent workflow memory from session context, reducing recurring prompt loads per session.
22
+
23
+ > Why DeukAgentRules?
24
+ > The Ticket-First Workflow reduces recurring context loads into a single focused topic file per session, enabling handovers between different AI tools without re-explaining the repository.
25
+
26
+ ---
27
+
28
+ ## Quick Start
29
+
30
+ Initialize the rule system and set up the local workspace in one step:
31
+
32
+ ```bash
33
+ npx deuk-agent-rule init
34
+ ```
35
+
36
+ - Interactive Setup: On the first run, the CLI guides you to select your primary stack and the AI agents you use. (See the System Selection Guide for a detailed list of available stacks and tools).
37
+ - Safe Updates: Subsequent runs safely append necessary templates without touching your custom extensions. Use --interactive to reconfigure.
38
+
39
+ ---
40
+
41
+ ## The Ticket-First Workflow
42
+
43
+ Multiple AI agents share context through a single Markdown ticket, reducing per-session prompt overhead.
44
+
45
+ ### The 6-Phase Workflow
46
+
47
+ | Phase | Actor | Action |
48
+ |---|---|---|
49
+ | 1. Explore & Plan | Reasoning AI | Analyze codebase, propose implementation plan |
50
+ | 2. Decide | User | Review and approve the plan |
51
+ | 3. Ticket (Registration) | Reasoning AI | Write approved plan to .deuk-agent-ticket/ |
52
+ | 4. Execute | IDE Agent | Read ticket, code strictly within scope |
53
+ | 5. Post-Test Risk Analysis | IDE Agent | Mandatory artifact risk analysis after testing |
54
+ | 6. Report & Close | User + Agent | Review risk report, then npx deuk-agent-rule ticket close --latest |
55
+
56
+ ---
57
+
58
+ ### Detailed Workflow Walkthrough
59
+
60
+ Phase 1: Explore & Plan
61
+ ```
62
+ [User] "Analyze storage module"
63
+ [Agent] (Analyzes codebase, proposes direction)
64
+ [User] "Plan and design for the analyzed content."
65
+ [Agent] (Saves ticket to .deuk-agent-ticket/main/storage-20260406.md)
66
+ ```
67
+
68
+ Phase 2: Execution & Verification
69
+ ```
70
+ [User] "Proceed" (or "Proceed with [Ticket #]")
71
+ [Agent] (Reads the ticket, implements changes, self-checks, and reports)
72
+ [User] "Verify issues, defects, and potential errors."
73
+ [Agent] (Runs tests, confirms compliance and finds defects)
74
+ ```
75
+
76
+ ---
77
+
78
+ ### Keyword-Based Prompt Examples
79
+
80
+ | Intent | Keyword Input |
81
+ |---|---|
82
+ | Analysis | Analyze [Topic/Module] |
83
+ | Plan | Plan and design for the analyzed content. |
84
+ | Proceed | Proceed [Ticket #] (or latest if omitted) |
85
+ | Verify | Verify issues, defects, and potential errors. |
86
+ | Check | /ticket |
87
+
88
+ ---
89
+
90
+ ### CLI Reference (Optional)
91
+
92
+ ```bash
93
+ npx deuk-agent-rule ticket create --topic login-api --project MyProject --content "## Task: ..."
94
+ npx deuk-agent-rule ticket list
95
+ npx deuk-agent-rule ticket close --latest
96
+ ```
97
+
98
+ (Ticket Tutorial: docs/ticket-tutorial.md)
99
+
100
+
101
+
102
+ ---
103
+
104
+ ## Architecture & Configuration (How It Works)
105
+
106
+ The CLI supports advanced parameters for CI environments and explicit structural control, utilizing a non-destructive injection mechanism to avoid user conflicts.
107
+ For a detailed technical overview of how we safely sandbox injected rules, see the How It Works Guide (docs/how-it-works.md).
108
+
109
+ ### Core Configuration
110
+
111
+ | Flag | Purpose |
112
+ |------|---------|
113
+ | --non-interactive | CI/Headless mode; applies defaults/saved config without prompting |
114
+ | --tag <id> | Overrides the default marker region (<!-- <id>:begin -->) |
115
+ | --agents inject | Smart injection into existing AGENTS.md (or skip, overwrite) |
116
+ | --rules prefix | Updates .cursor/rules via intelligent file prefixing |
117
+
118
+ ---
119
+
120
+ ## License & Ecosystem
121
+
122
+ Part of the DeukPack Ecosystem. Licensed under Apache-2.0.
123
+ For issues, contributions, and community discussions, visit the GitHub Repository (https://github.com/joygram/DeukAgentRules).
@@ -0,0 +1,7 @@
1
+ # Cursor — AGENTS.md is authoritative
2
+
3
+ You MUST read and strictly follow the workflows, rules, and ticket formats defined in AGENTS.md at the repository root before writing or modifying any code. If AGENTS.md is not yet in your context for this task, open it and use it.
4
+
5
+ Precedence: Repository root AGENTS.md defines project rules (structure, constraints, tickets). .cursor/rules/*.mdc files add editor-specific behavior (for example token discipline and multi-tool handoff). If anything conflicts, follow AGENTS.md for project facts and tickets.
6
+
7
+ Do not assume stacks or repo layouts (microservices, api-gateway, OpenAPI-only workflows) unless they appear in this repository and AGENTS.md.
package/bundle/AGENTS.md CHANGED
@@ -1,96 +1,87 @@
1
- # Project Agent Rules
2
-
3
- ## Identity
4
-
5
- Senior software engineer. Correctness, minimal diffs, safety.
6
-
7
- ## Code Quality
8
-
9
- - Minimal diffs: keep existing conventions, public API, and serialized/config shapes stable unless the task requires a deliberate change.
10
- - Hot paths (per-frame loops, tight inner loops): avoid unnecessary allocation; cache lookups where appropriate.
11
- - Prefer one clear solution; do not list alternatives without applying one.
12
- - Follow your stack’s official guidance for editor-only code, time steps, and serialization migrations.
13
-
14
- ## Documentation
15
-
16
- - User-facing docs: product behavior, compatibility, packaging, and security not internal runbooks pasted verbatim.
17
- - Changelog entries: factual, consumer-relevant changes only.
18
-
19
- ## Cost-effective sessions
20
-
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.
24
-
25
- ## Delivery, portfolio, and parallel work
26
-
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.
31
-
32
- ## IDE Branding
33
-
34
- No editor or vendor tool branding in code, docs, README, commits, or published artifacts.
35
-
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
54
-
55
- When handing work between tools or people, use:
56
-
57
- ```markdown
58
- ## Task: [title]
59
- ### Files to modify
60
- - `path/to/file`: [what to change]
61
- ### Design decisions
62
- - [decision]
63
- ### Constraints
64
- - [constraint]
65
- ```
66
-
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.
78
-
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).
80
-
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.
82
-
83
- ## Handoff directory when this package is cloned as `DeukAgentRules/` (consumer repos)
84
-
85
- In monorepos that vendor or submodule this package under a top-level directory **`DeukAgentRules`**, teams may use a **gitignored** handoff directory:
86
-
87
- - **Directory (repo-relative):** `DeukAgentRules/handoff/`
88
- - **Default file for the next agent:** `DeukAgentRules/handoff/LATEST.md`
89
-
90
- Add **`DeukAgentRules/handoff/`** to the **consumer** repository’s `.gitignore` unless you intentionally version handoffs.
91
-
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.
93
-
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).
95
-
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).
1
+ # Project Agent Rules
2
+
3
+ ## Identity & Highest Priority
4
+
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.
25
+
26
+ ## Code Quality
27
+
28
+ - Minimal diffs: keep existing conventions, public API, and serialized/config shapes stable unless the task requires a deliberate change.
29
+ - Hot paths (per-frame loops, tight inner loops): avoid unnecessary allocation; cache lookups where appropriate.
30
+ - Prefer one clear solution; do not list alternatives without applying one.
31
+ - Follow your stack’s official guidance for editor-only code, time steps, and serialization migrations.
32
+
33
+ ## Documentation
34
+
35
+ - User-facing docs: product behavior, compatibility, packaging, and security — not internal runbooks pasted verbatim.
36
+ - Changelog entries: factual, consumer-relevant changes only.
37
+
38
+ ## Cost-effective sessions
39
+
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.
43
+
44
+ ## Delivery, portfolio, and parallel work
45
+
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.
50
+
51
+ ## IDE Branding
52
+
53
+ No editor or vendor tool branding in code, docs, README, commits, or published artifacts.
54
+
55
+ ## Ticket format
56
+
57
+ When handing work between tools or people, use:
58
+
59
+ ```markdown
60
+ ## Task: [title]
61
+ ### Files to modify
62
+ - path/to/file: [what to change]
63
+ ### Design decisions
64
+ - [decision]
65
+ ### Constraints
66
+ - [constraint]
67
+ ```
68
+
69
+ ## Ticket persistence (internal implementation docs)
70
+
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.
72
+
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.
74
+
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.
76
+
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.
78
+
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.
80
+
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).
82
+
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.
84
+
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).
86
+
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).
@@ -1,26 +1,26 @@
1
- ---
2
- description: Vertical slices, portfolio priority, parallel-branch ownership, scoped refactors
3
- alwaysApply: true
4
- ---
5
-
6
- # Delivery, portfolio, and parallel work
7
-
8
- ## Default shape of work
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.
12
-
13
- ## Parallel branches and file ownership
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.
18
-
19
- ## Refactor discipline
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.
22
- - Do not use “while we’re here” to rename, reformat, or reorganize unrelated modules.
23
-
24
- ## Interaction with handoffs
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.
1
+ ---
2
+ description: Vertical slices, portfolio priority, parallel-branch ownership, scoped refactors
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Delivery, portfolio, and parallel work
7
+
8
+ ## Default shape of work
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 ticket unless they are blocking the slice.
12
+
13
+ ## Parallel branches and file ownership
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.
18
+
19
+ ## Refactor discipline
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 ticket format.
22
+ - Do not use “while we’re here” to rename, reformat, or reorganize unrelated modules.
23
+
24
+ ## Interaction with tickets
25
+
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
- ---
2
- description: Git 커밋 메시지 짧고 의미 있게(저비용 출력)
3
- alwaysApply: false
4
- ---
5
-
6
- # Git commit messages (agent)
7
-
8
- 커밋 메시지·스테이징 요약을 때만 적용. **출력은 최소 토큰**, 내용은 **검색·리뷰에 만한 정보**만.
9
-
10
- ## 형식 (기본)
11
-
12
- - **첫 줄만**: 명령형, **72자 이내**, 마침표 없음.
13
- - **선택** `type(scope): summary` — `feat` `fix` `refactor` `docs` `chore` 등; `scope`는 디렉터리·모듈 한 단어.
14
- - **본문**: 사용자가 요청하거나 변경이 여러 주제일 때만. 그때도 **불릿 최대 3줄**, 80자 이내.
15
-
16
- ## 쓸 것 / 쓰지 말 것
17
-
18
- - **쓸 것**: 무엇이 바뀌었는지 문장(동작·계약·호환). 위험한 변경이면 단어로 표시(`BREAKING` 또는 마이그레이션 줄).
19
- - **쓰지 말 것**: diff 재서술, 파일 목록 나열, “업데이트함/개선함” 같은 빈 말, 이모지, 장문 튜토리얼, 영어·한국어 이중 번역(팀 언어 하나만).
20
-
21
- ## 비용
22
-
23
- - 한 커밋 주제면 **제목 한 줄로 끝낸다.**
24
- - 스테이징이 크면 제목은 요약하고, 본문은 **사용자가 본문 달라고 할 때만** 추가한다.
1
+ ---
2
+ description: Commit message formatting (Plain text only)
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Git Commit Rules
7
+
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
+
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.
13
+
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".
16
+
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.