adtec-core-package 3.1.9 → 3.2.0
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/.idea/codeStyles/Project.xml +61 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.idea//345/211/215/347/253/257/346/240/270/345/277/203/345/214/205.iml +8 -0
- package/package.json +1 -1
- package/src/assets/style/index.less +30 -42
- package/src/assets/style/scrollbar-classic.less +105 -0
- package/src/assets/style/scrollbar-classic.scss +105 -0
- package/src/components/ElCardList.vue +7 -1
- package/src/components/Scrollbars/ElScrollbars.vue +10 -2
- package/src/components/editor-main/src/assets/styles/_variables.less +1 -1
- package/src/components/upload/DocxJsViewer.vue +2 -16
- package/src/components/upload/OfficePreview.vue +8 -0
- package/src/config/VxeTableConfig.ts +2 -2
- package/src/css/elementUI/common/var.scss +4 -4
- package/src/css/elementUI/mixins/mixins.scss +4 -28
- package/src/css/elementUI/scrollbar.scss +20 -5
- package/src/css/vxeTableUI/components/table.scss +22 -29
- package/src/utils/excelPreviewUtil.ts +5 -5
- package/src/utils/officePreviewUtil.ts +5 -16
- package/.claude/skills/gitnexus/gitnexus-cli/SKILL.md +0 -83
- package/.claude/skills/gitnexus/gitnexus-debugging/SKILL.md +0 -89
- package/.claude/skills/gitnexus/gitnexus-exploring/SKILL.md +0 -78
- package/.claude/skills/gitnexus/gitnexus-guide/SKILL.md +0 -64
- package/.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md +0 -97
- package/.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md +0 -121
- package/.editorconfig +0 -6
- package/.prettierrc.json +0 -7
- package/.vscode/extensions.json +0 -8
- package/AGENTS.md +0 -43
- package/CLAUDE.md +0 -43
- package/adtec-core-package/adtec-core-package.css +0 -1
- package/adtec-core-package/adtec-core-package.js +0 -41216
- package/adtec-core-package/adtec-core-package.umd.cjs +0 -87
- package/adtec-core-package/favicon.ico +0 -0
- package/adtec-core-package-3.1.7.tgz +0 -0
- package/auto-imports.d.ts +0 -299
- package/env.d.ts +0 -1
- package/eslint.config.js +0 -56
- package/index.html +0 -13
- package/package/.editorconfig +0 -6
- package/package/adtec-core-package/adtec-core-package.css +0 -1
- package/package/adtec-core-package/adtec-core-package.js +0 -41216
- package/package/adtec-core-package/adtec-core-package.umd.cjs +0 -87
- package/package/adtec-core-package/favicon.ico +0 -0
- package/package/index.html +0 -13
- package/package/prebuilt/umo-editor/favicon.ico +0 -0
- package/package/prebuilt/umo-editor/umo-editor.css +0 -1
- package/package/public/favicon.ico +0 -0
- package/package/src/assets/base.css +0 -86
- package/package/src/assets/main.css +0 -35
- package/package/src/components/editor-main/src/extensions/bookmark.js +0 -110
- package/prebuilt/umo-editor/umo-editor.js.map +0 -1
- package/tsconfig.app.json +0 -12
- package/tsconfig.json +0 -11
- package/tsconfig.node.json +0 -18
- package/vite.config.ts +0 -46
- package/vite.config.umo.ts +0 -81
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use 'mixins/mixins' as *;
|
|
4
4
|
@use 'mixins/var' as *;
|
|
5
5
|
@use 'common/var' as *;
|
|
6
|
+
@use '../../assets/style/scrollbar-classic.scss' as classic;
|
|
6
7
|
|
|
7
8
|
@include b(scrollbar) {
|
|
8
9
|
@include set-component-css-var('scrollbar', $scrollbar);
|
|
@@ -16,6 +17,9 @@
|
|
|
16
17
|
@include e(wrap) {
|
|
17
18
|
overflow: auto;
|
|
18
19
|
height: 100%;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
/* 预留滚动条槽位,避免 thumb 压在正文上 */
|
|
22
|
+
padding-right: calc(var(--el-scrollbar-size, 8px) + 4px);
|
|
19
23
|
|
|
20
24
|
@include m(hidden-default) {
|
|
21
25
|
scrollbar-width: none;
|
|
@@ -31,7 +35,7 @@
|
|
|
31
35
|
width: 0;
|
|
32
36
|
height: 0;
|
|
33
37
|
cursor: pointer;
|
|
34
|
-
border-radius:
|
|
38
|
+
border-radius: calc(var(--el-scrollbar-size, 8px) / 2);
|
|
35
39
|
background-color: var(
|
|
36
40
|
#{getCssVarName('scrollbar-bg-color')},
|
|
37
41
|
map.get($scrollbar, 'bg-color')
|
|
@@ -56,14 +60,17 @@
|
|
|
56
60
|
|
|
57
61
|
@include e(bar) {
|
|
58
62
|
position: absolute;
|
|
59
|
-
right:
|
|
63
|
+
right: 4px;
|
|
60
64
|
bottom: 2px;
|
|
61
65
|
z-index: 1;
|
|
62
|
-
border-radius:
|
|
66
|
+
border-radius: calc(var(--el-scrollbar-size, 8px) / 2);
|
|
67
|
+
opacity: 0;
|
|
68
|
+
transition: opacity getCssVar('transition-duration') ease-out;
|
|
63
69
|
|
|
64
70
|
@include when(vertical) {
|
|
65
|
-
width:
|
|
71
|
+
width: var(--el-scrollbar-size, 8px);
|
|
66
72
|
top: 2px;
|
|
73
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
67
74
|
|
|
68
75
|
> div {
|
|
69
76
|
width: 100%;
|
|
@@ -71,14 +78,22 @@
|
|
|
71
78
|
}
|
|
72
79
|
|
|
73
80
|
@include when(horizontal) {
|
|
74
|
-
height:
|
|
81
|
+
height: var(--el-scrollbar-size, 8px);
|
|
75
82
|
left: 2px;
|
|
83
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
76
84
|
|
|
77
85
|
> div {
|
|
78
86
|
height: 100%;
|
|
79
87
|
}
|
|
80
88
|
}
|
|
81
89
|
}
|
|
90
|
+
|
|
91
|
+
&:hover,
|
|
92
|
+
&:active {
|
|
93
|
+
@include e(bar) {
|
|
94
|
+
opacity: 1;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
82
97
|
}
|
|
83
98
|
|
|
84
99
|
.#{$namespace}-scrollbar-fade {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use '../helpers/baseMixin.scss';
|
|
2
|
+
@use '../../../assets/style/scrollbar-classic.scss' as classic;
|
|
2
3
|
@use './icon.scss';
|
|
3
4
|
@use './table-module/all.scss';
|
|
4
5
|
|
|
@@ -79,34 +80,16 @@
|
|
|
79
80
|
overflow-x: scroll;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
/*
|
|
83
|
+
/* vxe 表格:hover 时显示现代圆角滚动条 */
|
|
83
84
|
.vxe-table--scroll-x-handle,
|
|
84
85
|
.vxe-table--scroll-y-handle {
|
|
85
|
-
scrollbar-
|
|
86
|
-
-ms-overflow-style: none;
|
|
87
|
-
&::-webkit-scrollbar {
|
|
88
|
-
width: 8px;
|
|
89
|
-
height: 8px;
|
|
90
|
-
background: transparent;
|
|
91
|
-
}
|
|
92
|
-
&::-webkit-scrollbar-thumb {
|
|
93
|
-
background: transparent;
|
|
94
|
-
border-radius: 4px;
|
|
95
|
-
}
|
|
96
|
-
&::-webkit-scrollbar-track {
|
|
97
|
-
background: transparent;
|
|
98
|
-
}
|
|
86
|
+
@include classic.adtec-scrollbar-hidden;
|
|
99
87
|
}
|
|
100
88
|
|
|
101
89
|
.vxe-table:hover {
|
|
102
90
|
.vxe-table--scroll-x-handle,
|
|
103
91
|
.vxe-table--scroll-y-handle {
|
|
104
|
-
scrollbar-
|
|
105
|
-
scrollbar-color: #DDDEE0 transparent;
|
|
106
|
-
}
|
|
107
|
-
.vxe-table--scroll-x-handle::-webkit-scrollbar-thumb,
|
|
108
|
-
.vxe-table--scroll-y-handle::-webkit-scrollbar-thumb {
|
|
109
|
-
background: #DDDEE0;
|
|
92
|
+
@include classic.adtec-vxe-scrollbar-active;
|
|
110
93
|
}
|
|
111
94
|
}
|
|
112
95
|
|
|
@@ -604,10 +587,10 @@
|
|
|
604
587
|
}
|
|
605
588
|
}
|
|
606
589
|
.vxe-table--scroll-x-virtual {
|
|
607
|
-
height: 0
|
|
590
|
+
height: 0;
|
|
608
591
|
}
|
|
609
592
|
.vxe-table--scroll-y-virtual {
|
|
610
|
-
width:
|
|
593
|
+
width: 0;
|
|
611
594
|
}
|
|
612
595
|
.vxe-table--scroll-x-virtual,
|
|
613
596
|
.vxe-table--scroll-y-virtual {
|
|
@@ -635,10 +618,10 @@
|
|
|
635
618
|
.vxe-table--scroll-x-handle {
|
|
636
619
|
overflow-y: hidden;
|
|
637
620
|
overflow-x: scroll;
|
|
638
|
-
height: 8px;
|
|
621
|
+
height: var(--vxe-scrollbar-size, 8px);
|
|
639
622
|
}
|
|
640
623
|
.vxe-table--scroll-x-wrapper {
|
|
641
|
-
height:
|
|
624
|
+
height: 100%;
|
|
642
625
|
}
|
|
643
626
|
.vxe-table--scroll-y-handle,
|
|
644
627
|
.vxe-table--scroll-y-wrapper {
|
|
@@ -650,7 +633,7 @@
|
|
|
650
633
|
.vxe-table--scroll-y-handle {
|
|
651
634
|
overflow-y: scroll;
|
|
652
635
|
overflow-x: hidden;
|
|
653
|
-
width: 8px;
|
|
636
|
+
width: var(--vxe-scrollbar-size, 8px);
|
|
654
637
|
height: 100%;
|
|
655
638
|
}
|
|
656
639
|
.vxe-table--scroll-x-space {
|
|
@@ -925,10 +908,20 @@
|
|
|
925
908
|
border-collapse: separate;
|
|
926
909
|
table-layout: fixed;
|
|
927
910
|
}
|
|
928
|
-
.vxe-table--render-wrapper{
|
|
929
|
-
height:100%;
|
|
911
|
+
.vxe-table--render-wrapper {
|
|
912
|
+
height: 100%;
|
|
913
|
+
display: flex;
|
|
914
|
+
flex-direction: column;
|
|
915
|
+
overflow: hidden;
|
|
916
|
+
|
|
930
917
|
.vxe-table--layout-wrapper {
|
|
931
|
-
|
|
918
|
+
flex: 1;
|
|
919
|
+
min-height: 0;
|
|
920
|
+
height: auto;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
.vxe-table--scroll-x-virtual {
|
|
924
|
+
flex-shrink: 0;
|
|
932
925
|
}
|
|
933
926
|
}
|
|
934
927
|
&:not(.is--empty) {
|
|
@@ -51,6 +51,9 @@ type WorkbookStyles = {
|
|
|
51
51
|
CellXf?: Array<Record<string, unknown>>
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/** xlsx-js-style 运行时附带 Styles,官方 WorkBook 类型未声明 */
|
|
55
|
+
type StyledWorkBook = XLSX.WorkBook & { Styles?: WorkbookStyles }
|
|
56
|
+
|
|
54
57
|
/** Excel 默认主题色(Office 2013+,含 accent / hyperlink) */
|
|
55
58
|
const EXCEL_THEME_COLORS: Record<number, string> = {
|
|
56
59
|
0: '#FFFFFF',
|
|
@@ -392,8 +395,8 @@ export const parseExcelWorkbook = async (src: Blob | ArrayBuffer): Promise<Excel
|
|
|
392
395
|
cellDates: true,
|
|
393
396
|
cellStyles: true,
|
|
394
397
|
...(isOleXls(buffer) ? {} : {}),
|
|
395
|
-
})
|
|
396
|
-
const styles = workbook.Styles
|
|
398
|
+
}) as StyledWorkBook
|
|
399
|
+
const styles = workbook.Styles
|
|
397
400
|
const styleIndexMaps = isZipXlsx(buffer)
|
|
398
401
|
? parseXlsxStyleIndexMaps(buffer, workbook.SheetNames.length)
|
|
399
402
|
: []
|
|
@@ -476,6 +479,3 @@ export const searchExcelSheets = (
|
|
|
476
479
|
})
|
|
477
480
|
return matches
|
|
478
481
|
}
|
|
479
|
-
|
|
480
|
-
export const cellKey = (sheetIndex: number, row: number, col: number) =>
|
|
481
|
-
`${sheetIndex}:${row}:${col}`
|
|
@@ -121,19 +121,8 @@ export const isLegacyDocFile = (type?: string, name?: string, fileUrl?: string)
|
|
|
121
121
|
export const isHeaderPreviewFile = (type?: string, name?: string, fileUrl?: string) =>
|
|
122
122
|
HEADER_PREVIEW_TYPES.has(toOfficePreviewType(type, name, fileUrl))
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
/** pdf.js 加载参数:CJK 预览需 cMap;缺嵌入字体时尝试系统字体 */
|
|
130
|
-
export const buildPdfJsLoadOptions = (data: ArrayBuffer) => {
|
|
131
|
-
const assetBase = pdfAssetBase()
|
|
132
|
-
return {
|
|
133
|
-
data,
|
|
134
|
-
useSystemFonts: true,
|
|
135
|
-
cMapUrl: `${assetBase}pdfjs/cmaps/`,
|
|
136
|
-
cMapPacked: true,
|
|
137
|
-
standardFontDataUrl: `${assetBase}pdfjs/standard_fonts/`,
|
|
138
|
-
}
|
|
139
|
-
}
|
|
124
|
+
/** pdf.js 加载参数:依赖 PDF 内嵌字体与浏览器系统字体 */
|
|
125
|
+
export const buildPdfJsLoadOptions = (data: ArrayBuffer) => ({
|
|
126
|
+
data,
|
|
127
|
+
useSystemFonts: true,
|
|
128
|
+
})
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gitnexus-cli
|
|
3
|
-
description: "Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki, or list indexed repos. Examples: \"Index this repo\", \"Reanalyze the codebase\", \"Generate a wiki\""
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# GitNexus CLI Commands
|
|
7
|
-
|
|
8
|
-
All commands work via `npx` — no global install required.
|
|
9
|
-
|
|
10
|
-
## Commands
|
|
11
|
-
|
|
12
|
-
### analyze — Build or refresh the index
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npx gitnexus analyze
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Run from the project root. This parses all source files, builds the knowledge graph, writes it to `.gitnexus/`, and generates CLAUDE.md / AGENTS.md context files.
|
|
19
|
-
|
|
20
|
-
| Flag | Effect |
|
|
21
|
-
| -------------- | ---------------------------------------------------------------- |
|
|
22
|
-
| `--force` | Force full re-index even if up to date |
|
|
23
|
-
| `--embeddings` | Enable embedding generation for semantic search (off by default) |
|
|
24
|
-
| `--drop-embeddings` | Drop existing embeddings on rebuild. By default, an `analyze` without `--embeddings` preserves them. |
|
|
25
|
-
|
|
26
|
-
**When to run:** First time in a project, after major code changes, or when `gitnexus://repo/{name}/context` reports the index is stale. In Claude Code, a PostToolUse hook detects staleness after `git commit` and `git merge` and notifies the agent to run `analyze` — the hook does not run analyze itself, to avoid blocking the agent for up to 120s and risking KuzuDB corruption on timeout.
|
|
27
|
-
|
|
28
|
-
### status — Check index freshness
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npx gitnexus status
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Shows whether the current repo has a GitNexus index, when it was last updated, and symbol/relationship counts. Use this to check if re-indexing is needed.
|
|
35
|
-
|
|
36
|
-
### clean — Delete the index
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npx gitnexus clean
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Deletes the `.gitnexus/` directory and unregisters the repo from the global registry. Use before re-indexing if the index is corrupt or after removing GitNexus from a project.
|
|
43
|
-
|
|
44
|
-
| Flag | Effect |
|
|
45
|
-
| --------- | ------------------------------------------------- |
|
|
46
|
-
| `--force` | Skip confirmation prompt |
|
|
47
|
-
| `--all` | Clean all indexed repos, not just the current one |
|
|
48
|
-
|
|
49
|
-
### wiki — Generate documentation from the graph
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
npx gitnexus wiki
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Generates repository documentation from the knowledge graph using an LLM. Requires an API key (saved to `~/.gitnexus/config.json` on first use).
|
|
56
|
-
|
|
57
|
-
| Flag | Effect |
|
|
58
|
-
| ------------------- | ----------------------------------------- |
|
|
59
|
-
| `--force` | Force full regeneration |
|
|
60
|
-
| `--model <model>` | LLM model (default: minimax/minimax-m2.5) |
|
|
61
|
-
| `--base-url <url>` | LLM API base URL |
|
|
62
|
-
| `--api-key <key>` | LLM API key |
|
|
63
|
-
| `--concurrency <n>` | Parallel LLM calls (default: 3) |
|
|
64
|
-
| `--gist` | Publish wiki as a public GitHub Gist |
|
|
65
|
-
|
|
66
|
-
### list — Show all indexed repos
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
npx gitnexus list
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Lists all repositories registered in `~/.gitnexus/registry.json`. The MCP `list_repos` tool provides the same information.
|
|
73
|
-
|
|
74
|
-
## After Indexing
|
|
75
|
-
|
|
76
|
-
1. **Read `gitnexus://repo/{name}/context`** to verify the index loaded
|
|
77
|
-
2. Use the other GitNexus skills (`exploring`, `debugging`, `impact-analysis`, `refactoring`) for your task
|
|
78
|
-
|
|
79
|
-
## Troubleshooting
|
|
80
|
-
|
|
81
|
-
- **"Not inside a git repository"**: Run from a directory inside a git repo
|
|
82
|
-
- **Index is stale after re-analyzing**: Restart Claude Code to reload the MCP server
|
|
83
|
-
- **Embeddings slow**: Omit `--embeddings` (it's off by default) or set `OPENAI_API_KEY` for faster API-based embedding
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gitnexus-debugging
|
|
3
|
-
description: "Use when the user is debugging a bug, tracing an error, or asking why something fails. Examples: \"Why is X failing?\", \"Where does this error come from?\", \"Trace this bug\""
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Debugging with GitNexus
|
|
7
|
-
|
|
8
|
-
## When to Use
|
|
9
|
-
|
|
10
|
-
- "Why is this function failing?"
|
|
11
|
-
- "Trace where this error comes from"
|
|
12
|
-
- "Who calls this method?"
|
|
13
|
-
- "This endpoint returns 500"
|
|
14
|
-
- Investigating bugs, errors, or unexpected behavior
|
|
15
|
-
|
|
16
|
-
## Workflow
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
1. gitnexus_query({query: "<error or symptom>"}) → Find related execution flows
|
|
20
|
-
2. gitnexus_context({name: "<suspect>"}) → See callers/callees/processes
|
|
21
|
-
3. READ gitnexus://repo/{name}/process/{name} → Trace execution flow
|
|
22
|
-
4. gitnexus_cypher({query: "MATCH path..."}) → Custom traces if needed
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
> If "Index is stale" → run `npx gitnexus analyze` in terminal.
|
|
26
|
-
|
|
27
|
-
## Checklist
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
- [ ] Understand the symptom (error message, unexpected behavior)
|
|
31
|
-
- [ ] gitnexus_query for error text or related code
|
|
32
|
-
- [ ] Identify the suspect function from returned processes
|
|
33
|
-
- [ ] gitnexus_context to see callers and callees
|
|
34
|
-
- [ ] Trace execution flow via process resource if applicable
|
|
35
|
-
- [ ] gitnexus_cypher for custom call chain traces if needed
|
|
36
|
-
- [ ] Read source files to confirm root cause
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Debugging Patterns
|
|
40
|
-
|
|
41
|
-
| Symptom | GitNexus Approach |
|
|
42
|
-
| -------------------- | ---------------------------------------------------------- |
|
|
43
|
-
| Error message | `gitnexus_query` for error text → `context` on throw sites |
|
|
44
|
-
| Wrong return value | `context` on the function → trace callees for data flow |
|
|
45
|
-
| Intermittent failure | `context` → look for external calls, async deps |
|
|
46
|
-
| Performance issue | `context` → find symbols with many callers (hot paths) |
|
|
47
|
-
| Recent regression | `detect_changes` to see what your changes affect |
|
|
48
|
-
|
|
49
|
-
## Tools
|
|
50
|
-
|
|
51
|
-
**gitnexus_query** — find code related to error:
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
gitnexus_query({query: "payment validation error"})
|
|
55
|
-
→ Processes: CheckoutFlow, ErrorHandling
|
|
56
|
-
→ Symbols: validatePayment, handlePaymentError, PaymentException
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
**gitnexus_context** — full context for a suspect:
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
gitnexus_context({name: "validatePayment"})
|
|
63
|
-
→ Incoming calls: processCheckout, webhookHandler
|
|
64
|
-
→ Outgoing calls: verifyCard, fetchRates (external API!)
|
|
65
|
-
→ Processes: CheckoutFlow (step 3/7)
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
**gitnexus_cypher** — custom call chain traces:
|
|
69
|
-
|
|
70
|
-
```cypher
|
|
71
|
-
MATCH path = (a)-[:CodeRelation {type: 'CALLS'}*1..2]->(b:Function {name: "validatePayment"})
|
|
72
|
-
RETURN [n IN nodes(path) | n.name] AS chain
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Example: "Payment endpoint returns 500 intermittently"
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
1. gitnexus_query({query: "payment error handling"})
|
|
79
|
-
→ Processes: CheckoutFlow, ErrorHandling
|
|
80
|
-
→ Symbols: validatePayment, handlePaymentError
|
|
81
|
-
|
|
82
|
-
2. gitnexus_context({name: "validatePayment"})
|
|
83
|
-
→ Outgoing calls: verifyCard, fetchRates (external API!)
|
|
84
|
-
|
|
85
|
-
3. READ gitnexus://repo/my-app/process/CheckoutFlow
|
|
86
|
-
→ Step 3: validatePayment → calls fetchRates (external)
|
|
87
|
-
|
|
88
|
-
4. Root cause: fetchRates calls external API without proper timeout
|
|
89
|
-
```
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gitnexus-exploring
|
|
3
|
-
description: "Use when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of the codebase. Examples: \"How does X work?\", \"What calls this function?\", \"Show me the auth flow\""
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Exploring Codebases with GitNexus
|
|
7
|
-
|
|
8
|
-
## When to Use
|
|
9
|
-
|
|
10
|
-
- "How does authentication work?"
|
|
11
|
-
- "What's the project structure?"
|
|
12
|
-
- "Show me the main components"
|
|
13
|
-
- "Where is the database logic?"
|
|
14
|
-
- Understanding code you haven't seen before
|
|
15
|
-
|
|
16
|
-
## Workflow
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
1. READ gitnexus://repos → Discover indexed repos
|
|
20
|
-
2. READ gitnexus://repo/{name}/context → Codebase overview, check staleness
|
|
21
|
-
3. gitnexus_query({query: "<what you want to understand>"}) → Find related execution flows
|
|
22
|
-
4. gitnexus_context({name: "<symbol>"}) → Deep dive on specific symbol
|
|
23
|
-
5. READ gitnexus://repo/{name}/process/{name} → Trace full execution flow
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
> If step 2 says "Index is stale" → run `npx gitnexus analyze` in terminal.
|
|
27
|
-
|
|
28
|
-
## Checklist
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
- [ ] READ gitnexus://repo/{name}/context
|
|
32
|
-
- [ ] gitnexus_query for the concept you want to understand
|
|
33
|
-
- [ ] Review returned processes (execution flows)
|
|
34
|
-
- [ ] gitnexus_context on key symbols for callers/callees
|
|
35
|
-
- [ ] READ process resource for full execution traces
|
|
36
|
-
- [ ] Read source files for implementation details
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Resources
|
|
40
|
-
|
|
41
|
-
| Resource | What you get |
|
|
42
|
-
| --------------------------------------- | ------------------------------------------------------- |
|
|
43
|
-
| `gitnexus://repo/{name}/context` | Stats, staleness warning (~150 tokens) |
|
|
44
|
-
| `gitnexus://repo/{name}/clusters` | All functional areas with cohesion scores (~300 tokens) |
|
|
45
|
-
| `gitnexus://repo/{name}/cluster/{name}` | Area members with file paths (~500 tokens) |
|
|
46
|
-
| `gitnexus://repo/{name}/process/{name}` | Step-by-step execution trace (~200 tokens) |
|
|
47
|
-
|
|
48
|
-
## Tools
|
|
49
|
-
|
|
50
|
-
**gitnexus_query** — find execution flows related to a concept:
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
gitnexus_query({query: "payment processing"})
|
|
54
|
-
→ Processes: CheckoutFlow, RefundFlow, WebhookHandler
|
|
55
|
-
→ Symbols grouped by flow with file locations
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
**gitnexus_context** — 360-degree view of a symbol:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
gitnexus_context({name: "validateUser"})
|
|
62
|
-
→ Incoming calls: loginHandler, apiMiddleware
|
|
63
|
-
→ Outgoing calls: checkToken, getUserById
|
|
64
|
-
→ Processes: LoginFlow (step 2/5), TokenRefresh (step 1/3)
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Example: "How does payment processing work?"
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
1. READ gitnexus://repo/my-app/context → 918 symbols, 45 processes
|
|
71
|
-
2. gitnexus_query({query: "payment processing"})
|
|
72
|
-
→ CheckoutFlow: processPayment → validateCard → chargeStripe
|
|
73
|
-
→ RefundFlow: initiateRefund → calculateRefund → processRefund
|
|
74
|
-
3. gitnexus_context({name: "processPayment"})
|
|
75
|
-
→ Incoming: checkoutHandler, webhookHandler
|
|
76
|
-
→ Outgoing: validateCard, chargeStripe, saveTransaction
|
|
77
|
-
4. Read src/payments/processor.ts for implementation details
|
|
78
|
-
```
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gitnexus-guide
|
|
3
|
-
description: "Use when the user asks about GitNexus itself — available tools, how to query the knowledge graph, MCP resources, graph schema, or workflow reference. Examples: \"What GitNexus tools are available?\", \"How do I use GitNexus?\""
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# GitNexus Guide
|
|
7
|
-
|
|
8
|
-
Quick reference for all GitNexus MCP tools, resources, and the knowledge graph schema.
|
|
9
|
-
|
|
10
|
-
## Always Start Here
|
|
11
|
-
|
|
12
|
-
For any task involving code understanding, debugging, impact analysis, or refactoring:
|
|
13
|
-
|
|
14
|
-
1. **Read `gitnexus://repo/{name}/context`** — codebase overview + check index freshness
|
|
15
|
-
2. **Match your task to a skill below** and **read that skill file**
|
|
16
|
-
3. **Follow the skill's workflow and checklist**
|
|
17
|
-
|
|
18
|
-
> If step 1 warns the index is stale, run `npx gitnexus analyze` in the terminal first.
|
|
19
|
-
|
|
20
|
-
## Skills
|
|
21
|
-
|
|
22
|
-
| Task | Skill to read |
|
|
23
|
-
| -------------------------------------------- | ------------------- |
|
|
24
|
-
| Understand architecture / "How does X work?" | `gitnexus-exploring` |
|
|
25
|
-
| Blast radius / "What breaks if I change X?" | `gitnexus-impact-analysis` |
|
|
26
|
-
| Trace bugs / "Why is X failing?" | `gitnexus-debugging` |
|
|
27
|
-
| Rename / extract / split / refactor | `gitnexus-refactoring` |
|
|
28
|
-
| Tools, resources, schema reference | `gitnexus-guide` (this file) |
|
|
29
|
-
| Index, status, clean, wiki CLI commands | `gitnexus-cli` |
|
|
30
|
-
|
|
31
|
-
## Tools Reference
|
|
32
|
-
|
|
33
|
-
| Tool | What it gives you |
|
|
34
|
-
| ---------------- | ------------------------------------------------------------------------ |
|
|
35
|
-
| `query` | Process-grouped code intelligence — execution flows related to a concept |
|
|
36
|
-
| `context` | 360-degree symbol view — categorized refs, processes it participates in |
|
|
37
|
-
| `impact` | Symbol blast radius — what breaks at depth 1/2/3 with confidence |
|
|
38
|
-
| `detect_changes` | Git-diff impact — what do your current changes affect |
|
|
39
|
-
| `rename` | Multi-file coordinated rename with confidence-tagged edits |
|
|
40
|
-
| `cypher` | Raw graph queries (read `gitnexus://repo/{name}/schema` first) |
|
|
41
|
-
| `list_repos` | Discover indexed repos |
|
|
42
|
-
|
|
43
|
-
## Resources Reference
|
|
44
|
-
|
|
45
|
-
Lightweight reads (~100-500 tokens) for navigation:
|
|
46
|
-
|
|
47
|
-
| Resource | Content |
|
|
48
|
-
| ---------------------------------------------- | ----------------------------------------- |
|
|
49
|
-
| `gitnexus://repo/{name}/context` | Stats, staleness check |
|
|
50
|
-
| `gitnexus://repo/{name}/clusters` | All functional areas with cohesion scores |
|
|
51
|
-
| `gitnexus://repo/{name}/cluster/{clusterName}` | Area members |
|
|
52
|
-
| `gitnexus://repo/{name}/processes` | All execution flows |
|
|
53
|
-
| `gitnexus://repo/{name}/process/{processName}` | Step-by-step trace |
|
|
54
|
-
| `gitnexus://repo/{name}/schema` | Graph schema for Cypher |
|
|
55
|
-
|
|
56
|
-
## Graph Schema
|
|
57
|
-
|
|
58
|
-
**Nodes:** File, Function, Class, Interface, Method, Community, Process
|
|
59
|
-
**Edges (via CodeRelation.type):** CALLS, IMPORTS, EXTENDS, IMPLEMENTS, DEFINES, MEMBER_OF, STEP_IN_PROCESS
|
|
60
|
-
|
|
61
|
-
```cypher
|
|
62
|
-
MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "myFunc"})
|
|
63
|
-
RETURN caller.name, caller.filePath
|
|
64
|
-
```
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gitnexus-impact-analysis
|
|
3
|
-
description: "Use when the user wants to know what will break if they change something, or needs safety analysis before editing code. Examples: \"Is it safe to change X?\", \"What depends on this?\", \"What will break?\""
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Impact Analysis with GitNexus
|
|
7
|
-
|
|
8
|
-
## When to Use
|
|
9
|
-
|
|
10
|
-
- "Is it safe to change this function?"
|
|
11
|
-
- "What will break if I modify X?"
|
|
12
|
-
- "Show me the blast radius"
|
|
13
|
-
- "Who uses this code?"
|
|
14
|
-
- Before making non-trivial code changes
|
|
15
|
-
- Before committing — to understand what your changes affect
|
|
16
|
-
|
|
17
|
-
## Workflow
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
1. gitnexus_impact({target: "X", direction: "upstream"}) → What depends on this
|
|
21
|
-
2. READ gitnexus://repo/{name}/processes → Check affected execution flows
|
|
22
|
-
3. gitnexus_detect_changes() → Map current git changes to affected flows
|
|
23
|
-
4. Assess risk and report to user
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
> If "Index is stale" → run `npx gitnexus analyze` in terminal.
|
|
27
|
-
|
|
28
|
-
## Checklist
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
- [ ] gitnexus_impact({target, direction: "upstream"}) to find dependents
|
|
32
|
-
- [ ] Review d=1 items first (these WILL BREAK)
|
|
33
|
-
- [ ] Check high-confidence (>0.8) dependencies
|
|
34
|
-
- [ ] READ processes to check affected execution flows
|
|
35
|
-
- [ ] gitnexus_detect_changes() for pre-commit check
|
|
36
|
-
- [ ] Assess risk level and report to user
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Understanding Output
|
|
40
|
-
|
|
41
|
-
| Depth | Risk Level | Meaning |
|
|
42
|
-
| ----- | ---------------- | ------------------------ |
|
|
43
|
-
| d=1 | **WILL BREAK** | Direct callers/importers |
|
|
44
|
-
| d=2 | LIKELY AFFECTED | Indirect dependencies |
|
|
45
|
-
| d=3 | MAY NEED TESTING | Transitive effects |
|
|
46
|
-
|
|
47
|
-
## Risk Assessment
|
|
48
|
-
|
|
49
|
-
| Affected | Risk |
|
|
50
|
-
| ------------------------------ | -------- |
|
|
51
|
-
| <5 symbols, few processes | LOW |
|
|
52
|
-
| 5-15 symbols, 2-5 processes | MEDIUM |
|
|
53
|
-
| >15 symbols or many processes | HIGH |
|
|
54
|
-
| Critical path (auth, payments) | CRITICAL |
|
|
55
|
-
|
|
56
|
-
## Tools
|
|
57
|
-
|
|
58
|
-
**gitnexus_impact** — the primary tool for symbol blast radius:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
gitnexus_impact({
|
|
62
|
-
target: "validateUser",
|
|
63
|
-
direction: "upstream",
|
|
64
|
-
minConfidence: 0.8,
|
|
65
|
-
maxDepth: 3
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
→ d=1 (WILL BREAK):
|
|
69
|
-
- loginHandler (src/auth/login.ts:42) [CALLS, 100%]
|
|
70
|
-
- apiMiddleware (src/api/middleware.ts:15) [CALLS, 100%]
|
|
71
|
-
|
|
72
|
-
→ d=2 (LIKELY AFFECTED):
|
|
73
|
-
- authRouter (src/routes/auth.ts:22) [CALLS, 95%]
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**gitnexus_detect_changes** — git-diff based impact analysis:
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
gitnexus_detect_changes({scope: "staged"})
|
|
80
|
-
|
|
81
|
-
→ Changed: 5 symbols in 3 files
|
|
82
|
-
→ Affected: LoginFlow, TokenRefresh, APIMiddlewarePipeline
|
|
83
|
-
→ Risk: MEDIUM
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Example: "What breaks if I change validateUser?"
|
|
87
|
-
|
|
88
|
-
```
|
|
89
|
-
1. gitnexus_impact({target: "validateUser", direction: "upstream"})
|
|
90
|
-
→ d=1: loginHandler, apiMiddleware (WILL BREAK)
|
|
91
|
-
→ d=2: authRouter, sessionManager (LIKELY AFFECTED)
|
|
92
|
-
|
|
93
|
-
2. READ gitnexus://repo/my-app/processes
|
|
94
|
-
→ LoginFlow and TokenRefresh touch validateUser
|
|
95
|
-
|
|
96
|
-
3. Risk: 2 direct callers, 2 processes = MEDIUM
|
|
97
|
-
```
|