with one click
bkn-backfill
将绑定/映射结果写回 .bkn 文件。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
将绑定/映射结果写回 .bkn 文件。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
数据权限管理技能:支持资源权限查询与权限申请。 先判定“查询权限”还是“申请权限”,再按资源类型执行对应接口。 当用户提出“申请权限”、“查是否有权限”、“给某资源授权”时使用。
Guides creation of BKN (Business Knowledge Network) definition files following v2.0.1 spec. Covers network, object_type, relation_type, action_type, concept_group. Use when creating knowledge networks, BKN files, object types, relation types, action types, concept groups, or when user asks to model business knowledge in BKN format. When kweaver-core is also loaded, use it to run kweaver CLI (auth, bkn push) after files exist.
数据分析员工(Data Analyst Agent)的唯一总入口:凡与数据资产、取数、指标、表/视图、 治理职责、知识网络等相关的问题,必须先经本 skill 做编排与路由,再进入找表或问数等子流程。 当用户提出数据类问题、需要知识网络选择、或需要在找表与问数之间切换时使用。
向飞书指定用户(通过 user_id)推送消息。 支持文本、卡片、图片、文件等多种消息类型。当用户需要给飞书用户发送推送消息时自动使用。
全局归档协议。只要任务需要写入任何文件(含 PLAN.md、报告、JSON 等归档物),必须按本技能执行 Session→ARCHIVE_ID、TIMESTAMP、双轨路径(根段须为 archives/)、回读校验与状态回执;WebUI 的 archive_grid 必须用 Markdown 中语言标识为 json 的围栏代码块输出。
KWeaver CLI 操作层 — 内化自 kweaver-core。 覆盖认证、平台业务域(config)、知识网络管理与查询、Agent CRUD 与对话、 数据源管理、数据视图、Skill 注册、Vega 可观测、context-loader 语义搜索、通用 API 调用。 仅由 bkn-creator pipeline 内部读取,不独立注册到宿主 skill 系统。
| name | bkn-backfill |
| description | 将绑定/映射结果写回 .bkn 文件。 |
公约:../_shared/contract.md
把 bkn-bind 和 bkn-map 的结果合并,写回 .bkn 文件,完成数据视图绑定闭环。
binding_decision_list:对象级绑定结果property_mapping_draft:属性级映射结果relation_binding_result:bkn-relation-bind 的输出(关系类型 + 中间视图)relation_mapping_draft:bkn-map 的关系类映射结果network_dir:网络目录(.bkn 文件位于 {network_dir}/bkn/){network_dir}/pipeline_state.yaml(文件不存在时视为 map_completed 缺失)map_completed == true → 继续map_completed == skipped(bind_mode == deferred 场景)→ 记录 map_status: skipped (deferred),继续map_completed 不存在或为 false:
pipeline_state.yaml 中追加 skipped_steps: [bkn-map],输出警告后继续"bkn-backfill 需要 bkn-map 先执行完成(map_completed 未就绪)。请 pipeline 调度 bkn-map 后再调用本 skill。"存储位置: local 的对象(本地对象无需数据视图绑定,不参与回填)view_id)-(保留属性定义,便于后续补绑);用户可指定删除该行rename_map:{object_id: {old_property_name → new_property_name}}
bkn-map 的 property_regen_summary.rename 动作(draft 属性名 → 视图字段名){network_dir}/bkn/relation_types/*.bkn 的 Mapping Rules,将 Source Property / Target Property 中引用了已重命名属性的值替换{network_dir}/bkn/action_types/*.bkn 的 Parameter Binding / Pre-conditions,将 Binding 列中引用了已重命名属性的值替换relation_binding_result 中 status: confirmed 的关系directdata_viewrelation_mapping_quality: blocked 的关系(在输出中标记)../_shared/prepush-validation.md):
relation_types 的 Source/Target Property 是否存在于对应对象的 Data Propertiesaction_types 的 Parameter Binding 属性是否存在于绑定对象的 Data Propertieslocal 对象跳过属性存在性检查,但仍参与对象存在性检查pending 关系仅 warning,不阻断{network_dir}/bkn/ 下对应的 .bkn 文件)backfill_plan:
binding_replacements: [{object, old_value, new_view_id}]
property_changes: [{object, property, action, layer}]
cascade_renames: [{file, table, old_ref, new_ref}]
# 新增:关系类回填计划
relation_replacements:
- 关系ID: ""
关系名称: ""
关系类型: direct | data_view
actions:
- action: "" # fill_endpoint_type / fill_mapping_view / fill_source_mapping / fill_target_mapping
target_section: "" # Endpoint / Mapping View / Source Mapping / Target Mapping
old_value: ""
new_value: ""
skipped_local_objects: [对象名]
skipped_pending_relations: [关系名] # pending 关系,跳过回填
map_gate: {map_completed: true|false|skipped, user_skipped_map: true|false, blocked_for_map: true|false}
prepush_validation: {status, errors} # 写入前预检结果
backfill_status: success | partial | failed
verification:
files_checked: 0
fields_replaced: 0
cascade_refs_fixed: 0
relations_filled: 0 # 新增:已回填的关系数量
pending_relations: 0 # 新增:pending 关系数量
issues: []
../_shared/prepush-validation.md 预检,失败则阻断写入map_completed == true 或 skipped,否则阻断并回交 pipeline 调度