claude-nexus 0.21.0 → 0.22.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.en.md +11 -10
- package/README.md +1 -3
- package/VERSION +1 -1
- package/bridge/mcp-server.cjs +2 -130
- package/bridge/mcp-server.cjs.map +4 -4
- package/package.json +1 -1
- package/scripts/gate.cjs +90 -26
- package/scripts/gate.cjs.map +3 -3
- package/skills/nx-run/SKILL.md +4 -2
- package/skills/nx-sync/SKILL.md +3 -1
package/README.en.md
CHANGED
|
@@ -85,11 +85,10 @@ Typical flow: use `[plan]` to discuss and align → decide → use `[run]` to ex
|
|
|
85
85
|
|
|
86
86
|
Claude-callable tools exposed by the Nexus MCP server.
|
|
87
87
|
|
|
88
|
-
### Core (
|
|
88
|
+
### Core (14 tools)
|
|
89
89
|
|
|
90
90
|
| Tool | Purpose |
|
|
91
91
|
|------|---------|
|
|
92
|
-
| `nx_briefing` | Assemble role-specific briefing (core knowledge + rules) |
|
|
93
92
|
| `nx_core_read/write` | Project knowledge management (git-tracked) |
|
|
94
93
|
| `nx_rules_read/write` | Team custom rules management (git-tracked) |
|
|
95
94
|
| `nx_context` | Current session state lookup (branch, tasks, plan) |
|
|
@@ -154,17 +153,19 @@ Project knowledge and rules are stored under `.nexus/` and tracked by git.
|
|
|
154
153
|
<details>
|
|
155
154
|
<summary>Runtime State</summary>
|
|
156
155
|
|
|
157
|
-
Runtime state is stored under `.nexus/` and is excluded from git.
|
|
156
|
+
Runtime state is stored under `.nexus/state/` and is excluded from git. `history.json` is at `.nexus/` root and git-tracked.
|
|
158
157
|
|
|
159
158
|
```
|
|
160
159
|
.nexus/
|
|
161
|
-
├──
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
160
|
+
├── history.json ← Cycle archive (git-tracked, created by nx_task_close)
|
|
161
|
+
└── state/ ← Runtime state (git-ignored)
|
|
162
|
+
├── tasks.json ← Task list
|
|
163
|
+
├── plan.json ← Planning session
|
|
164
|
+
├── decisions.json ← Plan decisions
|
|
165
|
+
├── edit-tracker.json
|
|
166
|
+
├── reopen-tracker.json
|
|
167
|
+
├── agent-tracker.json
|
|
168
|
+
└── artifacts/ ← Artifacts
|
|
168
169
|
```
|
|
169
170
|
|
|
170
171
|
</details>
|
package/README.md
CHANGED
|
@@ -71,11 +71,10 @@ claude plugin install claude-nexus@nexus
|
|
|
71
71
|
|
|
72
72
|
Claude가 직접 호출하는 도구입니다.
|
|
73
73
|
|
|
74
|
-
### Core (
|
|
74
|
+
### Core (14개)
|
|
75
75
|
|
|
76
76
|
| 도구 | 용도 |
|
|
77
77
|
|------|------|
|
|
78
|
-
| `nx_briefing` | 에이전트 역할별 브리핑 조립 (core knowledge + rules 기반) |
|
|
79
78
|
| `nx_core_read/write` | 프로젝트 지식 관리 (`.nexus/core/`, git 추적) |
|
|
80
79
|
| `nx_rules_read/write` | 팀 커스텀 규칙 관리 (`.nexus/rules/`, git 추적) |
|
|
81
80
|
| `nx_context` | 현재 세션 상태 조회 (브랜치, 태스크, 플랜) |
|
|
@@ -140,7 +139,6 @@ Gate 단일 모듈로 동작합니다.
|
|
|
140
139
|
```
|
|
141
140
|
.nexus/state/
|
|
142
141
|
├── tasks.json
|
|
143
|
-
├── meet.json
|
|
144
142
|
├── edit-tracker.json
|
|
145
143
|
├── reopen-tracker.json
|
|
146
144
|
├── agent-tracker.json
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.22.0
|
package/bridge/mcp-server.cjs
CHANGED
|
@@ -22478,135 +22478,8 @@ function registerArtifactTools(server2) {
|
|
|
22478
22478
|
);
|
|
22479
22479
|
}
|
|
22480
22480
|
|
|
22481
|
-
// src/mcp/tools/briefing.ts
|
|
22482
|
-
var import_fs11 = require("fs");
|
|
22483
|
-
var import_promises7 = require("fs/promises");
|
|
22484
|
-
var import_path12 = require("path");
|
|
22485
|
-
var MATRIX = {
|
|
22486
|
-
architect: { identity: "all", codebase: "all", reference: "all", memory: "all" },
|
|
22487
|
-
postdoc: { identity: "all", codebase: "all", reference: "all", memory: "all" },
|
|
22488
|
-
engineer: { identity: null, codebase: "all", reference: null, memory: "all" },
|
|
22489
|
-
researcher: { identity: "all", codebase: null, reference: "all", memory: "all" },
|
|
22490
|
-
tester: { identity: "all", codebase: "all", reference: null, memory: "all" },
|
|
22491
|
-
designer: { identity: "all", codebase: "all", reference: "all", memory: "all" },
|
|
22492
|
-
strategist: { identity: "all", codebase: "all", reference: "all", memory: "all" },
|
|
22493
|
-
writer: { identity: null, codebase: "all", reference: null, memory: "all" },
|
|
22494
|
-
reviewer: { identity: "all", codebase: "all", reference: null, memory: "all" }
|
|
22495
|
-
};
|
|
22496
|
-
function parseTags2(content) {
|
|
22497
|
-
const match = content.match(/^<!--\s*tags:\s*(.+?)\s*-->/);
|
|
22498
|
-
if (!match) return [];
|
|
22499
|
-
return match[1].split(",").map((t) => t.trim()).filter(Boolean);
|
|
22500
|
-
}
|
|
22501
|
-
async function readLayerFiles(layer, hint) {
|
|
22502
|
-
const layerDir = coreLayerDir(layer);
|
|
22503
|
-
if (!(0, import_fs11.existsSync)(layerDir)) return [];
|
|
22504
|
-
const files = (await (0, import_promises7.readdir)(layerDir)).filter((f) => f.endsWith(".md"));
|
|
22505
|
-
const results = [];
|
|
22506
|
-
for (const file of files) {
|
|
22507
|
-
const filePath = (0, import_path12.join)(layerDir, file);
|
|
22508
|
-
const content = await (0, import_promises7.readFile)(filePath, "utf-8");
|
|
22509
|
-
results.push({ filename: file, content });
|
|
22510
|
-
}
|
|
22511
|
-
if (hint && results.length > 0) {
|
|
22512
|
-
const hintLower = hint.toLowerCase();
|
|
22513
|
-
const matched = results.filter(({ filename, content }) => {
|
|
22514
|
-
const tags = parseTags2(content);
|
|
22515
|
-
return tags.some((t) => t.toLowerCase().includes(hintLower)) || filename.toLowerCase().includes(hintLower);
|
|
22516
|
-
});
|
|
22517
|
-
if (matched.length > 0) return matched;
|
|
22518
|
-
}
|
|
22519
|
-
return results;
|
|
22520
|
-
}
|
|
22521
|
-
function registerBriefingTool(server2) {
|
|
22522
|
-
server2.tool(
|
|
22523
|
-
"nx_briefing",
|
|
22524
|
-
"Assemble a role-specific briefing from the core knowledge store (identity, codebase, reference, memory layers) plus decisions and rules.",
|
|
22525
|
-
{
|
|
22526
|
-
role: external_exports.enum(["architect", "postdoc", "engineer", "researcher", "tester", "designer", "strategist", "writer", "reviewer"]).describe("Agent role"),
|
|
22527
|
-
hint: external_exports.string().optional().describe("Relevant module/area hint for tag filtering")
|
|
22528
|
-
},
|
|
22529
|
-
async (params) => {
|
|
22530
|
-
const role = params.role;
|
|
22531
|
-
const hint = params.hint;
|
|
22532
|
-
const matrix = MATRIX[role];
|
|
22533
|
-
if (!matrix) {
|
|
22534
|
-
return textResult({ error: `Unknown role: ${role}` });
|
|
22535
|
-
}
|
|
22536
|
-
const collectedFiles = [];
|
|
22537
|
-
const sections = {};
|
|
22538
|
-
for (const layer of LAYERS) {
|
|
22539
|
-
const policy = matrix[layer];
|
|
22540
|
-
if (policy === null) continue;
|
|
22541
|
-
const files = await readLayerFiles(layer, hint);
|
|
22542
|
-
sections[layer] = files;
|
|
22543
|
-
for (const f of files) {
|
|
22544
|
-
collectedFiles.push(`${layer}/${f.filename}`);
|
|
22545
|
-
}
|
|
22546
|
-
}
|
|
22547
|
-
let decisionsSection = "";
|
|
22548
|
-
const decisionsPath = (0, import_path12.join)(STATE_ROOT, "decisions.json");
|
|
22549
|
-
if ((0, import_fs11.existsSync)(decisionsPath)) {
|
|
22550
|
-
const raw = await (0, import_promises7.readFile)(decisionsPath, "utf-8");
|
|
22551
|
-
decisionsSection = raw.trim();
|
|
22552
|
-
}
|
|
22553
|
-
let rulesSection = "";
|
|
22554
|
-
const rulesDir = (0, import_path12.join)(NEXUS_ROOT, "rules");
|
|
22555
|
-
if ((0, import_fs11.existsSync)(rulesDir)) {
|
|
22556
|
-
const ruleFiles = (await (0, import_promises7.readdir)(rulesDir)).filter((f) => f.endsWith(".md"));
|
|
22557
|
-
let parts = [];
|
|
22558
|
-
for (const ruleFile of ruleFiles) {
|
|
22559
|
-
const content = await (0, import_promises7.readFile)((0, import_path12.join)(rulesDir, ruleFile), "utf-8");
|
|
22560
|
-
parts.push({ filename: ruleFile, content });
|
|
22561
|
-
}
|
|
22562
|
-
if (hint && parts.length > 0) {
|
|
22563
|
-
const hintLower = hint.toLowerCase();
|
|
22564
|
-
const matched = parts.filter(({ filename, content }) => {
|
|
22565
|
-
const tags = parseTags2(content);
|
|
22566
|
-
return tags.some((t) => t.toLowerCase().includes(hintLower)) || filename.toLowerCase().includes(hintLower);
|
|
22567
|
-
});
|
|
22568
|
-
if (matched.length > 0) parts = matched;
|
|
22569
|
-
}
|
|
22570
|
-
rulesSection = parts.map(({ filename, content }) => `### ${filename}
|
|
22571
|
-
${content.trim()}`).join("\n\n");
|
|
22572
|
-
}
|
|
22573
|
-
const lines = [];
|
|
22574
|
-
lines.push(`<!-- briefing: role=${role}, hint=${hint ?? "null"}, files=[${collectedFiles.join(", ")}] -->`);
|
|
22575
|
-
lines.push("");
|
|
22576
|
-
if (decisionsSection) {
|
|
22577
|
-
lines.push("## Decisions");
|
|
22578
|
-
lines.push(decisionsSection);
|
|
22579
|
-
lines.push("");
|
|
22580
|
-
}
|
|
22581
|
-
if (rulesSection) {
|
|
22582
|
-
lines.push("## Rules");
|
|
22583
|
-
lines.push(rulesSection);
|
|
22584
|
-
lines.push("");
|
|
22585
|
-
}
|
|
22586
|
-
for (const layer of LAYERS) {
|
|
22587
|
-
const policy = matrix[layer];
|
|
22588
|
-
if (policy === null) continue;
|
|
22589
|
-
const layerName = layer.charAt(0).toUpperCase() + layer.slice(1);
|
|
22590
|
-
lines.push(`## ${layerName}`);
|
|
22591
|
-
const files = sections[layer] ?? [];
|
|
22592
|
-
if (files.length === 0) {
|
|
22593
|
-
lines.push(`No ${layer} files.`);
|
|
22594
|
-
} else {
|
|
22595
|
-
for (const { filename, content } of files) {
|
|
22596
|
-
lines.push(`### ${filename}`);
|
|
22597
|
-
lines.push(content.trim());
|
|
22598
|
-
}
|
|
22599
|
-
}
|
|
22600
|
-
lines.push("");
|
|
22601
|
-
}
|
|
22602
|
-
const markdown = lines.join("\n");
|
|
22603
|
-
return { content: [{ type: "text", text: markdown }] };
|
|
22604
|
-
}
|
|
22605
|
-
);
|
|
22606
|
-
}
|
|
22607
|
-
|
|
22608
22481
|
// src/mcp/server.ts
|
|
22609
|
-
var
|
|
22482
|
+
var import_path12 = require("path");
|
|
22610
22483
|
var server = new McpServer({
|
|
22611
22484
|
name: "nx",
|
|
22612
22485
|
version: getCurrentVersion() || "0.0.0"
|
|
@@ -22615,7 +22488,7 @@ registerCoreStore(server);
|
|
|
22615
22488
|
registerMarkdownStore(server, {
|
|
22616
22489
|
toolPrefix: "nx_rules",
|
|
22617
22490
|
entityName: "name",
|
|
22618
|
-
dirPath: (0,
|
|
22491
|
+
dirPath: (0, import_path12.join)(NEXUS_ROOT, "rules"),
|
|
22619
22492
|
pathFn: rulesPath,
|
|
22620
22493
|
listKey: "rules",
|
|
22621
22494
|
cache: false
|
|
@@ -22626,7 +22499,6 @@ registerAstTools(server);
|
|
|
22626
22499
|
registerTaskTools(server);
|
|
22627
22500
|
registerArtifactTools(server);
|
|
22628
22501
|
registerPlanTools(server);
|
|
22629
|
-
registerBriefingTool(server);
|
|
22630
22502
|
async function main() {
|
|
22631
22503
|
const transport = new StdioServerTransport();
|
|
22632
22504
|
await server.connect(transport);
|