knowledge-construction
Routes KAG project setup, schema commit, builder-chain, and index-selection workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- knowledge-construction
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Routes KAG project setup, schema commit, builder-chain, and index-selection workflows.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/data-and-configuration.md2.8 KB
- 参考文档references/troubleshooting.md3.9 KB
- 参考文档references/workflows.md3.2 KB
- 脚本scripts/validate_project_layout.py7.6 KB
03 SKILL.md 正文
Knowledge Construction
Use this sub-skill when the user wants to prepare or inspect a KAG project before query-time use.
Triggers
Common requests include:
- create or restore a project from
kag_config.yaml - commit a schema to the project server
- choose builder chains, readers, splitters, extractors, vectorizers, or writers
- inspect or compare index managers
- validate that a project layout is safe before building
- debug checkpointed builder runs or layout mismatches
Start here
- Read
references/workflows.mdfor the command sequence and builder lifecycle. - Run
scripts/validate_project_layout.pybefore any live build or schema mutation. - Read
references/data-and-configuration.mdfor builder config keys, index choices, and file-layout assumptions. - Read
references/troubleshooting.mdwhen a namespace, schema filename, config key, or writer mode looks wrong.
What belongs here
This sub-skill owns the tasks that turn source data into a KAG project and knowledge graph:
knext project create|restore|update|listknext schema commitknext schema reg_concept_rule- builder chain selection and local preflight checks
- index-manager choice for chunk, summary, table, outline, atomic-query, or hybrid retrieval
- domain-knowledge injection and other build-time graph preparation
What does not belong here
- Query-time answering or trace diagnosis goes to
question-answering. - MCP server launch, distributed job submission, or benchmark planning goes to
mcp-and-automation. - Generic install/import issues go to the root troubleshooting files.
Working rule
Prefer a safe local check first. If the layout or config is obviously wrong, fix the local project structure or report the mismatch before touching any server-mutating command.
Common decisions
- If the namespace and schema filename disagree, stop before
knext schema commit. - If a custom builder component is mentioned, make sure its module is imported before registry construction.
- If a writer is destructive, confirm intent before any build or injection run.
- If a build failure looks resumable, inspect the checkpoint before deleting anything.
- If index selection is unclear, compare cost and retrieval depth before choosing the hybrid route.
What a good answer should include
- the project folder and schema file that will be touched
- the exact chain or index manager that fits the data shape
- the minimum safe preflight to run before a live command
- whether any checkpoints, deletions, or server writes are involved
- the next command to run only after the local layout is consistent
Stop conditions
Stop and ask for confirmation when the task would:
- create or restore a project against the wrong server
- commit a schema that does not match the namespace
- use a destructive writer mode
- require an unavailable external service or a missing custom component
Bundled helpers
scripts/validate_project_layout.py— checks that the project layout, namespace, schema file, and builder folders line up before a build.references/data-and-configuration.md— use this when choosing a builder chain or index manager.references/troubleshooting.md— use this when project creation, schema commit, or checkpoint handling fails.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).