deuk-agent-rule 2.2.1 → 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/README.md CHANGED
@@ -1,123 +1,148 @@
1
1
  <div align="center">
2
2
  <br />
3
3
  <h1>DeukAgentRules</h1>
4
- <p>High-Signal Encoding & Rule Standardization Engine</p>
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>
5
9
  <p>Part of the <a href="https://deukpack.app">Deuk Family</a> ecosystem.</p>
6
10
  </div>
7
11
 
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>
12
+ > A core module of the **Deuk Family**. Maximizes collaboration efficiency of AI agents through structured rules.
16
13
 
17
- ***
14
+ **npm package:** `deuk-agent-rule` · **CLI:** `deuk-agent-rule`
18
15
 
19
- ## Abstract
16
+ **Korean:** [README.ko.md](https://github.com/joygram/DeukAgentRules/blob/master/README.ko.md)
20
17
 
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.
18
+ A **submodule-isolated collaborative framework** designed to be used alongside various coding agents such as Cursor, GitHub Copilot, Gemini / Antigravity, Claude, Windsurf, and JetBrains AI Assistant.
19
+ It standardizes project rules (`AGENTS.md`, `.cursor/rules`) and strongly prevents wasteful prompt token consumption and AI context hallucination through a **ticket-based workflow**.
22
20
 
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.
21
+ > **🚀 Core Value:**
22
+ > Compresses the mandatory loaded context of approx. 1,500~2,000 tokens per session down to a mere 200~300 tokens. By isolating the AI to a specific **"Target Submodule"** using exact tickets (work orders), it prevents the AI from wandering through an entire monolithic repository.
25
23
 
26
24
  ---
27
25
 
28
- ## Quick Start
26
+ ## 🛠️ Getting Started (Workspace Initialization)
29
27
 
30
- Initialize the rule system and set up the local workspace in one step:
28
+ Install and initialize the package once at the project root.
31
29
 
32
30
  ```bash
31
+ npm install deuk-agent-rule
33
32
  npx deuk-agent-rule init
34
33
  ```
35
34
 
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.
35
+ Upon initialization, interactive questions will ask for the project's **tech stack** and **agent tools in use**. Based on your selections, optimized markdown templates and rule files (`.cursor/rules/*`) will be automatically generated and synchronized.
36
+ - If you don't need to change the tech stack later, simply run `npx deuk-agent-rule init` to refresh the rules.
37
+ - Suppress interactive prompts in CI or script environments by appending the `--non-interactive` flag.
38
38
 
39
- ---
40
-
41
- ## The Ticket-First Workflow
39
+ ### 🔄 Updating the Rules Package
40
+ When a new version of the agent rules or templates is released, you can sync the latest instructions to your project by updating the package and re-running `init`.
41
+ Since your previous configurations are saved (`.deuk-agent-rule.config.json`), using the `--non-interactive` flag will quietly and cleanly overwrite the obsolete rules with the latest ones without asking any questions.
42
+ ```bash
43
+ npm install deuk-agent-rule@latest
44
+ npx deuk-agent-rule init --non-interactive
45
+ ```
42
46
 
43
- Multiple AI agents share context through a single Markdown ticket, reducing per-session prompt overhead.
47
+ ---
44
48
 
45
- ### The 6-Phase Workflow
49
+ ## 🎯 The Ticket Workflow
46
50
 
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 |
51
+ Running `npx deuk-agent-rule init` deploys a **zero-touch scaffolding sandbox** at your workspace root, spawning two essential directories:
55
52
 
56
- ---
53
+ 1. **`.deuk-agent-templates/` (Agent Templates)**: Houses the official blueprint (`TICKET_TEMPLATE.md`) dictating how AIs must process and report tasks. Committed alongside your source code to serve as the team's rulebook.
54
+ 2. **`.deuk-agent-ticket/` (Ticket Execution Space)**: The covert space where volatile instructions (`TICKET-XXX.md`) are exchanged between agents and workers. (Automatically hidden by `.gitignore` to prevent security leaks and repository bloat).
57
55
 
58
- ### Detailed Workflow Walkthrough
56
+ The optimal **3-Step AI Coding Sequence** utilizing these sandbox folders is as follows.
59
57
 
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
- ```
58
+ ### [Step 1] Ticket Creation & Submodule Isolation
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.
67
60
 
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)
61
+ ```bash
62
+ npx deuk-agent-rule ticket create --topic ui-refactoring --group frontend --project DeukUI
74
63
  ```
64
+ This command instantly creates a templated `TICKET-ui-refactoring.md` file within the `.deuk-agent-ticket/` directory.
75
65
 
76
- ---
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.
77
68
 
78
- ### Keyword-Based Prompt Examples
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.
79
70
 
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 |
71
+ ### [Step 2] Agent Execution & Handoff (Ticket Session)
72
+ Provide a single line of instruction to your AI chatbot (Cursor, Gemini, etc.):
73
+ > *"Open the recently issued `.deuk-agent-ticket/TICKET-ui-refactoring.md` ticket and strictly follow the checklist within the specified target submodule."*
87
74
 
88
- ---
75
+ The AI will faithfully read the defined Phases in the ticket and write optimized code while **completely blocking out unnecessary computations for unrelated server logic or sibling modules**. (This mechanism drastically reduces token costs).
89
76
 
90
- ### CLI Reference (Optional)
77
+ ### [Step 3] Status Review & Closure
78
+ As the AI writes the code, it will simultaneously update the markup checkboxes (`[x]`) inside the ticket. If the agent's session memory limit is approaching, simply leave the ticket file saved, turn off the chat window, open a fresh session, and issue [Step 2] again. The handoff (session transfer) is seamlessly completed.
79
+ Once all steps are accomplished, promote the Phase status to `[Phase Complete]`. Instead of manually typing terminal commands, **you can simply tell your AI chatbot via natural language prompt: "Show me the list of active tickets" or "Archive the completed tickets with reports"**, and the AI will autonomously invoke the CLI to manage them for you.
80
+ To track tickets manually from the terminal, run:
91
81
 
92
82
  ```bash
93
- npx deuk-agent-rule ticket create --topic login-api --project MyProject --content "## Task: ..."
94
83
  npx deuk-agent-rule ticket list
95
- npx deuk-agent-rule ticket close --latest
96
84
  ```
97
-
98
- (Ticket Tutorial: docs/ticket-tutorial.md)
99
-
100
-
85
+ ```text
86
+ 📦 Agent Tickets (Direct System Scan):
87
+ ✅ [TICKET-DEUKUI-Button.md]
88
+ Title: Add Button Component
89
+ Target: DeukUI
90
+ Status: [Complete]
91
+ 🔨 [TICKET-ui-refactoring.md]
92
+ Title: Plugin UI Refactoring
93
+ Target: DeukUI
94
+ Status: [In Progress]
95
+ ```
101
96
 
102
97
  ---
103
98
 
104
- ## Architecture & Configuration (How It Works)
99
+ ## 🤖 AI Agent Prompting Guide
105
100
 
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).
101
+ Even after installing and initializing the package, some AI agents (Cursor, Gemini, etc.) might not actively read the rule file (`AGENTS.md`) in a fresh session. **Whenever you start a new chat session, copy and paste the following prompts to force the AI to align with the rules. This effectively eliminates hallucination and accidental scope-creep.**
108
102
 
109
- ### Core Configuration
103
+ ### 1. Force Rule Familiarization (Mandatory)
104
+ > *"Before starting any work, please read the `AGENTS.md` (DeukAgentRules) file at the workspace root from top to bottom. Make sure you fully understand your Identity, the core project rules, and the ticket workflow. Once you have read and understood them, do NOT summarize them; simply reply 'Rules Acknowledged' and await my first instruction."*
110
105
 
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 |
106
+ ### 2. Ticket Execution (Recommended)
107
+ > *"Open the recently issued `.deuk-agent-ticket/TICKET-XXX.md` ticket. Restrict all your file exploration, analysis, and modifications STRICTLY to the target submodule path explicitly specified in the ticket. Do not wander into other submodules or accidentally modify unrelated files."*
117
108
 
118
109
  ---
119
110
 
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).
111
+ ## ⚙️ CLI Reference & Advanced Options
112
+
113
+ Advanced commands for workflow automation and target control.
114
+
115
+ ### Ticket-based Commands
116
+ Instead of manually typing the CLI commands below into the terminal, you can **delegate their execution to your AI chatbot by giving natural language prompt instructions**.
117
+
118
+ | Command | Description / Natural Language Prompt Example |
119
+ |--------|------|
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"* |
122
+ | `npx deuk-agent-rule ticket use --latest ...` | Returns only the file path of the most recent ticket <br>💬 *"Recent ticket path"* |
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"* |
125
+ | `npx deuk-agent-rule ticket archive ...` | Securely moves completed tickets to `archive/` and updates INDEX <br>💬 *"Archive this ticket (attach report)"* |
126
+ | `npx deuk-agent-rule ticket reports` | Lists structurally preserved agent work reports (`reports/`) <br>💬 *"List archived reports"* |
127
+
128
+ ### Advanced Init Options
129
+ | Flag | Default | Description |
130
+ |--------|--------|------|
131
+ | `--non-interactive` | Off | For CI/Scripts. Disables interactive UI and adopts existing `.config.json` |
132
+ | `--interactive` | Off | Forces the interactive setup to reappear even if config already exists |
133
+ | `--cwd <path>` | Current dir | Adjust target workspace root (absolute/relative path) |
134
+ | `--dry-run` | Off | Simulates the execution text in the console without generating/altering files |
135
+ | `--backup` | Off | Safely creates `*.bak` copies of `AGENTS.md` and rule files before overwriting |
136
+
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`).
@@ -1,7 +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.
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,87 +1,70 @@
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
+ <!-- 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 -->
@@ -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 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
+ ---
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,18 +1,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.
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 재서술, 파일 목록 나열, “업데이트함/개선함” 같은 빈 말, 이모지, 장문 튜토리얼, 영어·한국어 이중 번역(팀 언어 하나만). 커밋 메시지 제목(Title)에 "sync" 단어 사용 금지 (대신 "release", "update", "apply" 등으로 구체적으로 표현).
20
+
21
+ ## 비용
22
+
23
+ - 한 커밋 주제면 **제목 한 줄로 끝낸다.**
24
+ - 스테이징이 크면 제목은 요약하고, 본문은 **사용자가 본문 달라고 할 때만** 추가한다.
@@ -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)
@@ -0,0 +1,24 @@
1
+ # Submodule Agent Rules: [Module Name]
2
+
3
+ > **[CAUTION FOR AI AGENTS]**
4
+ > When the Ticket Document `Target Submodule` matches this module, you MUST strictly adhere to the following architectural conventions and rules. Do not cross-pollinate rules from other submodules.
5
+
6
+ ## 📁 Repository Boundary
7
+ - **Path Root:** `[e.g., DeukUI/ or DeukPackKits/]`
8
+ - **Allowed Tech Stack:** `[e.g., React, TypeScript, CSS Modules | C#, Unity 2022]`
9
+
10
+ ## 🏗️ Core Architecture & Conventions
11
+ 1. **Naming Conventions:**
12
+ - [e.g., Use PascalCase for C# files, kebab-case for TS files.]
13
+ 2. **State Management:**
14
+ - [e.g., Do NOT use global Redux state; pass props or use React Context localized.]
15
+ 3. **Prohibited Patterns:**
16
+ - [e.g., Absolutely forbidden to use LINQ inside `Update()` functions.]
17
+ - [e.g., Absolutely forbidden to overwrite `index.js` generated files.]
18
+
19
+ ## 🛠️ Build & Test Protocol
20
+ - **To build this module:** `[e.g., npm run build:plugin --prefix DeukUI]`
21
+ - **To test this module:** `[e.g., npm run test:ui]`
22
+
23
+ ## 🔗 Ticket Instructions
24
+ Always enforce that generated `Tickets` intended for this module include this rule file in their `[Context Files]` section.
@@ -0,0 +1,40 @@
1
+
2
+ # Task: [Task Title / Ticket Number]
3
+
4
+ > **[CAUTION FOR AI AGENTS]**
5
+ > You are operating within a locked multi-module monorepo.
6
+ > 1. Restrict absolutely all analysis, file creation, and modifications to the declared **[Target Submodule]** below.
7
+ > 2. Read the files listed in **[Context Files]** before doing ANY code generation.
8
+ > 3. DO NOT leak configuration, logic, or dependencies from other submodules.
9
+
10
+ ## 🎯 Scope Bounds
11
+
12
+ - **Target Submodule:** `[e.g., DeukUI | DeukPack | DeukNavigation]`
13
+ - **Context Files:**
14
+ - `[e.g., DeukAgentRules/templates/MODULE_RULE_TEMPLATE.md]`
15
+ - `[e.g., path/to/your/specific/rules.md]`
16
+
17
+ ## 📁 Files to Modify
18
+ - `path/from/root/to/target1`: [Specific instructions. Don't write 'refactor', describe WHAT to refactor.]
19
+ - `path/from/root/to/target2`: [Instructions...]
20
+
21
+ ## 🏗️ Design Decisions (For Context)
22
+ - [Why are we doing this? E.g., "To isolate the IR Layout bindings from DOM events"]
23
+ - [What pattern to use?]
24
+
25
+ ## 🛑 Strict Constraints (Rules to never break)
26
+ - [e.g., Do NOT remove existing @ts-nocheck headers]
27
+ - [e.g., MUST retain C# [SerializeField] directives]
28
+ - [e.g., Do NOT import Vue logic into DeukPack]
29
+
30
+ ## 🔄 Phased Execution Steps
31
+ > Agent: Do NOT attempt to do Phase 3 before Phase 1 is fully tested. Use separate chat messages per phase if the task is large.
32
+ 1. [Phase 1> Setup / Parsing]
33
+ 2. [Phase 2> Core Logic Change]
34
+ 3. [Phase 3> Cleanup / Verification]
35
+
36
+ ## ✅ Verification / QA
37
+ - [e.g., Check CLI command output `npm run test`]
38
+ - [e.g., Validate Inspector mounts properly in Figma]
39
+
40
+