sp-rag 0.6.5 → 0.6.6

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 CHANGED
@@ -17,7 +17,7 @@ CLI để setup nhanh SP-RAG theo hướng dev-friendly:
17
17
  ## Trạng thái package
18
18
 
19
19
  - package npm public: `sp-rag`
20
- - version đang publish: `0.6.5`
20
+ - version đang publish: `0.6.6`
21
21
  - binary public: `sp-rag`
22
22
 
23
23
  ## Cài từ source trong monorepo
@@ -71,6 +71,7 @@ Ghi chú:
71
71
  - với `cursor` và `vscode` ở `scope project`, nếu Sếpp đang đứng sẵn trong repo thì có thể bỏ `--cwd`
72
72
  - CLI sẽ tự dùng thư mục hiện tại cho cả MCP lẫn skill
73
73
  - rule/agent mới đã được tăng độ ưu tiên MCP-first, giảm khả năng model nhảy thẳng sang grep/read file local
74
+ - skill mới cũng dặn model tổng hợp từ `matched_passages`, `top_entities`, `top_relations`, `citations`; không bê nguyên `answer_brief`
74
75
 
75
76
  Ví dụ:
76
77
 
package/dist/cli.js CHANGED
@@ -4,7 +4,7 @@ import { runEvaluationSuite } from './lib/eval.js';
4
4
  import { defaultBaseUrl, defaultMcpServerAlias, defaultMcpUrl, installMcpConfig, resolveMcpConfigPath, } from './lib/mcp-config.js';
5
5
  import { fetchJson, fetchText, runDoctor } from './lib/http.js';
6
6
  import { installSkill, resolveSkillInstallTarget, } from './lib/skill.js';
7
- const cliVersion = '0.6.5';
7
+ const cliVersion = '0.6.6';
8
8
  function parseArgv(argv) {
9
9
  const positionals = [];
10
10
  const options = {};
package/dist/lib/skill.js CHANGED
@@ -85,11 +85,13 @@ Docs URL: \`${context.docsUrl}\`
85
85
  3. Use \`get_rendered_docs\` for public, function, or dev docs that were already rendered from the latest graph.
86
86
  4. Use \`get_sync_status\`, \`get_sync_runs\`, or \`get_sync_metrics\` when you need to verify commit freshness, investigate failures, or inspect operational history.
87
87
  5. Only call \`trigger_code_graph_sync\` when the user explicitly asks to refresh the graph or when a stale graph is the confirmed blocker.
88
+ 6. After \`query_context\` returns, synthesize the final answer from \`matched_passages\`, \`top_entities\`, \`top_relations\`, and \`citations\`. Treat \`answer_brief\` as a hint only.
88
89
 
89
90
  ## Guardrails
90
91
 
91
92
  - You must call SP-RAG MCP tools first for codebase or domain questions before using local workspace search, grep, or file reads.
92
93
  - Prefer MCP-grounded answers before relying on memory.
94
+ - Treat \`answer_brief\` as a hint only. Prefer the richer evidence in \`matched_passages\`, \`top_entities\`, \`top_relations\`, and \`citations\` when writing the final answer.
93
95
  - If the evidence may be stale, say so clearly and mention that the graph or docs may need a refresh.
94
96
  - Do not trigger sync or import actions unless the user asked for it or the workflow truly requires it.
95
97
  - When rendered docs already answer the question, cite or summarize those docs instead of rewriting everything from scratch.
@@ -108,6 +110,7 @@ alwaysApply: true
108
110
  - You must call the \`${context.serverAlias}\` MCP server first before using local workspace search, grep, or file reads for codebase and domain questions.
109
111
  - Use rendered docs from \`${context.docsUrl}\` when documentation already answers the question.
110
112
  - For architecture, domain, entities, relations, and business workflow questions, query MCP first and only then synthesize the answer.
113
+ - Treat \`answer_brief\` only as a hint. Build the final answer from \`matched_passages\`, \`top_entities\`, \`top_relations\`, and \`citations\`.
111
114
  - For freshness or operational questions, check sync status, recent runs, and metrics before assuming the graph is current.
112
115
  - Only trigger codegraph sync when the user explicitly asks for it or stale evidence is the confirmed blocker.
113
116
  - If the evidence may be stale, say so clearly.
@@ -134,10 +137,12 @@ You must call an SP-RAG MCP tool before using local workspace search, grep, or f
134
137
  3. Use \`get_rendered_docs\` when public, function, or dev docs may already answer the question.
135
138
  4. Use \`get_sync_status\`, \`get_sync_runs\`, or \`get_sync_metrics\` for freshness, incident review, or operational debugging.
136
139
  5. Trigger codegraph sync only when the user explicitly requests a refresh or stale evidence is the confirmed blocker.
140
+ 6. After \`query_context\` returns, synthesize the final answer from \`matched_passages\`, \`top_entities\`, \`top_relations\`, and \`citations\`. Treat \`answer_brief\` as a hint.
137
141
 
138
142
  ## Guardrails
139
143
 
140
144
  - Prefer MCP-grounded evidence before answering from memory.
145
+ - Treat \`answer_brief\` as a hint. Prefer the richer evidence in \`matched_passages\`, \`top_entities\`, \`top_relations\`, and \`citations\` when writing the final answer.
141
146
  - Do not use local workspace search, grep, or file reads until SP-RAG MCP has been tried first for the current question.
142
147
  - When evidence may be stale, say so clearly and mention that a refresh might be needed.
143
148
  - Do not trigger sync or import actions unless the workflow truly requires it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sp-rag",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "description": "CLI cho setup MCP, codegraph GitNexus và skill của SP-RAG",
5
5
  "type": "module",
6
6
  "files": [