@kybird/llm-wiki 0.2.0 → 0.2.2
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 +1 -0
- package/lib/init.js +10 -0
- package/lib/wiki-compile.js +8 -1
- package/package.json +1 -1
- package/templates/AGENTS.md +24 -0
package/README.md
CHANGED
|
@@ -73,6 +73,7 @@ your-repo/
|
|
|
73
73
|
│ ├── cards/ # active: todo / doing / review (frontmatter status)
|
|
74
74
|
│ ├── done/ superseded/ abandoned/ # termination = the folder
|
|
75
75
|
│ └── activity.jsonl # append-only audit log (10k line cap)
|
|
76
|
+
├── AGENTS.md # seeded once if absent — "which skill when" for every session
|
|
76
77
|
├── .agents/skills/ # canonical skills (ZCode, Cursor, …)
|
|
77
78
|
├── .claude/skills/ # mirror for Claude Code
|
|
78
79
|
├── scripts/ # doc/skill sync scripts (marker-protected copies)
|
package/lib/init.js
CHANGED
|
@@ -179,6 +179,16 @@ function init(options = {}) {
|
|
|
179
179
|
console.log('✓ Created doc/kanban/ (board.yml, cards/, done/, superseded/, abandoned/, activity.jsonl)');
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
// 1c. AGENTS.md 시드 — 매 세션이 무조건 읽는 파일에 "언제 어떤 스킬"을 심는다.
|
|
183
|
+
// 존재하면 절대 건드리지 않는다: 갱신은 레포의 몫 (plan.md 6.4 — 각 레포가 직접 쓴다).
|
|
184
|
+
const agentsPath = path.join(cwd, 'AGENTS.md');
|
|
185
|
+
if (!exists(agentsPath)) {
|
|
186
|
+
fs.copyFileSync(path.join(PKG_ROOT, 'templates', 'AGENTS.md'), agentsPath);
|
|
187
|
+
console.log('✓ Created AGENTS.md (seed — 이 레포의 것으로 자유롭게 편집)');
|
|
188
|
+
} else {
|
|
189
|
+
console.log('✓ AGENTS.md already exists, untouched.');
|
|
190
|
+
}
|
|
191
|
+
|
|
182
192
|
// 2. skills/ (정본 → 복사본). 마커 규칙: skill-version이 살아있는 복사본만 갱신하고,
|
|
183
193
|
// 마커를 지운 파일(사용자 수정)은 건너뛴다 — syncSkills 주석 참고.
|
|
184
194
|
const skillsSrc = path.join(PKG_ROOT, 'skills');
|
package/lib/wiki-compile.js
CHANGED
|
@@ -42,6 +42,13 @@ function loadCompileState(wikiRoot) {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
// "오늘"은 현지 날짜로 — raw 로그 헤더(# YYYY-MM-DD)가 현지 날짜로 쓰이므로
|
|
46
|
+
// UTC 기준과 섞으면 KST 자정~9시 사이에 전부 "new"로 재보고된다(2026-08-30 실측).
|
|
47
|
+
function localToday(date = new Date()) {
|
|
48
|
+
const pad = n => String(n).padStart(2, '0');
|
|
49
|
+
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
|
|
50
|
+
}
|
|
51
|
+
|
|
45
52
|
// 상태 재생성 — compile index 말미에서만 호출된다 (컴파일 완료 선언의 기록).
|
|
46
53
|
function writeCompileState(wikiRoot, rawRoot, lastCompiled, previous) {
|
|
47
54
|
const files = {};
|
|
@@ -189,7 +196,7 @@ function rebuildIndex() {
|
|
|
189
196
|
// 컴파일 상태 — 여기가 유일한 쓰기점. lastCompiled 단조 가드(max)로 시계 오차
|
|
190
197
|
// 머신이 날짜를 미래로 점프시키지 않게 하고, index.md의 Last updated와 같은 값을 쓴다.
|
|
191
198
|
const previous = loadCompileState(wikiRoot);
|
|
192
|
-
const today =
|
|
199
|
+
const today = localToday();
|
|
193
200
|
const lastCompiled = previous && previous.lastCompiled > today ? previous.lastCompiled : today;
|
|
194
201
|
indexContent += `- Last updated: ${lastCompiled}\n`;
|
|
195
202
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kybird/llm-wiki",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "LLM-friendly knowledge graph + kanban for AI coding agents. Raw daily logs → compiled wiki → merged semantic+grep search, and a card-per-file kanban the work-loop skill consumes unattended. Drop-in for any repo.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "kybird",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
<!-- Seeded by `llm-wiki init`. This file is YOURS — edit freely; init never overwrites it. -->
|
|
4
|
+
|
|
5
|
+
This repo uses **llm-wiki**: `doc/` is the knowledge base, `doc/kanban/` is the work board.
|
|
6
|
+
Files are the source of truth. Kanban card files are written ONLY via the CLI — people read them.
|
|
7
|
+
|
|
8
|
+
## Skill usage — when to use what
|
|
9
|
+
|
|
10
|
+
| Moment | Skill / command |
|
|
11
|
+
|---|---|
|
|
12
|
+
| Before starting any task | `llm-wiki search "<keywords>"` — paste the verbatim error string when debugging |
|
|
13
|
+
| After fixing a bug / making a decision / discovering something | `wiki-log` skill → a Case in `doc/raw/YYYY-MM-DD.md` with verbatim error + `hash:` grounding |
|
|
14
|
+
| When raw logs have accumulated | `wiki-compile` skill → promote to `doc/wiki/` pages, then `llm-wiki compile index` |
|
|
15
|
+
| Sanity check of the knowledge base | `wiki-lint` skill or `llm-wiki lint` |
|
|
16
|
+
| Planning work (person present) | `kanban-plan` skill → cards via `llm-wiki card new "<title>"` |
|
|
17
|
+
| Unattended execution | `work-loop` skill → `llm-wiki pick --claim <name>`, park judgment calls with `handoff` |
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- Quote error messages **character-for-character** in logs and wiki pages — `llm-wiki lint`
|
|
22
|
+
back-checks every quote and `hash:` against `doc/raw/`.
|
|
23
|
+
- Follow `status: deprecated` → `superseded_by` when reading wiki pages.
|
|
24
|
+
- Expand this file with this repo's own conventions. Keep it short — it loads every session.
|