deuk-agent-rule 2.5.11 → 2.5.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -4,11 +4,37 @@ 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.5.14] - 2026-04-22
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **cli:** resolve marker nesting bug in AGENTS.md injection
|
|
13
|
+
|
|
14
|
+
## [2.5.13] - 2026-04-22
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- implement RAG-Miss fallback rule, fix ticket template formatting, and ignore tmp dirs in submodule discovery
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- squash mermaid diagram changelog noise into single entry
|
|
25
|
+
|
|
26
|
+
## [2.5.12] - 2026-04-22
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- squash mermaid diagram changelog noise into single entry
|
|
32
|
+
|
|
7
33
|
## [2.5.11] - 2026-04-22
|
|
8
34
|
|
|
9
|
-
###
|
|
35
|
+
### Added
|
|
10
36
|
|
|
11
|
-
-
|
|
37
|
+
- implement modernized workflow diagrams with Mermaid v8.8.0 compatibility, semantic color palette, and native SVG text rendering for IDE dark mode compatibility
|
|
12
38
|
|
|
13
39
|
## [2.5.1] - 2026-04-22
|
|
14
40
|
|
|
@@ -29,3 +29,9 @@ inject_target: ["AGENTS.md", "gemini.md"]
|
|
|
29
29
|
### State C: RAG-Error (Loop Prevention)
|
|
30
30
|
- **상태**: MCP 호출 시 타임아웃, 연결 오류, 또는 동일 에러가 2회 이상 반복됨.
|
|
31
31
|
- **행동**: **즉시 RAG 호출을 중단**하고 State B(로컬 검색)로 강제 전환하십시오. 에러 루프에 빠져 작업 시간을 낭비하지 마십시오. 문제 상황을 `## 📜 Execution Report`에 기록하여 추후 복구 티켓을 발행할 수 있게 하십시오.
|
|
32
|
+
|
|
33
|
+
### State D: RAG-Miss (Zero Results)
|
|
34
|
+
- **상태**: MCP 도구를 정상 호출했으나 관련 결과가 반환되지 않음 (DeukRag Miss).
|
|
35
|
+
- **행동**: 검색 결과가 없다고 해서 임의로 추측하거나 단념하지 마십시오. 즉시 로컬 파일 기반 검색(`grep_search`, `list_dir`, `view_file`)으로 전환하여 대체 로컬 근거(Local Evidence)를 수집하십시오.
|
|
36
|
+
- **[보완 하드룰]**: 로컬 검색으로 찾은 대체 근거는 즉시 `add_knowledge` 도구를 호출하여 RAG 시스템에 보완(주입)하십시오. 이를 통해 다음 질의부터 해당 지식을 즉시 검색할 수 있게 됩니다.
|
|
37
|
+
- **이후 티켓이나 보고서 작성 시 반드시 "RAG Miss 발생: 로컬 검색 근거 파일 목록[...]"을 명시적으로 기록하십시오.**
|
|
@@ -29,17 +29,23 @@
|
|
|
29
29
|
- [ ] `mcp_deukrag_search_rules` 기반 규약 검토 완료
|
|
30
30
|
- [ ] `mcp_deukrag_search_tickets` 과거 유사 티켓 이력 열람 완료
|
|
31
31
|
- [ ] (필수 작성) 검색된 핵심 컨텍스트 요약:
|
|
32
|
+
- [ ] (RAG Miss 시 필수 작성) 로컬 검색 결과 `add_knowledge` 도구로 즉시 주입 완료 여부 및 주입된 파일 목록:
|
|
33
|
+
|
|
32
34
|
0.5 [Phase 0.5> Deep Analysis (Optional)]
|
|
33
35
|
- [ ] 복잡한 아키텍처 변경 시 별도 분석 아티팩트 작성 및 승인 완료
|
|
36
|
+
|
|
34
37
|
1. [Phase 1> Setup / Parsing]
|
|
38
|
+
|
|
35
39
|
2. [Phase 2> Core Logic Change]
|
|
36
40
|
- [ ] (CONTINUOUS RAG) 새로운 함수/클래스 수정 전 `mcp_deukrag_search_code` 및 `search_rules`로 관련 패턴 수시 검색
|
|
41
|
+
|
|
37
42
|
3. [Phase 3> Cleanup / Verification]
|
|
38
43
|
- [ ] (VERIFY RAG) 디버깅 및 에러 발생 시 로그 덤프 전 `mcp_deukrag_search_tickets` 로 과거 해결책 우선 탐색
|
|
39
44
|
- [ ] **Potential Issue Table**:
|
|
40
45
|
| 이슈 | 심각도 | 설명 | 조치 계획 |
|
|
41
46
|
|---|---|---|---|
|
|
42
47
|
| | | | |
|
|
48
|
+
|
|
43
49
|
4. [Phase 4> Follow-up Chaining (MANDATORY if issues exist)]
|
|
44
50
|
- [ ] 위 표에서 즉시 해결 불가능한 항목에 대해 별도 티켓 발행 완료
|
|
45
51
|
> CLI Command Example: `deuk-agent-rule ticket create --topic 048-F1-fix-issue --title "Fix the issue" --group <group>`
|
package/package.json
CHANGED
|
@@ -215,7 +215,9 @@ function deploySpokePointers(cwd, dryRun) {
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
export async function runInit(opts, bundleRoot) {
|
|
218
|
-
const
|
|
218
|
+
const savedConfig = loadInitConfig(opts.cwd) || {};
|
|
219
|
+
const ignoreDirs = savedConfig.ignoreDirs;
|
|
220
|
+
const submodules = discoverAllSubmodules(opts.cwd, ignoreDirs);
|
|
219
221
|
if (!submodules.includes(opts.cwd)) submodules.push(opts.cwd);
|
|
220
222
|
|
|
221
223
|
const markers = resolveMarkers(opts);
|
package/scripts/cli-utils.mjs
CHANGED
|
@@ -57,6 +57,7 @@ export function writeInitConfig(cwd, opts) {
|
|
|
57
57
|
shareTickets: !!opts.shareTickets,
|
|
58
58
|
remoteSync: !!opts.remoteSync,
|
|
59
59
|
pipelineUrl: opts.pipelineUrl,
|
|
60
|
+
ignoreDirs: opts.ignoreDirs || DEFAULT_IGNORE_DIRS,
|
|
60
61
|
updatedAt: new Date().toISOString(),
|
|
61
62
|
};
|
|
62
63
|
writeFileSync(p, JSON.stringify(data, null, 2), "utf8");
|
|
@@ -209,10 +210,12 @@ export async function checkUpdateNotifier() {
|
|
|
209
210
|
}
|
|
210
211
|
}
|
|
211
212
|
|
|
213
|
+
export const DEFAULT_IGNORE_DIRS = ["node_modules", ".git", ".deuk-agent", "tmp", "temp", ".tmp", ".cache"];
|
|
214
|
+
|
|
212
215
|
/**
|
|
213
216
|
* Recursively finds all directories containing deuk-agent ticket structures.
|
|
214
217
|
*/
|
|
215
|
-
export function discoverAllSubmodules(baseCwd, out = new Set()) {
|
|
218
|
+
export function discoverAllSubmodules(baseCwd, ignoreDirs = DEFAULT_IGNORE_DIRS, out = new Set()) {
|
|
216
219
|
if (!existsSync(baseCwd)) return Array.from(out);
|
|
217
220
|
|
|
218
221
|
const hasLegacy1 = existsSync(join(baseCwd, ".deuk-agent-ticket"));
|
|
@@ -227,9 +230,9 @@ export function discoverAllSubmodules(baseCwd, out = new Set()) {
|
|
|
227
230
|
const entries = readdirSync(baseCwd, { withFileTypes: true });
|
|
228
231
|
for (const ent of entries) {
|
|
229
232
|
if (!ent.isDirectory()) continue;
|
|
230
|
-
// Skip system or noisy directories
|
|
231
|
-
if (
|
|
232
|
-
discoverAllSubmodules(join(baseCwd, ent.name), out);
|
|
233
|
+
// Skip system or noisy directories based on ignoreDirs configuration
|
|
234
|
+
if (ignoreDirs.includes(ent.name) || ent.name.startsWith(".deuk-agent")) continue;
|
|
235
|
+
discoverAllSubmodules(join(baseCwd, ent.name), ignoreDirs, out);
|
|
233
236
|
}
|
|
234
237
|
} catch {
|
|
235
238
|
// Ignore permission errors on specific subfolders
|
package/scripts/merge-logic.mjs
CHANGED
|
@@ -41,11 +41,27 @@ export function resolveMarkers(o) {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* Strip all internal begin/end marker lines from content.
|
|
46
|
+
* Preserves only the content between markers without nesting.
|
|
47
|
+
*/
|
|
48
|
+
export function stripInternalMarkers(content, begin, end) {
|
|
49
|
+
return content
|
|
50
|
+
.split('\n')
|
|
51
|
+
.filter(line => {
|
|
52
|
+
const t = line.trim();
|
|
53
|
+
return t !== begin && t !== end;
|
|
54
|
+
})
|
|
55
|
+
.join('\n');
|
|
56
|
+
}
|
|
57
|
+
|
|
44
58
|
export function findMarkerRegion(content, begin, end) {
|
|
45
59
|
const i = content.indexOf(begin);
|
|
46
60
|
if (i === -1) return null;
|
|
47
|
-
|
|
48
|
-
|
|
61
|
+
// Use lastIndexOf to match the outermost end marker,
|
|
62
|
+
// preventing nested markers from causing partial replacement.
|
|
63
|
+
const j = content.lastIndexOf(end);
|
|
64
|
+
if (j === -1 || j <= i) {
|
|
49
65
|
throw new Error(
|
|
50
66
|
`[MARKER ERROR] Found begin marker "${begin}" but no matching end marker "${end}" after it.\n` +
|
|
51
67
|
` This usually happens if one marker was deleted or renamed manually. Please verify the target file.`
|
|
@@ -120,8 +136,10 @@ function handleAgentOverwrite(opts) {
|
|
|
120
136
|
}
|
|
121
137
|
|
|
122
138
|
function handleAgentInject(opts, existing, region) {
|
|
123
|
-
const { targetPath, bundleContent, dryRun, backup } = opts;
|
|
124
|
-
|
|
139
|
+
const { targetPath, bundleContent, markers, dryRun, backup } = opts;
|
|
140
|
+
// Strip any internal begin/end markers from bundle content to prevent nesting
|
|
141
|
+
const cleanContent = stripInternalMarkers(bundleContent, markers.begin, markers.end);
|
|
142
|
+
const inner = cleanContent.trimEnd() + "\n";
|
|
125
143
|
const next = existing.slice(0, region.innerStart) + "\n" + inner + existing.slice(region.innerEnd);
|
|
126
144
|
if (dryRun) {
|
|
127
145
|
return { action: "would-write", path: targetPath, mode: "inject-region" };
|