deuk-agent-rule 2.4.3 → 2.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.ko.md CHANGED
@@ -6,6 +6,20 @@
6
6
 
7
7
  형식은 [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/)를 기반으로 하며, 이 프로젝트는 [유의적 버전(Semantic Versioning)](https://semver.org/spec/v2.0.0.html)을 준수합니다.
8
8
 
9
+ ## [2.4.6] - 2026-04-19
10
+
11
+ ### 수정됨 (Fixed)
12
+
13
+ - **cli:** 로컬 버전이 registry 버전 이상일 경우 업데이트 알림을 표시하지 않도록 수정 (로컬 개발 symlink 환경에서의 역방향 스팸 알림 해소)
14
+ - **ticket:** `NNN` 정규식을 최대 4자리로 제한하여 유닉스 타임스탬프가 티켓 순번으로 잘못 파싱되는 버그 수정 — 올바른 `NNN-topic-hostname` 포맷 생성 복원
15
+
16
+ ## [2.4.4] - 2026-04-19
17
+
18
+ ### 변경됨 (Changed)
19
+
20
+ - **rules:** 서브모듈 전용 규칙(DeukPack, C++, Unity)을 해당 워크스페이스의 `MODULE_RULE.md`로 이동하여 `AGENTS.md`를 일반화된 규약 중심으로 개편
21
+ - **templates:** `publish/` 소스에 맞춰 `bundle/` 내의 레거시 템플릿 정리
22
+
9
23
  ## [2.4.3] - 2026-04-18
10
24
 
11
25
  ### 변경됨 (Changed)
package/CHANGELOG.md CHANGED
@@ -4,6 +4,41 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [2.4.6] - 2026-04-19
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** suppress update notifier when local version is greater than or equal to registry version (fixes false-positive spam in local dev symlink environments)
12
+ - **ticket:** cap `NNN` regex to 4 digits to prevent unix timestamps being incorrectly parsed as ticket sequential numbers, restoring correct `NNN-topic-hostname` format generation
13
+
14
+ ## [2.4.5] - 2026-04-18
15
+
16
+
17
+ ### Added
18
+
19
+ - **cli:** add update notifier for checking latest npm version
20
+
21
+
22
+ ### Fixed
23
+
24
+ - **ticket:** resolve discrepancy between filename and ticket ID generation
25
+ - **ticket:** strictly enforce 8-character limit on hostname slug
26
+
27
+
28
+ ### Changed
29
+
30
+ - add reasons for global installation
31
+ - **changelog:** sync korean changelog with v2.4.0
32
+ - generalize AGENTS.md and cleanup submodule-specific rules
33
+ - **ticket:** new ID format NNN-topic-hostname with backward-compatible parsing
34
+
35
+ ## [2.4.4] - 2026-04-19
36
+
37
+ ### Changed
38
+
39
+ - **rules:** generalize `AGENTS.md` by moving submodule-specific rules (DeukPack, C++, Unity) to their respective workspace `MODULE_RULE.md` files
40
+ - **templates:** cleanup legacy templates in `bundle/` to match `publish/` source
41
+
7
42
  ## [2.4.3] - 2026-04-18
8
43
 
9
44
  ### Changed
package/README.ko.md CHANGED
@@ -38,7 +38,11 @@ deuk-agent-rule init
38
38
  > - **Windows**: Node.js가 `Program Files` 등 시스템 폴더에 설치된 경우, 터미널(PowerShell/CMD)을 **관리자 권한**으로 실행한 상태에서 설치해야 오류가 발생하지 않습니다.
39
39
 
40
40
  ### 💡 전역(Global) 설치를 권장하는 이유
41
- 1. **npx 캐시 이슈 예방**: `npx deuk-agent-rule` 명령어는 로컬 npm 캐시에 의존하므로, 새로운 로직(예: 호스트네임 기반 순번 부여 등)이 포함된 최신 배포본을 무시하고 구버전을 실행하는 치명적인 에이전트 오동작을 유발할 수 있습니다.
41
+
42
+ > [!WARNING]
43
+ > **서브모듈 내 로컬 설치 절대 금지 (Local Trap 방지)**: 개별 타깃 서브모듈의 `package.json`에 `deuk-agent-rule`을 로컬 종속성(`npm install deuk-agent-rule`)으로 추가해서는 안 됩니다. 로컬에 구버전이 설치되어 있을 경우, `npx` 명령어는 전역에 설치된 최신 버전을 무시하고 로컬의 구버전을 강제로 실행하여 티켓 포맷이나 로직 충돌 등 심각한 오동작(Local Trap)을 유발합니다.
44
+
45
+ 1. **npx 캐시 및 로컬 트랩 이슈 예방**: `npx deuk-agent-rule` 명령어는 로컬 npm 의존성 및 캐시에 우선순위를 둡니다. 로컬 트랩을 방지하고 항상 최신 배포본을 안정적으로 실행하여 티켓 오동작을 예방하기 위해 전역 설치를 활용해야 합니다.
42
46
  2. **실행 속도 최적화**: 매번 임시로 패키지를 다운로드/확인하는 `npx` 방식 대비 챗봇 에이전트가 즉각적으로 CLI 응답을 받을 수 있습니다.
43
47
  3. **크로스 레포지토리 일관성**: Deuk Family의 여러 서브모듈 및 독립된 마이크로서비스 저장소들을 오가며 항상 동일한 버전의 에이전트 룰 엔진을 적용할 수 있습니다.
44
48
 
package/README.md CHANGED
@@ -38,7 +38,11 @@ deuk-agent-rule init
38
38
  > - **Windows**: If Node.js is installed in a system directory like `Program Files`, you must run your terminal (PowerShell/CMD) as an **Administrator** for the global installation to complete successfully.
39
39
 
40
40
  ### 💡 Why Global Installation?
41
- 1. **Preventing `npx` Cache Issues**: Running `npx deuk-agent-rule` relies on the local npm cache, which may silently execute an outdated version of the CLI. This has been proven to cause severe agent hallucinations or ticket formatting errors (e.g., missing hostname sequence IDs).
41
+
42
+ > [!WARNING]
43
+ > **Submodule Local Installation STRICTLY FORBIDDEN**: Never install `deuk-agent-rule` locally (e.g., `npm install deuk-agent-rule`) inside your target consumer submodules. Doing so creates a "Local Trap" where `npx` prioritizes the outdated local `node_modules` over the globally installed latest version, leading to severe ticket formatting errors and logic mismatches.
44
+
45
+ 1. **Preventing `npx` Cache & Local Trap Issues**: Running `npx deuk-agent-rule` relies on the local npm cache and `node_modules` resolution. If a stale version is present locally, it will silently hijack the execution. This has been proven to cause severe agent hallucinations or ticket formatting errors (e.g., missing hostname sequence IDs).
42
46
  2. **Execution Speed**: The chatbot agent receives instant CLI responses without the overhead of `npx` checking for temporary package downloads.
43
47
  3. **Cross-Repository Consistency**: It allows you to reliably apply the exact same version of the agent rules across various submodules and independent microservices in the Deuk Family ecosystem.
44
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deuk-agent-rule",
3
- "version": "2.4.3",
3
+ "version": "2.4.6",
4
4
  "description": "DeukAgentRules: generic AGENTS.md + .cursor rule templates with init/merge CLI (npm name: deuk-agent-rule).",
5
5
  "keywords": [
6
6
  "agents-md",
@@ -494,9 +494,9 @@ export function getHostnameSlug() {
494
494
  */
495
495
  export function computeNextTicketNumber(existingEntries) {
496
496
  const hostname = getHostnameSlug();
497
- // Legacy: ticket_NNN_* | New: NNN-*
498
- const legacyRe = /^ticket_(\d{3,})_/;
499
- const newRe = /^(\d{3,})-/;
497
+ // Legacy: ticket_NNN_* | New: NNN-* (NNN is strictly 3-4 digits, NOT a unix timestamp)
498
+ const legacyRe = /^ticket_(\d{3,4})_/;
499
+ const newRe = /^(\d{3,4})-/;
500
500
  let max = 0;
501
501
  for (const e of (existingEntries || [])) {
502
502
  const id = String(e.id || '');
@@ -144,6 +144,16 @@ export function stringifyFrontMatter(meta, content) {
144
144
  return `---\n${yamlStr}\n---\n\n${content.trim()}\n`;
145
145
  }
146
146
 
147
+ export function semverGt(a, b) {
148
+ const pa = String(a || "0").replace(/[^0-9.]/g, "").split(".").map(Number);
149
+ const pb = String(b || "0").replace(/[^0-9.]/g, "").split(".").map(Number);
150
+ for (let i = 0; i < 3; i++) {
151
+ const na = pa[i] ?? 0, nb = pb[i] ?? 0;
152
+ if (na !== nb) return na < nb;
153
+ }
154
+ return false;
155
+ }
156
+
147
157
  export async function checkUpdateNotifier() {
148
158
  try {
149
159
  const { fileURLToPath } = await import("url");
@@ -155,7 +165,8 @@ export async function checkUpdateNotifier() {
155
165
  });
156
166
  if (res.ok) {
157
167
  const data = await res.json();
158
- if (data.version && data.version !== currentVersion) {
168
+ // Only notify when registry version is strictly newer than local (handles local dev symlink case)
169
+ if (data.version && semverGt(currentVersion, data.version)) {
159
170
  console.warn(`\n\x1b[33m💡 Update available! ${currentVersion} → ${data.version}\x1b[0m`);
160
171
  console.warn(`\x1b[36mRun 'npm install -g deuk-agent-rule' to update.\x1b[0m\n`);
161
172
  }