Skip to content

Commit e6205cf

Browse files
CyningMMcursoragent
andcommitted
docs(tech_graph): 终轮关账 graph_v2+query 与闸口 B 归档
HG-P2-3-GATE-B 人签后 CLOSE 审查、HANDOFF_CLOSE_TRACE; task 移至 done/;闸口 B 报告/fixtures/batch 与 P2-3 invoke 落盘。 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 8b69658 commit e6205cf

26 files changed

Lines changed: 1894 additions & 392 deletions
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"schema": "gate_ctx_b_ctx_query_main_v1",
3+
"arm": "CTX_QUERY",
4+
"task_id": "T001_embedding_dim_default",
5+
"freeze_id": "TECH_GRAPH_S2_FREEZE_20260517_V2_0",
6+
"query": {
7+
"op": "downstream",
8+
"node_id": "ENV",
9+
"depth": 2
10+
},
11+
"subgraph": {
12+
"schema_version": "graph_query_result_v1",
13+
"graph_schema_version": "graph_v2",
14+
"freeze_id": "TECH_GRAPH_S2_FREEZE_20260517_V2_0",
15+
"query": {
16+
"op": "downstream",
17+
"root": "ENV",
18+
"depth": 2
19+
},
20+
"nodes": [
21+
{
22+
"id": "ENV",
23+
"label": "Debug env toggles"
24+
},
25+
{
26+
"id": "ENV_KEYS",
27+
"label": "\"DEBUG_RAG / RAG_DEBUG / NODE_ENV / DEBUG_INGEST / DEBUG_INTENT_CACHE / DEBUG_AGENT_DB_LOG / DEBUG_ROUTER_EVIDENCE / DEBUG_ROUTER_EVIDENCE_DB / DEBUG_ROUTER_TRACE_DB\""
28+
}
29+
],
30+
"edges": [
31+
{
32+
"anchors": [
33+
{
34+
"path": "api/index.py",
35+
"symbol": "_rag_debug_enabled"
36+
},
37+
{
38+
"line": 33,
39+
"path": "api/ingest_pipeline.py",
40+
"symbol": "#L33"
41+
}
42+
],
43+
"from": "ENV",
44+
"label": "",
45+
"mark": "->",
46+
"sync": true,
47+
"to": "ENV_KEYS",
48+
"type": "depends_on"
49+
}
50+
],
51+
"anchors": [
52+
{
53+
"path": "api/index.py",
54+
"symbol": "_rag_debug_enabled"
55+
},
56+
{
57+
"line": 33,
58+
"path": "api/ingest_pipeline.py",
59+
"symbol": "#L33"
60+
}
61+
]
62+
},
63+
"note": "非整包 graph_v2;仅 query 子图 + 附件 manifest/contract"
64+
}
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
{
2+
"schema": "gate_ctx_b_ctx_query_main_v1",
3+
"arm": "CTX_QUERY",
4+
"task_id": "T002_unified_sse_chain_contract",
5+
"freeze_id": "TECH_GRAPH_S2_FREEZE_20260517_V2_0",
6+
"query": {
7+
"op": "downstream",
8+
"node_id": "U2",
9+
"depth": 2
10+
},
11+
"subgraph": {
12+
"schema_version": "graph_query_result_v1",
13+
"graph_schema_version": "graph_v2",
14+
"freeze_id": "TECH_GRAPH_S2_FREEZE_20260517_V2_0",
15+
"query": {
16+
"op": "downstream",
17+
"root": "U2",
18+
"depth": 2
19+
},
20+
"nodes": [
21+
{
22+
"id": "FTS",
23+
"label": "FTS 子流程"
24+
},
25+
{
26+
"id": "RAG",
27+
"label": "RAG 子流程"
28+
},
29+
{
30+
"id": "RAG_DOC",
31+
"label": ">10_flow_rag.md"
32+
},
33+
{
34+
"id": "RPC",
35+
"label": "Supabase RPC 子流程"
36+
},
37+
{
38+
"id": "T2S",
39+
"label": "Text2SQL 子流程"
40+
},
41+
{
42+
"id": "T2S_DOC",
43+
"label": ">11_flow_text2sql.md"
44+
},
45+
{
46+
"id": "U2",
47+
"label": "Unified SSE"
48+
}
49+
],
50+
"edges": [
51+
{
52+
"anchors": [
53+
{
54+
"path": "api/rag_recall_tools.py",
55+
"symbol": "rpc_execute_with_retry"
56+
}
57+
],
58+
"from": "FTS",
59+
"label": "",
60+
"mark": "[retry=N]",
61+
"sync": true,
62+
"to": "FTS",
63+
"type": "depends_on"
64+
},
65+
{
66+
"anchors": [],
67+
"from": "FTS",
68+
"label": "",
69+
"mark": "->",
70+
"sync": true,
71+
"to": "RPC",
72+
"type": "depends_on"
73+
},
74+
{
75+
"anchors": [],
76+
"from": "RAG",
77+
"label": "",
78+
"mark": "->",
79+
"sync": true,
80+
"to": "FTS",
81+
"type": "depends_on"
82+
},
83+
{
84+
"anchors": [],
85+
"from": "RAG",
86+
"label": "加载",
87+
"mark": "->",
88+
"sync": true,
89+
"to": "RAG_DOC",
90+
"type": "depends_on"
91+
},
92+
{
93+
"anchors": [],
94+
"from": "T2S",
95+
"label": "",
96+
"mark": "->",
97+
"sync": true,
98+
"to": "RPC",
99+
"type": "depends_on"
100+
},
101+
{
102+
"anchors": [],
103+
"from": "T2S",
104+
"label": "加载",
105+
"mark": "->",
106+
"sync": true,
107+
"to": "T2S_DOC",
108+
"type": "depends_on"
109+
},
110+
{
111+
"anchors": [],
112+
"from": "U2",
113+
"label": "",
114+
"mark": "::branches",
115+
"sync": true,
116+
"to": "RAG",
117+
"type": "branches"
118+
},
119+
{
120+
"anchors": [],
121+
"from": "U2",
122+
"label": "",
123+
"mark": "::branches",
124+
"sync": true,
125+
"to": "T2S",
126+
"type": "branches"
127+
}
128+
],
129+
"anchors": [
130+
{
131+
"path": "api/rag_recall_tools.py",
132+
"symbol": "rpc_execute_with_retry"
133+
}
134+
]
135+
},
136+
"note": "非整包 graph_v2;仅 query 子图 + 附件 manifest/contract"
137+
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"schema": "gate_ctx_b_ctx_query_main_v1",
3+
"arm": "CTX_QUERY",
4+
"task_id": "T003_ingest_admin_rpc",
5+
"freeze_id": "TECH_GRAPH_S2_FREEZE_20260517_V2_0",
6+
"query": {
7+
"op": "downstream",
8+
"node_id": "A2",
9+
"depth": 2
10+
},
11+
"subgraph": {
12+
"schema_version": "graph_query_result_v1",
13+
"graph_schema_version": "graph_v2",
14+
"freeze_id": "TECH_GRAPH_S2_FREEZE_20260517_V2_0",
15+
"query": {
16+
"op": "downstream",
17+
"root": "A2",
18+
"depth": 2
19+
},
20+
"nodes": [
21+
{
22+
"id": "A2",
23+
"label": "Ingest"
24+
},
25+
{
26+
"id": "RPC",
27+
"label": "Supabase RPC 子流程"
28+
},
29+
{
30+
"id": "RPC_DOC",
31+
"label": ">13_flow_supabase_rpc.md"
32+
},
33+
{
34+
"id": "TSQ",
35+
"label": "websearch_to_tsquery('simple', query_text)"
36+
}
37+
],
38+
"edges": [
39+
{
40+
"anchors": [],
41+
"from": "A2",
42+
"label": "",
43+
"mark": "->",
44+
"sync": true,
45+
"to": "RPC",
46+
"type": "depends_on"
47+
},
48+
{
49+
"anchors": [],
50+
"from": "RPC",
51+
"label": "加载",
52+
"mark": "->",
53+
"sync": true,
54+
"to": "RPC_DOC",
55+
"type": "depends_on"
56+
},
57+
{
58+
"anchors": [
59+
{
60+
"path": "supabase/sql/hybrid_search.sql",
61+
"symbol": "keyword_documents"
62+
}
63+
],
64+
"from": "RPC",
65+
"label": "",
66+
"mark": "~>",
67+
"sync": false,
68+
"to": "TSQ",
69+
"type": "async_calls"
70+
}
71+
],
72+
"anchors": [
73+
{
74+
"path": "supabase/sql/hybrid_search.sql",
75+
"symbol": "keyword_documents"
76+
}
77+
]
78+
},
79+
"note": "非整包 graph_v2;仅 query 子图 + 附件 manifest/contract"
80+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"schema": "gate_ctx_b_payload_materialize_v1",
3+
"generated_at": "2026-05-17T09:52:24Z",
4+
"freeze_id": "TECH_GRAPH_S2_FREEZE_20260517_V2_0",
5+
"graph_v2_path": "docs/_tech_graph/graph.json",
6+
"arms_static": {
7+
"CTX_MERMAID": {
8+
"bytes_utf8": 20953,
9+
"chars": 20105,
10+
"heuristic_tokens": 5026
11+
},
12+
"CTX_JSON": {
13+
"bytes_utf8": 20224,
14+
"chars": 20224,
15+
"heuristic_tokens": 5056
16+
},
17+
"CTX_QUERY": {
18+
"per_task": {
19+
"T001_embedding_dim_default": {
20+
"path": "docs/diary/jsonPKmermaid/fixtures/gate_ctx_b_v1/payloads/CTX_QUERY/T001_embedding_dim_default.subgraph.json",
21+
"node_id": "ENV",
22+
"op": "downstream",
23+
"depth": 2,
24+
"nodes": 2,
25+
"edges": 1,
26+
"bytes_utf8": 1552,
27+
"heuristic_tokens": 383
28+
},
29+
"T002_unified_sse_chain_contract": {
30+
"path": "docs/diary/jsonPKmermaid/fixtures/gate_ctx_b_v1/payloads/CTX_QUERY/T002_unified_sse_chain_contract.subgraph.json",
31+
"node_id": "U2",
32+
"op": "downstream",
33+
"depth": 2,
34+
"nodes": 7,
35+
"edges": 8,
36+
"bytes_utf8": 2854,
37+
"heuristic_tokens": 701
38+
},
39+
"T003_ingest_admin_rpc": {
40+
"path": "docs/diary/jsonPKmermaid/fixtures/gate_ctx_b_v1/payloads/CTX_QUERY/T003_ingest_admin_rpc.subgraph.json",
41+
"node_id": "A2",
42+
"op": "downstream",
43+
"depth": 2,
44+
"nodes": 4,
45+
"edges": 3,
46+
"bytes_utf8": 1736,
47+
"heuristic_tokens": 427
48+
}
49+
},
50+
"heuristic_tokens_median": 427
51+
}
52+
},
53+
"forbidden_checks": {
54+
"CTX_QUERY_not_whole_graph_v2": true,
55+
"CTX_QUERY_uses_graph_query_cli": true
56+
}
57+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# gate_ctx_b_v1 — 闸口 B(CTX_QUERY vs 整包 Mermaid / 整包 v1 JSON)
2+
protocol_version: gate_ctx_b_v1
3+
status: active
4+
created_at: "2026-05-17"
5+
6+
repo: ai-ink-brain-api-python
7+
freeze_id: TECH_GRAPH_S2_FREEZE_20260517_V2_0
8+
gate_a_freeze_id: TECH_GRAPH_S1_FREEZE_20260514_V1_1_3
9+
graph_v2_path: docs/_tech_graph/graph.json
10+
11+
# 闸口 B 三组对照(§4.2);A/B 行为数据沿用闸口 A,本协议主跑 CTX_QUERY
12+
arms:
13+
- CTX_MERMAID
14+
- CTX_JSON
15+
- CTX_QUERY
16+
17+
s0_arms_order:
18+
- CTX_MERMAID
19+
- CTX_JSON
20+
- CTX_QUERY
21+
22+
context_strategy: alpha
23+
24+
attachments:
25+
manifest: docs/_tech_graph/_manifest.json
26+
contract: docs/_tech_graph/_contract_manifest.json
27+
28+
payload_paths:
29+
CTX_JSON:
30+
main: docs/diary/jsonPKmermaid/fixtures/gate_ctx_ab_v1/payloads/CTX_JSON/main.graph.json
31+
CTX_MERMAID:
32+
main: docs/diary/jsonPKmermaid/fixtures/gate_ctx_ab_v1/payloads/CTX_MERMAID/main.mermaid_corpus.txt
33+
CTX_QUERY:
34+
dir: docs/diary/jsonPKmermaid/fixtures/gate_ctx_b_v1/payloads/CTX_QUERY
35+
attachments_dir: docs/diary/jsonPKmermaid/fixtures/gate_ctx_ab_v1/payloads/_shared
36+
gate_a_materialize: docs/diary/jsonPKmermaid/fixtures/gate_ctx_ab_v1/payloads/materialize_report.json
37+
38+
tasks_ref: docs/diary/jsonPKmermaid/fixtures/gate_ctx_ab_v1/tasks.json
39+
query_seeds_ref: docs/diary/jsonPKmermaid/fixtures/gate_ctx_b_v1/query_seeds.json
40+
system_ref: docs/diary/jsonPKmermaid/fixtures/gate_ctx_ab_v1/system.md
41+
42+
gate_a_behavior_ref: docs/diary/jsonPKmermaid/reports/conclusion_gate_ctx_ab_final_zh.md
43+
44+
provider: siliconflow
45+
model: deepseek-ai/DeepSeek-V4-Flash
46+
temperature: 0.2
47+
max_tokens: 4096
48+
49+
tools_policy: read_file_whitelist

0 commit comments

Comments
 (0)