Language and Framework Quick Reference
2026-09-06 18:18:18作者:温艾琴Wonderful
Language and Framework Quick Reference
Use these hints to improve tag and edge accuracy. These supplement your training knowledge.
| Signal | Tag(s) | Note |
|---|---|---|
File in hooks/, exports function starting with use |
hook, service |
React custom hook |
File in contexts/, exports a Provider |
service, state |
React context |
File in pages/ or views/ |
ui, routing |
Page-level component |
File in store/, slices/, reducers/ |
state |
State management |
File in services/, api/ |
service |
Data-fetching / API client |
__init__.py with re-exports |
entry-point, barrel |
Python package root |
manage.py at project root |
entry-point |
Django management entry |
File named mod.rs |
barrel |
Rust module barrel |
File named main.go in cmd/ |
entry-point |
Go binary entry |
For React: create depends_on edges from components to hooks they call. Create publishes/subscribes edges for Context provider/consumer patterns.
### 编排层面的改动
SKILL.md Phase 2 的 "Build the combined prompt template" 块中删除第 2、3 步:
- **删除** Step 2(语言上下文注入:按检测语言读取 `./languages/<language-id>.md`);
- **删除** Step 3(Framework 附件注入:按检测框架读取 `./frameworks/<framework-id>.md`);
- **保留** Step 1(读取基础模板 `./file-analyzer-prompt.md`)。
Phase 4 的附件注入步骤**保持不变**(只运行一次)。
### Token 节省估算
| | 批次数 | 附件 Token/批 | 合计 |
|---|---|---|---|
| Before(C2 之后) | 20 | ~1,300(TS+React) | ~26,000 |
| After | 20 | ~150(内联速查表) | ~3,000 |
| **节省** | | | **~23,000** |
---
## 六、C4 — 瘦身 Phase 4 与 Phase 5 的载荷
**消除的根因**:Phase 5(tour builder)接收全部节点(file + function + class)与全部边(imports + contains + calls + exports + ...)。对一个 500 文件项目,这可能包含 **1,500+ 节点和 3,000+ 边**——而其中绝大多数数据对 tour 设计并无用处。
### Phase 4(Architecture Analyzer)— 轻度修剪
Phase 4 本就只发送文件类型节点(方向正确),只需显式地从每个节点对象中剥掉 `languageNotes`(对分层判断无用且冗长)和 `name`(恒等于 `filePath` 的 basename,可随时推导)。
- **Before per node**:`{id, name, filePath, summary, tags, complexity, languageNotes?}`
- **After per node**:`{id, filePath, summary, tags}`
节省约 15-20% 的每节点 Token,Phase 4 总计约 3,000-5,000 Token。
### Phase 5(Tour Builder)— 主要修剪
编排器注入 tour-builder 子代理的数据做三项变更:
**1. 仅保留文件节点(剥离 function/class 节点)**
Tour 通过节点 ID 做 wayfinding,实际运行中 tour 步骤永远引用 `file:` 节点——function/class 节点只会出现在 dashboard 的 NodeInfo 侧栏中,tour 本身停留在文件层级导航。
- **Before**:全部节点(file + function + class),500 文件可能 1,500+ 节点;
- **After**:仅 file 类型节点——500 个。
**2. 精简节点格式**
tour-builder 脚本的图计算只用节点 ID、name、type。summary/tags 是 Phase 2(教学叙事撰写)的输入,应当从注入载荷中剥离可选的重字段:
- **Before per node**:`{id, name, filePath, summary, type, tags, complexity, languageNotes?}`
- **After per node**:`{id, name, filePath, summary, type}`(去掉 tags、complexity、languageNotes)
**3. 精简边与层**
Tour 的 BFS 遍历只走 `imports` 与 `calls` 两种边;`contains`、`exports`、`tested_by`、`depends_on` 等对遍历毫无增益,只会撑大载荷。层数据只用于决定叙事弧(先介绍哪一层、再介绍哪一层),不需要完整 `nodeIds` 数组。
- **Before edges**:全部边类型(~3,000+ 条,含到 function/class 节点的全部 `contains` 边);
- **After edges**:仅 `imports` 与 `calls`(典型项目约 400-800 条);
- **Before per layer**:`{id, name, description, nodeIds: [...hundreds of IDs]}`;
- **After per layer**:`{id, name, description}`(去掉 nodeIds)。
### Phase 5 节省估算
| 数据 | Before | After |
|---|---|---|
| 节点数 | ~1,500 × ~180 chars | ~500 × ~120 chars |
| 节点 Token | ~67,500 | ~15,000 |
| 边数 | ~3,000 × ~80 chars | ~600 × ~80 chars |
| 边 Token | ~60,000 | ~12,000 |
| 层 Token | ~5,000 | ~500 |
| **Phase 5 合计** | **~132,500** | **~27,500** |
| **节省** | | **~105,000** |
### SKILL.md 中的对应改动
Phase 4 派发模板的文件节点格式:
File nodes: [list of {id, filePath, summary, tags} for all file-type nodes]
Phase 5 派发模板的三段载荷规格:
Nodes (file nodes only): [list of {id, name, filePath, summary, type} for all file-type nodes only — do NOT include function or class nodes]
Key edges (imports and calls only): [list of edges where type is "imports" or "calls" only]
Layers: [list of {id, name, description} — omit nodeIds]
登录后查看全文
热门项目推荐
相关项目推荐
atomcodeClaude Code 的开源替代方案。连接任意大模型,编辑代码,运行命令,自动验证 — 全自动执行。用 Rust 构建,极致性能。 | An open-source alternative to Claude Code. Connect any LLM, edit code, run commands, and verify changes — autonomously. Built in Rust for speed. Get StartedRust0624
Hy4-previewHy4 preview 是由腾讯混元团队研发的新一代混合专家(MoE)旗舰模型。模型总参数量 770B,每个 token 激活 49B,主干共包含78层,第一层采用标准 FFN,其余 77 层均为 MoE 结构,每层包含 256 个路由专家与 1 个共享专家,每个 token 激活 top-8 路由专家及共享专家。主干之外原生内置 1 层 MTP(总参数量 10B,激活 0.7B)以支持投机解码。Python00
GLM-5.3GLM-5.3 与 GLM-5.2 使用相同的基座模型——所有提升均来自后训练。与 GLM-5.2 相比,它在复杂编程和长程任务上的表现显著提升。Jinja00
GLM-5.3-FlashGLM-5.3-Flash (320B-A18B),是GLM-5系列的首个原生多模态模型。320B总参数,能力超过GLM-5.2Jinja00
Spark-X2.5-4BSpark-X2.5-4B 旨在让强大的 AI 更实用、更高效、更易获得。在广泛日常任务中表现强劲,涵盖对话、写作、翻译、推理、编码、工具调用以及智能体工作流,并在同等规模的开源模型中取得领先成绩。Spark-X2.5 将面向效率的架构与最高 1M tokens 的原生上下文窗口相结合,并支持 200 多种语言。Python00
Spark-X2.5-1.7BSpark-X2.5-1.7B 旨在让强大的 AI 更加实用、高效且易于获取。这些模型在广泛的日常任务中表现出色,涵盖对话、写作、翻译、推理、编程、工具调用和智能体工作流,并在同等规模的开源模型中取得领先结果。Spark-X2.5 将面向效率的架构与最高 1M tokens 的原生上下文窗口相结合,并支持 200 多种语言。Python00
最新内容推荐
LobeHub deep-review 对抗式验证子代理:逐条证伪代码审查发现的设计与实现AutoGen Python 文档构建实战:Sphinx + MyST + Poe 的本地构建与开发管线Go 项目目录布局详解:project-layout 标准目录结构的设计原则与实操指南CrewAI FirecrawlScrapeWebsiteTool 完全指南:让 Agent 把任意网站抓成干净 MarkdownSupabase pm-the-docs:文档创作 Frame/Shape 阶段的决策支持技能——受众、产品阶段与跨仓库范围判定Headroom 贡献指南全解:从 PR 工作流、Real behavior proof 到本地开发环境与架构原则free-programming-books 芬兰语免费编程书目全解:fi 列表中 C 到 Ruby 的完整学习资源地图Playwright Response 类详解:HTTP 响应的获取、断言与源码级实现原理Material UI Transitions 主题机制详解:用 theme.transitions 定制一致的 CSS 过渡动画Svelte `<svelte:document>` 详解:Document 级事件监听、属性绑定与 Attachments 用法
项目优选
收起
deepin linux kernel
C
33
18
作为 Ascend for PyTorch 社区的核心组件,TorchNPU 是昇腾专为 PyTorch 打造的深度学习适配插件,使 PyTorch 框架能够直接调用昇腾 NPU,为开发者提供昇腾 AI 处理器的超强算力。
Python
855
1.34 K
openEuler内核是openEuler操作系统的核心,既是系统性能与稳定性的基石,也是连接处理器、设备与服务的桥梁。
C
528
589
🔥LeetCode solutions in any programming language | 多种编程语言实现 LeetCode、《剑指 Offer(第 2 版)》、《程序员面试金典(第 6 版)》题解
Markdown
77
23
本项目是CANN提供的transformer类大模型算子库,实现网络在NPU上加速计算。
C++
1.13 K
2.73 K
暂无描述
Markdown
895
5.79 K
JiuwenSwarm 是一款基于openJiuwen开发的智能AI Agent,它能够将大语言模型的强大能力,通过你日常使用的各类通讯应用,直接延伸至你的指尖。
Python
3.56 K
1.01 K
CANN 学习中心仓,支持在线互动运行、边学边练,提供教程、示例与优化方案,一站式助力昇腾开发者快速上手。
Jupyter Notebook
998
511
本项目是CANN提供的神经网络类计算算子库,实现网络在NPU上加速计算。
C++
908
1.83 K
openGauss kernel ~ openGauss is an open source relational database management system
C++
213
313