axmap-cli 0.0.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.
Files changed (78) hide show
  1. package/.claude/commands/ax-done.md +10 -0
  2. package/.claude/commands/ax-setup.md +31 -0
  3. package/.claude/commands/ax-start.md +15 -0
  4. package/.claude/commands/ax-tell.md +14 -0
  5. package/.claude/commands/ax-update.md +19 -0
  6. package/.claude/commands/ax.md +13 -0
  7. package/CLAUDE.md +309 -0
  8. package/LICENSE +20 -0
  9. package/README.md +207 -0
  10. package/app/README.md +366 -0
  11. package/app/eval/edges.mjs +242 -0
  12. package/app/lib/adjacent.mjs +125 -0
  13. package/app/lib/agentcli.mjs +153 -0
  14. package/app/lib/analyze.mjs +1159 -0
  15. package/app/lib/cochange.mjs +421 -0
  16. package/app/lib/datanodes.mjs +127 -0
  17. package/app/lib/entry.mjs +192 -0
  18. package/app/lib/featuregraph.mjs +389 -0
  19. package/app/lib/features.mjs +645 -0
  20. package/app/lib/fetchrepo-run.mjs +37 -0
  21. package/app/lib/fetchrepo.mjs +164 -0
  22. package/app/lib/flow.mjs +1089 -0
  23. package/app/lib/ladder.mjs +387 -0
  24. package/app/lib/langs.mjs +630 -0
  25. package/app/lib/live.mjs +346 -0
  26. package/app/lib/llm.mjs +594 -0
  27. package/app/lib/newfile.mjs +126 -0
  28. package/app/lib/prdiff.mjs +651 -0
  29. package/app/lib/reveal.mjs +316 -0
  30. package/app/lib/roots.mjs +186 -0
  31. package/app/lib/scope.mjs +342 -0
  32. package/app/lib/session.mjs +389 -0
  33. package/app/lib/slots.mjs +233 -0
  34. package/app/lib/ssot.mjs +277 -0
  35. package/app/lib/teamview.mjs +962 -0
  36. package/app/lib/terms.ko.mjs +169 -0
  37. package/app/server.mjs +1959 -0
  38. package/app/web/shell.css +538 -0
  39. package/app/web/shell.html +197 -0
  40. package/app/web/shell.js +638 -0
  41. package/app/web/stage.js +347 -0
  42. package/app/web/words.js +85 -0
  43. package/bin/axmap.mjs +1918 -0
  44. package/governance/GOVERNANCE.md +433 -0
  45. package/governance/gate.mjs +526 -0
  46. package/governance/vote.mjs +501 -0
  47. package/mcp/README.md +254 -0
  48. package/mcp/SETUP-FOR-AI.md +186 -0
  49. package/mcp/install.ps1 +341 -0
  50. package/mcp/install.sh +339 -0
  51. package/mcp/server.mjs +969 -0
  52. package/package.json +48 -0
  53. package/src/closure.mjs +343 -0
  54. package/src/governance.mjs +839 -0
  55. package/src/invariants.mjs +226 -0
  56. package/src/mrtarget.mjs +284 -0
  57. package/src/promote.mjs +177 -0
  58. package/src/protocol.mjs +423 -0
  59. package/src/repotarget.mjs +81 -0
  60. package/src/update.mjs +177 -0
  61. package/src/version.mjs +186 -0
  62. package/tools/bus.mjs +520 -0
  63. package/tools/cluster-experiment.mjs +256 -0
  64. package/tools/cluster-sweep.mjs +226 -0
  65. package/tools/make-icon.mjs +108 -0
  66. package/tools/mcp-register.mjs +269 -0
  67. package/tools/mr-target.mjs +49 -0
  68. package/tools/persona-bench.mjs +362 -0
  69. package/tools/pick-repo.mjs +229 -0
  70. package/tools/promote.mjs +550 -0
  71. package/tools/reveal-demo.mjs +158 -0
  72. package/tools/run-tests.mjs +42 -0
  73. package/tools/setup.mjs +490 -0
  74. package/tools/shortcut.mjs +121 -0
  75. package/tools/smoke.mjs +166 -0
  76. package/tools/topicgraph.py +154 -0
  77. package/tools/vendor.mjs +382 -0
  78. package/tools/version.mjs +115 -0
@@ -0,0 +1,169 @@
1
+ /**
2
+ * 한국어 도메인 용어 → 영어 후보.
3
+ *
4
+ * 왜 필요한가. 커밋 메시지가 한국어인 저장소에서는 한국어 질의가 **그대로 된다**
5
+ * (e101 은 커밋 217개 중 213개가 한국어다). 다리가 필요한 경우는 하나뿐이다 —
6
+ * **커밋이 영어인 저장소에 한국어로 물을 때.**
7
+ *
8
+ * 왜 LLM 이 아닌가. 세 가지다.
9
+ * 1. D1 의 두 번째 사용자가 "좋은 AI 를 쓸 수 없는 환경(폐쇄망)" 이다.
10
+ * 번역이 LLM 에만 있으면 그 사용자에게는 기능이 아예 없다.
11
+ * 2. 같은 질의가 같은 답을 줘야 한다. `axmap audit` 으로 재생 가능해야 한다.
12
+ * 3. 이건 판정이 아니라 **질의 확장**이다. 상류에서 후보를 넓히고
13
+ * 판정은 결정론적 매칭이 한다 — D4 가 정한 자리 그대로다.
14
+ *
15
+ * 🔴 이 사전은 완전하지 않고 완전해질 수도 없다.
16
+ * 그래서 화면에 **어떤 말을 어떤 말로 바꿨는지 반드시 보여준다.**
17
+ * 번역이 틀렸으면 사용자가 영어로 직접 치면 된다.
18
+ * 조용히 바꾸고 결과만 내놓는 것이 최악이다.
19
+ *
20
+ * 값은 배열이고 OR 로 쓰인다. 한 단어가 여러 영어에 걸치는 것이 정상이다 —
21
+ * "사진" 은 코드에서 photo 일 수도 image 일 수도 asset 일 수도 있다.
22
+ */
23
+
24
+ export const KO_TERMS = {
25
+ // ── 동작 ────────────────────────────────────────────────────────────────
26
+ 업로드: ['upload'],
27
+ 다운로드: ['download'],
28
+ 삭제: ['delete', 'remove', 'destroy'],
29
+ 제거: ['remove', 'delete'],
30
+ 생성: ['create', 'add', 'new'],
31
+ 추가: ['add', 'create'],
32
+ 수정: ['update', 'edit', 'modify'],
33
+ 편집: ['edit', 'update'],
34
+ 조회: ['get', 'fetch', 'read', 'query'],
35
+ 검색: ['search', 'query', 'find'],
36
+ 정렬: ['sort', 'order'],
37
+ 필터: ['filter'],
38
+ 복원: ['restore', 'recover'],
39
+ 공유: ['share', 'shared'],
40
+ 전송: ['send', 'transfer', 'upload'],
41
+ 동기화: ['sync', 'synchronize'],
42
+ 백업: ['backup'],
43
+ 복사: ['copy', 'duplicate'],
44
+ 이동: ['move'],
45
+ 변환: ['convert', 'transform', 'transcode'],
46
+ 압축: ['compress', 'zip', 'archive'],
47
+ 재생: ['play', 'playback', 'stream'],
48
+ 미리보기: ['preview', 'thumbnail'],
49
+ 썸네일: ['thumbnail', 'thumb'],
50
+ 가져오기: ['import'],
51
+ 내보내기: ['export'],
52
+
53
+ // ── 대상 ────────────────────────────────────────────────────────────────
54
+ 사진: ['photo', 'image', 'asset', 'picture'],
55
+ 이미지: ['image', 'photo', 'asset'],
56
+ 영상: ['video', 'media', 'stream'],
57
+ 동영상: ['video', 'media'],
58
+ 미디어: ['media'],
59
+ 파일: ['file', 'asset'],
60
+ 앨범: ['album'],
61
+ 폴더: ['folder', 'directory'],
62
+ 자산: ['asset'],
63
+ 사용자: ['user', 'account'],
64
+ 계정: ['account', 'user'],
65
+ 회원: ['user', 'member', 'account'],
66
+ 관리자: ['admin', 'administrator'],
67
+ 권한: ['permission', 'access', 'role', 'auth'],
68
+ 역할: ['role'],
69
+ 태그: ['tag', 'label'],
70
+ 댓글: ['comment', 'activity'],
71
+ 좋아요: ['like', 'reaction', 'activity'],
72
+ 알림: ['notification', 'notify'],
73
+ 설정: ['setting', 'config', 'preference'],
74
+ 환경설정: ['config', 'setting', 'preference'],
75
+ 로그: ['log', 'logging'],
76
+ 작업: ['job', 'task', 'work'],
77
+ 큐: ['queue', 'job'],
78
+ 일정: ['schedule', 'cron'],
79
+ 휴지통: ['trash', 'bin', 'recycle'],
80
+ 즐겨찾기: ['favorite', 'bookmark'],
81
+ 타임라인: ['timeline'],
82
+ 지도: ['map', 'location', 'geo'],
83
+ 위치: ['location', 'geo', 'position'],
84
+ 얼굴: ['face', 'person'],
85
+ 인물: ['person', 'people', 'face'],
86
+ 중복: ['duplicate', 'dedupe'],
87
+ 묶음: ['stack', 'group', 'bundle'],
88
+ 메타데이터: ['metadata', 'exif'],
89
+
90
+ // ── 인증 ────────────────────────────────────────────────────────────────
91
+ 로그인: ['login', 'signin', 'auth'],
92
+ 로그아웃: ['logout', 'signout'],
93
+ 인증: ['auth', 'authentication', 'login'],
94
+ 인가: ['authorization', 'permission', 'access'],
95
+ 비밀번호: ['password', 'passwd'],
96
+ 토큰: ['token', 'jwt'],
97
+ 세션: ['session'],
98
+ 회원가입: ['signup', 'register', 'registration'],
99
+ 가입: ['signup', 'register'],
100
+
101
+ // ── 시스템 ──────────────────────────────────────────────────────────────
102
+ 서버: ['server'],
103
+ 클라이언트: ['client'],
104
+ 데이터베이스: ['database', 'db', 'schema'],
105
+ 스키마: ['schema', 'migration'],
106
+ 마이그레이션: ['migration', 'migrate'],
107
+ 캐시: ['cache'],
108
+ 저장소: ['repository', 'storage'],
109
+ 미들웨어: ['middleware', 'interceptor'],
110
+ 에러: ['error', 'exception', 'fail'],
111
+ 오류: ['error', 'exception', 'bug', 'fix'],
112
+ 예외: ['exception', 'error'],
113
+ 버그: ['bug', 'fix'],
114
+ 테스트: ['test', 'spec'],
115
+ 배포: ['deploy', 'release'],
116
+ 빌드: ['build'],
117
+ 성능: ['performance', 'perf', 'optimize'],
118
+ 최적화: ['optimize', 'performance', 'perf'],
119
+ 보안: ['security', 'secure'],
120
+
121
+ // ── 그 밖 ───────────────────────────────────────────────────────────────
122
+ 결제: ['payment', 'pay', 'billing'],
123
+ 주문: ['order'],
124
+ 장바구니: ['cart', 'basket'],
125
+ 리뷰: ['review'],
126
+ 채팅: ['chat', 'message'],
127
+ 메시지: ['message', 'chat'],
128
+ 통계: ['statistic', 'stats', 'analytics'],
129
+ 추천: ['recommend', 'suggestion'],
130
+ 구독: ['subscribe', 'subscription'],
131
+ 결합: ['coupling'],
132
+ 주행: ['drive', 'driving', 'navigation'],
133
+ 경로: ['path', 'route'],
134
+ 센서: ['sensor'],
135
+ 카메라: ['camera'],
136
+ }
137
+
138
+ const HANGUL = /[가-힣]/
139
+
140
+ /** 이 토큰이 한국어를 담고 있나. */
141
+ export const isKorean = (s) => HANGUL.test(s)
142
+
143
+ /**
144
+ * 한 토큰을 검색어 후보 집합으로 넓힌다.
145
+ *
146
+ * 원어를 **항상 함께 남긴다.** 커밋이 한국어인 저장소에서는 원어가 정답이고,
147
+ * 사전에 없는 말이어도 그대로 걸려야 하기 때문이다.
148
+ *
149
+ * @returns {{token:string, terms:string[], translated:boolean}}
150
+ */
151
+ export function expandTerm(token) {
152
+ const t = token.trim()
153
+ if (!t) return { token: t, terms: [], translated: false }
154
+ if (!isKorean(t)) return { token: t, terms: [t], translated: false }
155
+
156
+ const hit = KO_TERMS[t]
157
+ if (hit) return { token: t, terms: [t, ...hit], translated: true }
158
+
159
+ // 조사·어미가 붙었을 수 있다. "업로드를", "사진의" 처럼.
160
+ // 사전 키가 접두사로 들어맞으면 그것으로 본다 — 형태소 분석기를 넣지 않는
161
+ // 이유는 의존성 0 이고, 이 정도로 실용적인 범위가 대부분 덮이기 때문이다.
162
+ for (const k of Object.keys(KO_TERMS)) {
163
+ if (t.length > k.length && t.startsWith(k)) {
164
+ return { token: t, terms: [t, k, ...KO_TERMS[k]], translated: true }
165
+ }
166
+ }
167
+ // 사전에 없다. 원어 그대로 쓴다 — 한국어 커밋 저장소에서는 이게 맞다.
168
+ return { token: t, terms: [t], translated: false }
169
+ }