@c4a/context 0.7.9 → 0.7.10-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/articleStructure.d.ts +254 -0
- package/docs/guides/agent-dialogue.md +1 -1
- package/docs/guides/code-indexer-skill-authoring.md +76 -178
- package/docs/guides/indexer-provider-and-customization.md +93 -453
- package/docs/guides/indexer-skill-creation.md +107 -97
- package/docs/guides/knowledge-updates.md +35 -14
- package/docs/guides/markdown-indexer-skill-authoring.md +57 -134
- package/docs/reference/indexer-provider-protocol.md +52 -102
- package/docs/reference/package-templates.md +39 -65
- package/docs/reference/template-variables.md +2 -3
- package/index.d.ts +6 -10
- package/index.js +6441 -8771
- package/indexerAgentStepProtocol.d.ts +0 -910
- package/indexerApprovedKnowledge.d.ts +98 -359
- package/indexerArticlePlan.d.ts +3 -26
- package/indexerArtifact.d.ts +201 -70
- package/indexerArtifactPolicy.d.ts +0 -18
- package/indexerArtifactResult.d.ts +240 -888
- package/indexerAuthoringFixture.d.ts +0 -13
- package/indexerBenchmark.d.ts +2 -2
- package/indexerCandidateCompile.d.ts +123 -167
- package/indexerCatalogFallback.d.ts +32 -374
- package/indexerCollectionMapping.d.ts +2 -2
- package/indexerContentLayers.d.ts +187 -41
- package/indexerContractOverlay.d.ts +30 -44
- package/indexerControlledInvocation.d.ts +6 -6
- package/indexerControlledProgram.d.ts +959 -3020
- package/indexerDependencyView.d.ts +96 -96
- package/indexerEffectiveArtifact.d.ts +381 -242
- package/indexerExampleDecision.d.ts +134 -134
- package/indexerExampleIdentity.d.ts +6 -6
- package/indexerExampleIdentityAudit.d.ts +6 -6
- package/indexerInventoryDisposition.d.ts +0 -39
- package/indexerLayerComposition.d.ts +1378 -852
- package/indexerLayoutChange.d.ts +24 -33
- package/indexerLayoutProposalSet.d.ts +143 -137
- package/indexerLayoutResolver.d.ts +116 -101
- package/indexerLayoutTransition.d.ts +6 -6
- package/indexerMainLifecycle.d.ts +1 -11
- package/indexerMainRunLedger.d.ts +0 -14
- package/indexerMainRunProtocol.d.ts +806 -2530
- package/indexerMainWorkset.d.ts +0 -1212
- package/indexerNavigationArtifactPlan.d.ts +2 -2
- package/indexerOverlayQuestionApplyProposal.d.ts +0 -4
- package/indexerParserCoordinate.d.ts +2 -2
- package/indexerParserExecutionPlan.d.ts +42 -42
- package/indexerPartitionPlan.d.ts +24 -354
- package/indexerPhysicalArtifactManifest.d.ts +12 -27
- package/indexerPostAuthorComposition.d.ts +2 -253
- package/indexerPostAuthorRunLedger.d.ts +860 -562
- package/indexerPrimaryProjection.d.ts +2 -2
- package/indexerPrimaryResultView.d.ts +0 -318
- package/indexerProfileContract.d.ts +200 -549
- package/indexerProgramExecutionAuthorization.d.ts +4 -4
- package/indexerProgramRunProtocol.d.ts +806 -2527
- package/indexerProjectProposal.d.ts +8 -8
- package/indexerProjectedArtifactFanOutAudit.d.ts +8 -8
- package/indexerProjectedArtifactPlan.d.ts +0 -9
- package/indexerProvider.d.ts +46 -288
- package/indexerProviderComposition.d.ts +16 -42
- package/indexerQuestionAuthority.d.ts +2 -82
- package/indexerReaderTargetInventory.d.ts +6 -6
- package/indexerRequirementLifecycle.d.ts +6 -6
- package/indexerResultReconciliation.d.ts +35 -149
- package/indexerSemanticInput.d.ts +10642 -4685
- package/indexerStructuredDeclaration.d.ts +24 -24
- package/indexerTemplateRendering.d.ts +239 -113
- package/knowledgeMap.d.ts +5 -5
- package/package.json +1 -1
- package/templates/package-templates/kb/skills/knowledge-query/SKILL.md +13 -16
- package/templates/package-templates.zh-CN/kb/skills/knowledge-query/SKILL.md +9 -9
- package/indexerArtifactDependencies.d.ts +0 -693
- package/indexerCompositionFactDependencies.d.ts +0 -16
- package/indexerExampleFactDependencies.d.ts +0 -17
- package/indexerIncrementalImpact.d.ts +0 -221
- package/indexerKnowledgeDependency.d.ts +0 -46
- package/indexerSubjectCatalog.d.ts +0 -230
- package/indexerSubjectKeyAuthority.d.ts +0 -786
|
@@ -17,11 +17,9 @@ as evidence rather than relying on memory or frontmatter summaries.
|
|
|
17
17
|
follow its links to a likely page.
|
|
18
18
|
3. Read only the sections needed for the question. Use frontmatter to select
|
|
19
19
|
scope, not to support factual claims.
|
|
20
|
-
4. For relationship or impact questions,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
5. Answer only from reader-visible section content and source-backed edge
|
|
24
|
-
records. Cite the supporting page or section.
|
|
20
|
+
4. For relationship or impact questions, read the relevant pages' explicit
|
|
21
|
+
explanations. Shared names, directory placement and links alone do not prove a relationship.
|
|
22
|
+
5. Answer from reader-visible section content and cite the supporting page or section.
|
|
25
23
|
6. If the package lacks evidence, report the gap and what was checked instead
|
|
26
24
|
of inferring from nearby content.
|
|
27
25
|
|
|
@@ -29,7 +27,7 @@ as evidence rather than relying on memory or frontmatter summaries.
|
|
|
29
27
|
|
|
30
28
|
| Root | Use |
|
|
31
29
|
|---|---|
|
|
32
|
-
| `{{wikisRoot}}/` |
|
|
30
|
+
| `{{wikisRoot}}/` | Code, business and product reference articles. |
|
|
33
31
|
| `{{guidesRoot}}/` | Architecture, procedures, FAQs, decisions, incidents, and troubleshooting. |
|
|
34
32
|
| `{{rulesRoot}}/` | Standards, constraints, acceptance criteria, and test scenarios. |
|
|
35
33
|
| `{{featsRoot}}/` | Feature knowledge when selected into the package. |
|
|
@@ -45,7 +43,7 @@ was not selected into this package.
|
|
|
45
43
|
| Named entity, API, domain, or action | Open the matching page or nearest group index. Show candidates if names are ambiguous. |
|
|
46
44
|
| Architecture, procedure, FAQ, decision, or incident | Start from `{{guidesRoot}}/index.md`. |
|
|
47
45
|
| Standard, constraint, acceptance, or test question | Start from `{{rulesRoot}}/index.md`. |
|
|
48
|
-
| Relationship or impact |
|
|
46
|
+
| Relationship or impact | Read the relevant explanations and state any coverage limits. |
|
|
49
47
|
| Detail inside a known page | Read the relevant Markdown heading and its body. |
|
|
50
48
|
| Coverage, gap, or inventory | Inspect the root indexes and `context-build-inventory.json`. |
|
|
51
49
|
|
|
@@ -59,16 +57,16 @@ Use each opened page or package artifact as an evidence card:
|
|
|
59
57
|
| Frontmatter title, description, and tags | Navigation and scope selection only. |
|
|
60
58
|
| Markdown headings | Locate and cite a section within its page. |
|
|
61
59
|
| Reader-visible section body | Primary support for factual claims. |
|
|
62
|
-
|
|
|
60
|
+
| Exported source attribution | Locate the original material when available; read it before extending a claim. |
|
|
63
61
|
| Root indexes and build inventory | Package scope and coverage evidence. |
|
|
64
62
|
|
|
65
63
|
Do not infer a relationship from page co-occurrence. Published pages do not need
|
|
66
64
|
production identifiers or source bookkeeping to be usable. Cite their readable
|
|
67
65
|
paths and headings; do not search for missing technical metadata or ask users
|
|
68
|
-
to supply it. Open the build inventory only for
|
|
66
|
+
to supply it. Open the build inventory only for coverage questions,
|
|
69
67
|
or when a maintainer needs to locate the original approved page via
|
|
70
|
-
`dist_path` → `approved_path`.
|
|
71
|
-
workspace's
|
|
68
|
+
`dist_path` → `approved_path`. Source attribution is exported automatically from
|
|
69
|
+
the workspace's fragment references. If the original material is
|
|
72
70
|
not bundled, answer only from the visible approved content and state its limits.
|
|
73
71
|
|
|
74
72
|
## Search Fallback
|
|
@@ -91,9 +89,8 @@ by headings and bounded line ranges, then returns paths, line ranges, headings,
|
|
|
91
89
|
and previews; it does not interpret meaning.
|
|
92
90
|
|
|
93
91
|
Treat every hit as a lead and open its page and section before answering. For
|
|
94
|
-
relationship or impact claims,
|
|
95
|
-
|
|
96
|
-
relationship evidence.
|
|
92
|
+
relationship or impact claims, cite the explanation that actually establishes
|
|
93
|
+
the relationship; BM25 scores and text co-occurrence do not establish it.
|
|
97
94
|
|
|
98
95
|
## Citations And Gaps
|
|
99
96
|
|
|
@@ -102,7 +99,7 @@ Use compact citations tied to claims:
|
|
|
102
99
|
```text
|
|
103
100
|
Page: <claim> [<root>/path/page.md]
|
|
104
101
|
Section: <claim> [<root>/path/page.md, heading: <visible heading>]
|
|
105
|
-
Relationship: <claim> [
|
|
102
|
+
Relationship: <claim> [<root>/path/page.md, heading: <supporting explanation>]
|
|
106
103
|
Coverage: <claim> [context-build-inventory.json]
|
|
107
104
|
```
|
|
108
105
|
|
|
@@ -122,7 +119,7 @@ from memory, previous conversations, or source files outside the package.
|
|
|
122
119
|
- The bundled OKF-compatible roots are the source of truth for this Skill.
|
|
123
120
|
- The package contains approved knowledge selected by its Context workspace; it
|
|
124
121
|
does not claim complete coverage of the underlying product or codebase.
|
|
125
|
-
- Do not scan every page
|
|
122
|
+
- Do not scan every page when a narrower indexed scope answers the
|
|
126
123
|
request.
|
|
127
124
|
|
|
128
125
|
Approved knowledge files: `{{knowledgeCount}}`
|
|
@@ -12,15 +12,15 @@ description: 查询 {{displayName}} 中经过审核、可追溯来源的知识
|
|
|
12
12
|
1. 判断请求属于实体查找、解释、流程、规则、关系、细节还是覆盖检查。
|
|
13
13
|
2. 从最相关的根索引开始,例如 `{{wikisRoot}}/index.md`,再沿链接进入具体页面。
|
|
14
14
|
3. 只读取回答所需的章节;frontmatter 用来选择范围,不作为事实依据。
|
|
15
|
-
4.
|
|
16
|
-
5.
|
|
15
|
+
4. 查询关系或影响范围时,读取相关页面中的明确说明;同名、目录位置或链接本身不能证明关系。
|
|
16
|
+
5. 结论来自可见章节正文,并引用对应页面或章节。
|
|
17
17
|
6. 如果包内没有证据,明确报告缺口和已经检查的范围,不要根据邻近内容推断。
|
|
18
18
|
|
|
19
19
|
## 知识根目录
|
|
20
20
|
|
|
21
21
|
| 根目录 | 用途 |
|
|
22
22
|
|---|---|
|
|
23
|
-
| `{{wikisRoot}}/` | 来自 codeindex、business、product
|
|
23
|
+
| `{{wikisRoot}}/` | 来自 codeindex、business、product 的代码、业务和产品说明。 |
|
|
24
24
|
| `{{guidesRoot}}/` | 架构、流程、FAQ、决策、故障和排障说明。 |
|
|
25
25
|
| `{{rulesRoot}}/` | 标准、约束、验收条件和测试场景。 |
|
|
26
26
|
| `{{featsRoot}}/` | 被选择进入包内的功能知识。 |
|
|
@@ -35,7 +35,7 @@ description: 查询 {{displayName}} 中经过审核、可追溯来源的知识
|
|
|
35
35
|
| 指定实体、API、领域或动作 | 打开匹配页面或最近的分组索引;有歧义时列出候选。 |
|
|
36
36
|
| 架构、流程、FAQ、决策或故障 | 从 `{{guidesRoot}}/index.md` 开始。 |
|
|
37
37
|
| 标准、约束、验收或测试 | 从 `{{rulesRoot}}/index.md` 开始。 |
|
|
38
|
-
| 关系或影响范围 |
|
|
38
|
+
| 关系或影响范围 | 阅读相关正文中的明确说明,并指出覆盖边界。 |
|
|
39
39
|
| 已知页面中的细节 | 读取相关 Markdown 标题及其正文。 |
|
|
40
40
|
| 覆盖范围或缺口 | 检查根索引和 `context-build-inventory.json`。 |
|
|
41
41
|
|
|
@@ -47,10 +47,10 @@ description: 查询 {{displayName}} 中经过审核、可追溯来源的知识
|
|
|
47
47
|
| frontmatter 的标题、描述和标签 | 导航和范围选择。 |
|
|
48
48
|
| Markdown 标题 | 定位和引用页面中的章节。 |
|
|
49
49
|
| 读者可见的章节正文 | 事实结论的主要依据。 |
|
|
50
|
-
|
|
|
50
|
+
| 导出的来源说明 | 原始材料可用时定位并阅读;不能只凭链接扩展结论。 |
|
|
51
51
|
| 根索引和构建清单 | 包的范围和覆盖情况。 |
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
不要根据页面同时出现来推断关系。直接引用可读路径和标题,不寻找已经移除的图谱字段,也不要求用户补齐。覆盖问题,或维护者需要通过 `dist_path` → `approved_path` 定位原批准页时,才读取构建清单。来源说明由工作区片段引用自动导出。原始材料未随包分发时,只根据已批准的可见正文回答并说明边界。
|
|
54
54
|
|
|
55
55
|
## 搜索兜底
|
|
56
56
|
|
|
@@ -62,7 +62,7 @@ node <当前 knowledge-query Skill 目录>/scripts/search.mjs --query '<关键
|
|
|
62
62
|
|
|
63
63
|
脚本位于知识包目录内时会自动定位 `{{packageName}}`。如果包管理工具将本 Skill 复制到了其他位置,增加 `--root <包含 context-build-inventory.json 的包目录>`;也可以使用 `--base <多包集合根目录>`,按构建清单中的包名定位。它按 Markdown 标题和固定行块机械切分,返回路径、行号、标题和短预览,不判断内容语义。
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
搜索命中只是线索。回答前打开命中的页面和章节;关系或影响范围须引用实际说明该关系的正文,不能用 BM25 分数或文本共现代替。
|
|
66
66
|
|
|
67
67
|
## 引用与缺口
|
|
68
68
|
|
|
@@ -71,7 +71,7 @@ node <当前 knowledge-query Skill 目录>/scripts/search.mjs --query '<关键
|
|
|
71
71
|
```text
|
|
72
72
|
页面: <结论> [<root>/path/page.md]
|
|
73
73
|
章节: <结论> [<root>/path/page.md, 标题:<可见标题>]
|
|
74
|
-
关系: <结论> [
|
|
74
|
+
关系: <结论> [<root>/path/page.md, 标题:<明确说明该关系的章节>]
|
|
75
75
|
覆盖: <结论> [context-build-inventory.json]
|
|
76
76
|
```
|
|
77
77
|
|
|
@@ -89,7 +89,7 @@ node <当前 knowledge-query Skill 目录>/scripts/search.mjs --query '<关键
|
|
|
89
89
|
|
|
90
90
|
- 包内兼容 OKF 的根目录是本 Skill 的事实来源。
|
|
91
91
|
- 本包只包含 Context 工作区选择并批准的知识,不声明完整覆盖底层产品或代码库。
|
|
92
|
-
-
|
|
92
|
+
- 已有更窄索引范围可以回答时,不要扫描所有页面。
|
|
93
93
|
|
|
94
94
|
已批准知识文件:`{{knowledgeCount}}`
|
|
95
95
|
|