gitnexus 1.1.7 → 1.1.8
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/dist/cli/ai-context.js +21 -16
- package/package.json +1 -1
package/dist/cli/ai-context.js
CHANGED
|
@@ -17,10 +17,11 @@ const GITNEXUS_END_MARKER = '<!-- gitnexus:end -->';
|
|
|
17
17
|
* Generate the full GitNexus context content.
|
|
18
18
|
*
|
|
19
19
|
* Design principles (learned from real agent behavior):
|
|
20
|
-
* - AGENTS.md is the ROUTER — it tells the agent WHICH skill to
|
|
20
|
+
* - AGENTS.md is the ROUTER — it tells the agent WHICH skill to read
|
|
21
21
|
* - Skills contain the actual workflows — AGENTS.md does NOT duplicate them
|
|
22
|
-
* -
|
|
23
|
-
* -
|
|
22
|
+
* - Bold **IMPORTANT** block + "Skills — Read First" heading — agents skip soft suggestions
|
|
23
|
+
* - One-line quick start (read context resource) gives agents an entry point
|
|
24
|
+
* - Tools/Resources sections are labeled "Reference" — agents treat them as lookup, not workflow
|
|
24
25
|
*/
|
|
25
26
|
function generateGitNexusContent(projectName, stats) {
|
|
26
27
|
const clusterCount = stats.clusters || stats.communities || 0;
|
|
@@ -29,24 +30,28 @@ function generateGitNexusContent(projectName, stats) {
|
|
|
29
30
|
|
|
30
31
|
This project is indexed by GitNexus as **${projectName}** (${stats.nodes || 0} symbols, ${stats.edges || 0} relationships, ${clusterCount} clusters, ${stats.processes || 0} processes).
|
|
31
32
|
|
|
32
|
-
GitNexus
|
|
33
|
+
GitNexus provides a knowledge graph over this codebase — clusters, call chains, blast radius, execution flows, and semantic search.
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
## Always Start Here
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
For any task involving code understanding, debugging, impact analysis, or refactoring, you must:
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
1. **Read \`gitnexus://repo/{name}/context\`** — codebase overview + check index freshness
|
|
40
|
+
2. **Match your task to a skill below** and **read that skill file**
|
|
41
|
+
3. **Follow the skill's workflow and checklist**
|
|
42
|
+
|
|
43
|
+
> If step 1 warns the index is stale, run \`npx gitnexus analyze\` in the terminal first.
|
|
39
44
|
|
|
40
|
-
|
|
45
|
+
## Skills
|
|
41
46
|
|
|
42
|
-
| Task |
|
|
43
|
-
|
|
44
|
-
| Understand architecture / "How does X work?" |
|
|
45
|
-
| Blast radius / "What breaks if I change X?" |
|
|
46
|
-
| Trace bugs / "Why is X failing?" |
|
|
47
|
-
| Rename / extract / split / refactor |
|
|
47
|
+
| Task | Read this skill file |
|
|
48
|
+
|------|---------------------|
|
|
49
|
+
| Understand architecture / "How does X work?" | \`.claude/skills/gitnexus/exploring/SKILL.md\` |
|
|
50
|
+
| Blast radius / "What breaks if I change X?" | \`.claude/skills/gitnexus/impact-analysis/SKILL.md\` |
|
|
51
|
+
| Trace bugs / "Why is X failing?" | \`.claude/skills/gitnexus/debugging/SKILL.md\` |
|
|
52
|
+
| Rename / extract / split / refactor | \`.claude/skills/gitnexus/refactoring/SKILL.md\` |
|
|
48
53
|
|
|
49
|
-
## Tools
|
|
54
|
+
## Tools Reference
|
|
50
55
|
|
|
51
56
|
| Tool | What it gives you |
|
|
52
57
|
|------|-------------------|
|
|
@@ -57,7 +62,7 @@ For these tasks, read the matching skill and follow its workflow:
|
|
|
57
62
|
| \`cypher\` | Raw graph queries (read \`gitnexus://repo/{name}/schema\` first) |
|
|
58
63
|
| \`list_repos\` | Discover indexed repos |
|
|
59
64
|
|
|
60
|
-
## Resources
|
|
65
|
+
## Resources Reference
|
|
61
66
|
|
|
62
67
|
Lightweight reads (~100-500 tokens) for navigation:
|
|
63
68
|
|
package/package.json
CHANGED