This entry point consolidates the most commonly used retrieval order and output constraints for Qoder scenarios into a single file, preventing deviations when the platform side lacks additional guidance files.
Local resource discovery
This skill should not hard-code the path of any single machine. Each time a Kingscript task is entered, first resolve the local resource root directory in the following order:
- Prefer reading the one in the same directory as the skill
local-paths.json - If not present, then read the workspace's
AGENTS.mdor similar local documentation files to find the local resource path declared by the user - If still not present, then try default directory discovery
Only when the path from the previous step actually exists is it allowed to continue being used; if it does not exist, continue downgrading, and do not directly assume the directory must be there.
local-paths.json conventions
File location:
- Under the skill installation directory
local-paths.json
Suggested fields:
workspace_rootrepo_rootreferences_rootdocs_rootexamples_rootsdk_roottemplates_rootlanguage_rootjava_sample_jarbos_docs_path
Default directory discovery
Only when local-paths.json and the workspace documentation file both fail to provide a usable path, try in the following order:
- Whether
references/examples、references/sdk、references/templates - The current workspace's
kingscript-code-generator/references - Whether in the current workspace's parent or sibling directory there exists a repository copy named
kingscript-code-generatorrepository copy
Fixed entry points after resolution
<references_root>\docs\README.md<references_root>\docs\custom-development\README.md<references_root>\docs\custom-development\脚本控制器开发指南.md<examples_root>\README.md<examples_root>\plugins\README.md<templates_root>\README.md<sdk_root>\README.md<sdk_root>\strategy.md<sdk_root>\indexes\class-index.md<sdk_root>\indexes\method-index.md<sdk_root>\indexes\methods-by-name.md<sdk_root>\indexes\scenario-index.md<sdk_root>\indexes\keyword-index.md<language_root>\README.md
Recommended retrieval order
- First resolve
references_root / docs_root / examples_root / sdk_root / templates_root / language_root - When the user mentions
KWC、脚本控制器、controller、REST API、Web API, first look at:<references_root>\docs\custom-development\脚本控制器开发指南.md - First look at the closest code examples:
<examples_root> - When a starting skeleton is needed, look at:
<templates_root>\README.md - When SDK semantics are involved, look at:
<sdk_root>\README.md、<sdk_root>\indexes\ - When syntax, keywords, and naming rules are involved, look at:
<language_root>\README.md
Fallback search order
- First open the target directory's
README.md - Then check whether the file name can already locate it directly
- When only the class name, method name, or event name is known, first return to
<sdk_root>\indexes\ - When only the scenario is known, first return to
<examples_root>\plugins\README.mdand the corresponding "scenario breakdown" directory README - If still insufficient, then perform keyword search on
<references_root>perform keyword search - When both indexes and examples are insufficient, then fall back to
<sdk_root>\manifests\ - When still insufficient, then look at the local
.d.ts、jardecompilation results or online Javadoc
Local search methods
- Prefer
rg --filesorrg -n - If
rgis unavailable or permission errors occur, switch to PowerShell:
Get-ChildItem -Path '<references_root>' -Recurse -Include *.md |
Select-String -Pattern 'SearchEnterEvent|EntryGridBindDataEvent|AbstractReportFormPlugin' -Encoding UTF8
- If you need to find the Java source from
jar, use:
jar tf '<java_sample_jar>' | Select-String 'SearchSample|TreeViewSample|ReportColumnMergePlugin'
Task routing under Qoder
- User asks "how to write this code": first go to
<examples_root> - User asks "how to configure, write, and deploy a KWC controller / script controller": first go to
<references_root>\docs\custom-development\脚本控制器开发指南.md - User asks "what is this class/event": first go to
<sdk_root>\classes\or<sdk_root>\packages\ - User asks "which plugin should I start from": first go to
<templates_root> - User pastes an error or exception: first go to
<sdk_root>\indexes\error-index.md - When repository materials are insufficient and an external knowledge drive is mounted locally: follow
<sdk_root>\strategy.mdto enter the external extension layer, first read*-description.md, and when code and pitfalls are needed, then read*-example.md - If
local-paths.jsonis configured inbos_docs_path, treat it as the main entry point of the external knowledge base; only enter it when the materials in the repository are insufficient
Output rules
- First explain the scenario, then provide the code or conclusion.
- Declare key assumptions before the code.
- Before generating code, first confirm the import paths of every external class, helper class, event class, enum, and utility class.
- Before the final output, you must self-check that all non-global symbols are explicitly imported, and must not rely on the IDE or editor for automatic imports.
- If a symbol does not need to be imported, you must explain that it is a runtime global, locally defined in the current file, or automatically injected by the framework.
- You must point out risk points and items to be confirmed.
- Prioritize reusing the examples and templates in this skill; do not invent APIs out of thin air.
- When local knowledge is insufficient, degrade according to
indexes -> classes/packages -> manifests -> 外部知识盘(可选) -> 本地 .d.ts -> 在线 Javadoc. - For methods related to page prompts, notifications, and message boxes, first return to
IFormViewor the local declaration layer to confirm, then decide whether they are usable. - Before calling
obj.method(), you must confirm thatmethodbelongs toobjthe current type or its declaration inheritance chain; you must not directly apply methods from other event parameters or context objects. - When generating code, you must not write event parameters as
any; if the current version declaration only providesBizDataEventArgsor$.java.util.EventObject, you must also output them as declared.
Prohibitions
- Do not fabricate Kingscript APIs, event names, or context objects.
- Do not assume by default that Java open capabilities are necessarily available.
- Do not ignore permissions, organization, tenant, account set, and lifecycle boundaries.