@c4a/context 0.6.19 → 0.7.1
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/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/codeIndexPlan.d.ts +34 -0
- package/docs/README.md +7 -0
- package/docs/README.zh-CN.md +5 -0
- package/docs/getting-started.md +30 -24
- package/docs/guides/agent-guide.md +41 -46
- package/docs/guides/code-indexer-skill-authoring.md +124 -0
- package/docs/guides/indexer-provider-and-customization.md +140 -0
- package/docs/guides/markdown-indexer-skill-authoring.md +118 -0
- package/docs/reference/code-extractors.md +9 -24
- package/docs/reference/indexer-provider-protocol.md +808 -0
- package/docs/reference/project-api.md +41 -40
- package/index.d.ts +47 -1
- package/index.js +28010 -3945
- package/indexerAgentStepProtocol.d.ts +9391 -0
- package/indexerArtifactDependencies.d.ts +689 -0
- package/indexerArtifactPolicy.d.ts +335 -0
- package/indexerArtifactResult.d.ts +2009 -0
- package/indexerAuditFacts.d.ts +66 -0
- package/indexerAuditOverrideReadiness.d.ts +27 -0
- package/indexerAuditProtocol.d.ts +238 -0
- package/indexerAuditRevision.d.ts +726 -0
- package/indexerAuditRevisionActions.d.ts +236 -0
- package/indexerAuthoringFixture.d.ts +152 -0
- package/indexerBaseQuestionAmendment.d.ts +2403 -0
- package/indexerBenchmark.d.ts +1062 -0
- package/indexerCandidateCompile.d.ts +985 -0
- package/indexerCapabilityGroupEvidence.d.ts +129 -0
- package/indexerCatalogFallback.d.ts +1262 -0
- package/indexerCollectionMapping.d.ts +75 -0
- package/indexerContentLayers.d.ts +137 -0
- package/indexerContractOverlay.d.ts +879 -0
- package/indexerControlledInvocation.d.ts +512 -0
- package/indexerControlledProgram.d.ts +12535 -0
- package/indexerCoreExports.d.ts +21 -0
- package/indexerCustomizationDraft.d.ts +13800 -0
- package/indexerCustomizationLadder.d.ts +103 -0
- package/indexerDependencyView.d.ts +1610 -0
- package/indexerEvidenceAdapterResult.d.ts +504 -0
- package/indexerExampleDecision.d.ts +1606 -0
- package/indexerExampleIdentity.d.ts +132 -0
- package/indexerExampleIdentityAudit.d.ts +70 -0
- package/indexerExampleLinkageAudit.d.ts +80 -0
- package/indexerGeneratedAuthoringAudit.d.ts +208 -0
- package/indexerIncrementalImpact.d.ts +221 -0
- package/indexerInventoryDisposition.d.ts +443 -0
- package/indexerLayerComposition.d.ts +1652 -0
- package/indexerLayoutChange.d.ts +329 -0
- package/indexerLayoutProposalSet.d.ts +447 -0
- package/indexerLayoutResolver.d.ts +342 -0
- package/indexerLayoutTransition.d.ts +247 -0
- package/indexerLifecycle.d.ts +53 -0
- package/indexerMainLifecycle.d.ts +258 -0
- package/indexerMainRunLedger.d.ts +888 -0
- package/indexerMainRunProtocol.d.ts +6471 -0
- package/indexerMainWorkset.d.ts +2141 -0
- package/indexerMaterialAnswer.d.ts +738 -0
- package/indexerMaterialAnswerActualization.d.ts +91 -0
- package/indexerMaterialAnswerExecutionPlan.d.ts +2887 -0
- package/indexerMaterialAnswerFlow.d.ts +63 -0
- package/indexerMaterialAnswerLayout.d.ts +76 -0
- package/indexerMaterialAnswerReview.d.ts +217 -0
- package/indexerMaterialAnswerReviewRoute.d.ts +6145 -0
- package/indexerMaterialAnswerRunLedger.d.ts +918 -0
- package/indexerMaterialAnswerRunProtocol.d.ts +1253 -0
- package/indexerMaterialGapLedger.d.ts +3111 -0
- package/indexerMaterialQuestionExclusion.d.ts +129 -0
- package/indexerMaterialQuestionWorkset.d.ts +508 -0
- package/indexerNavigationArtifactGraph.d.ts +5 -0
- package/indexerNavigationArtifactPlan.d.ts +39 -0
- package/indexerOverlayQuestionAmendment.d.ts +2551 -0
- package/indexerOverlayQuestionApplyProposal.d.ts +4697 -0
- package/indexerParserCoordinate.d.ts +222 -0
- package/indexerParserFactView.d.ts +503 -0
- package/indexerPartitionConvergence.d.ts +496 -0
- package/indexerPartitionPlan.d.ts +919 -0
- package/indexerPartitionStrategyResolution.d.ts +594 -0
- package/indexerPhysicalArtifactAudit.d.ts +247 -0
- package/indexerPhysicalArtifactManifest.d.ts +449 -0
- package/indexerPlannedMaterialAnswer.d.ts +116 -0
- package/indexerPostAuthorComposition.d.ts +2000 -0
- package/indexerPostAuthorRunLedger.d.ts +1972 -0
- package/indexerPrimaryProjection.d.ts +262 -0
- package/indexerProfileContract.d.ts +3034 -0
- package/indexerProfileMetricAudit.d.ts +218 -0
- package/indexerProgramExecutionAuthorization.d.ts +227 -0
- package/indexerProgramRunProtocol.d.ts +7642 -0
- package/indexerProjectProposal.d.ts +2807 -0
- package/indexerProjectedArtifactFanOutAudit.d.ts +159 -0
- package/indexerProjectedArtifactPlan.d.ts +217 -0
- package/indexerProtocolCommon.d.ts +29 -0
- package/indexerProvider.d.ts +2510 -0
- package/indexerProviderComposition.d.ts +1357 -0
- package/indexerProviderContractReferences.d.ts +13 -0
- package/indexerProviderProfileResolution.d.ts +20 -0
- package/indexerProviderResolution.d.ts +752 -0
- package/indexerProviderResolutionAction.d.ts +678 -0
- package/indexerProviderRouting.d.ts +3909 -0
- package/indexerProviderSelectionProposal.d.ts +3311 -0
- package/indexerQuestionAuthority.d.ts +419 -0
- package/indexerReaderTargetInventory.d.ts +161 -0
- package/indexerReferenceOnlyAudit.d.ts +90 -0
- package/indexerRegistry.d.ts +3019 -0
- package/indexerRequirementComparison.d.ts +44 -0
- package/indexerRequirementConfirmation.d.ts +1193 -0
- package/indexerRequirementLifecycle.d.ts +3314 -0
- package/indexerRestrictedSelector.d.ts +63 -0
- package/indexerResultReconciliation.d.ts +6844 -0
- package/indexerResultReconciliationRun.d.ts +15 -0
- package/indexerRunEnvelope.d.ts +384 -0
- package/indexerRunProtocolCommon.d.ts +21 -0
- package/indexerSharedArtifactFingerprint.d.ts +33 -0
- package/indexerStructuredDeclaration.d.ts +513 -0
- package/indexerSubjectCatalog.d.ts +230 -0
- package/indexerSubjectIdentity.d.ts +19 -0
- package/indexerSubjectKeyAuthority.d.ts +785 -0
- package/indexerTemplateRendering.d.ts +485 -0
- package/indexerToolSnapshot.d.ts +431 -0
- package/indexerWorksetRead.d.ts +287 -0
- package/package.json +1 -1
- package/phases.d.ts +1 -1
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Markdown Indexer Skill authoring
|
|
2
|
+
|
|
3
|
+
Markdown Providers use the same `context.indexer.provider/v1` manifest,
|
|
4
|
+
versioning, Bundle, requirement, trust, Result and customization contracts as
|
|
5
|
+
Code Providers. Read the shared
|
|
6
|
+
[Code Indexer author checklist](./code-indexer-skill-authoring.md) and
|
|
7
|
+
[Provider selection/customization guide](./indexer-provider-and-customization.md)
|
|
8
|
+
first. This page defines the Markdown-specific boundary.
|
|
9
|
+
|
|
10
|
+
## Capture before semantics
|
|
11
|
+
|
|
12
|
+
Capture owns source authorization, retrieval, revision identity, complete bytes,
|
|
13
|
+
Markdown/MDX parsing and evidence spans. A Markdown Indexer starts only from a
|
|
14
|
+
current captured source report and authorized evidence view. URLs, titles,
|
|
15
|
+
filenames, headings and capture success are activation candidates, not semantic
|
|
16
|
+
classification or proof that the whole document was read.
|
|
17
|
+
|
|
18
|
+
The Provider cannot fetch the document again, follow new links, rewrite source
|
|
19
|
+
revisions or widen capture scope. Missing/unsupported capture capability is an
|
|
20
|
+
explicit unsupported result, never a prose fallback.
|
|
21
|
+
|
|
22
|
+
## Activation and source roles
|
|
23
|
+
|
|
24
|
+
Declare document activation signals and map evidence-backed sources to declared
|
|
25
|
+
roles such as authoritative, explanatory, operational, decision or example
|
|
26
|
+
material. Keep role selection separate from collection placement. One document
|
|
27
|
+
may support multiple reader questions, but every consumed span retains its
|
|
28
|
+
source/revision identity and cannot be promoted to a stronger authority by an
|
|
29
|
+
instruction.
|
|
30
|
+
|
|
31
|
+
## Section projection and collection mapping
|
|
32
|
+
|
|
33
|
+
Author Results propose logical Sections and their intent; they do not write
|
|
34
|
+
`knowledge/` paths. Each Section binds:
|
|
35
|
+
|
|
36
|
+
- the canonical SubjectKey/Node target or an explicit independent target;
|
|
37
|
+
- its reader-question refs and exact evidence spans;
|
|
38
|
+
- an Artifact kind and Section key stable across content-only changes;
|
|
39
|
+
- a projection intent describing purpose, not a physical filename;
|
|
40
|
+
- structured content layers and their digests.
|
|
41
|
+
|
|
42
|
+
Context owns the closed mapping from profile/Section intent to collection and
|
|
43
|
+
path. The layout resolver reuses an existing Artifact by stable identity,
|
|
44
|
+
detects add/remove/rename/split/merge/move changes and requests a human Gate
|
|
45
|
+
only for destructive or ambiguous existing-layout changes. A Provider cannot
|
|
46
|
+
avoid that Gate by emitting a path or relabeling the change.
|
|
47
|
+
|
|
48
|
+
## Reusing Code Nodes
|
|
49
|
+
|
|
50
|
+
Use the supplied subject catalog and TargetResolutionView. Equal SubjectKeys use
|
|
51
|
+
the same NodeRef across Code and Markdown. `resolved` enriches the existing
|
|
52
|
+
Node; `absent` may create an explicitly independent subject or a material gap;
|
|
53
|
+
`ambiguous` fails before authoring. Titles, heading similarity and filenames
|
|
54
|
+
are never identity fallback. Unrelated catalog changes must not make a workset
|
|
55
|
+
stale.
|
|
56
|
+
|
|
57
|
+
## Artifact and Section planning
|
|
58
|
+
|
|
59
|
+
One logical unit may produce an Artifact Bundle with multiple meaningful
|
|
60
|
+
Sections or semantic split Artifacts. Do not use fixed-count, ordinal or
|
|
61
|
+
alphabetic batches. Do not create one page per heading/member or inflate page
|
|
62
|
+
count to satisfy a metric. The CLI owns Artifact-policy eligibility, physical
|
|
63
|
+
fan-out audit, layout actualization and the final Candidate compile.
|
|
64
|
+
|
|
65
|
+
Each Section carries exact positive and negative dependency refs. Incremental
|
|
66
|
+
impact is Section/Artifact-local: a source membership, question denominator,
|
|
67
|
+
candidate pool, evidence span or run-envelope change invalidates only the
|
|
68
|
+
dependent scope. A Provider must not replace this with source-wide or
|
|
69
|
+
collection-wide recomputation.
|
|
70
|
+
|
|
71
|
+
## Editorial policy
|
|
72
|
+
|
|
73
|
+
Editorial instructions may guide clarity, consolidation, ordering and
|
|
74
|
+
reader-facing terminology. They cannot alter facts, evidence, source role,
|
|
75
|
+
requirement scope, protected values, revision identity, collection authority or
|
|
76
|
+
hard metrics. Deterministic blocks render only registered facts; semantic prose
|
|
77
|
+
must cite consumed evidence. Placeholders, speculation, fabricated transitions
|
|
78
|
+
and “content unavailable” pages are invalid even when the structure looks rich.
|
|
79
|
+
|
|
80
|
+
## Material questions and answers
|
|
81
|
+
|
|
82
|
+
When current material cannot answer a required canonical question, return the
|
|
83
|
+
exact material-question disposition for the supplied owner cell, question
|
|
84
|
+
contract and Subject target. Do not invent a new question contract or landing.
|
|
85
|
+
Context stores the retained `material_gap_ledger`, derives the
|
|
86
|
+
MaterialQuestionWorkset and schedules a separate `material-answer` operation.
|
|
87
|
+
|
|
88
|
+
A material-answer Result contains only the question revision and source/span/
|
|
89
|
+
content-digest claims allowed by the workset. It does not return reader prose,
|
|
90
|
+
future Artifact/Section identity or self-authored EvidenceItem refs. Context
|
|
91
|
+
canonicalizes evidence, reviews the answer binding, derives the planned answer
|
|
92
|
+
and actualizes it into an approved landing. Stale source, Provider, question,
|
|
93
|
+
binding or landing returns the ledger item to unresolved atomically.
|
|
94
|
+
|
|
95
|
+
The ledger, answer body, answer provenance and revision scratch pages do not
|
|
96
|
+
enter reader Markdown or `dist`. A blocking gap closes only through current
|
|
97
|
+
evidence or an explicit non-delegable requirement change.
|
|
98
|
+
|
|
99
|
+
## Markdown author fixture checklist
|
|
100
|
+
|
|
101
|
+
Release fixtures should cover:
|
|
102
|
+
|
|
103
|
+
- complete Markdown and MDX capture plus unsupported parser/capture paths;
|
|
104
|
+
- authoritative reference, guide, runbook, FAQ, decision, incident, policy,
|
|
105
|
+
test and release/migration document shapes using anonymous content;
|
|
106
|
+
- per-Section projection into every supported collection intent;
|
|
107
|
+
- existing Code Node reuse, independent subject, ambiguity and material gap;
|
|
108
|
+
- content-only reuse plus add/remove/rename/split/merge/collection/path/Section
|
|
109
|
+
move in both directions;
|
|
110
|
+
- protected values, links, images/assets and source-span fidelity;
|
|
111
|
+
- editorial positives and placeholder/speculation/unsupported negatives;
|
|
112
|
+
- material-answer approval, stale/rebind/deletion recovery and no-output-leak;
|
|
113
|
+
- Section-local incremental invalidation, new membership/denominator/candidate
|
|
114
|
+
pool changes and unaffected Section reuse.
|
|
115
|
+
|
|
116
|
+
Source authorization, capture revision safety, canonical question/collection
|
|
117
|
+
contracts, layout confirmation, review and build remain Context authority and
|
|
118
|
+
cannot be replaced by the Skill.
|
|
@@ -38,10 +38,10 @@ Current reusable capabilities are:
|
|
|
38
38
|
|
|
39
39
|
| Source fact | Preferred capability | Lifecycle integration |
|
|
40
40
|
|---|---|---|
|
|
41
|
-
| TypeScript/
|
|
41
|
+
| TypeScript/JavaScript package or TSX/JSX file scope | `extractTs()` | Context-owned phase |
|
|
42
42
|
| Go declarations, imports, calls, and common HTTP routes | `@c4a/extract-go` | call from `extractCustom()` |
|
|
43
43
|
| Rush workspace packages, tags, dependencies, entries, and owners | `@c4a/extract-rush` | call from `extractCustom()`; may complement a language extractor |
|
|
44
|
-
| React Router route declarations | `extractReactRouterRoutes()` from `@c4a/extract-ts` | call from `extractCustom()`; complements
|
|
44
|
+
| React Router route declarations | `extractReactRouterRoutes()` from `@c4a/extract-ts` | call from `extractCustom()`; complements ECMAScript symbols |
|
|
45
45
|
| Rust, Python, Java/JVM, or an unsupported framework/protocol | no assumed built-in parser | project-owned `extractCustom()` adapter |
|
|
46
46
|
|
|
47
47
|
The custom extraction preview verifies this selection mechanically. Context
|
|
@@ -102,28 +102,13 @@ codeindex or reuse an unrelated parser.
|
|
|
102
102
|
|
|
103
103
|
## Plan Before Parsing
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
`resources/semantic/code-index/templates/` and combine them into one plan.
|
|
113
|
-
After that, choose exactly one closed output profile: `module-map`,
|
|
114
|
-
`application-map`, `protocol-index`, `service-boundary`, `runtime-map`,
|
|
115
|
-
`public-api-reference`, `command-map`, `adapter-contract`, `module-registry`,
|
|
116
|
-
`cross-module-flow`, or `provenance-only`. The profile selects structural probes
|
|
117
|
-
and advisory checks; an invented value is rejected.
|
|
118
|
-
|
|
119
|
-
Each archetype resource is a working template for an Agent with limited prior
|
|
120
|
-
context. It provides a minimum evidence pass, the reader questions the index
|
|
121
|
-
must answer, suggested knowledge units, Markdown chapter blueprints,
|
|
122
|
-
aggregation and relationship rules, composition examples, and stop conditions.
|
|
123
|
-
The blueprints are illustrative: omit unsupported sections and merge overlap
|
|
124
|
-
across selected templates instead of producing empty headings or duplicate
|
|
125
|
-
pages. They shape content before the batch preview; they do not prescribe or
|
|
126
|
-
override projected page counts.
|
|
105
|
+
The root workflow no longer owns module taxonomy or archetype templates. The
|
|
106
|
+
Indexer registry selects the applicable Provider profile, and the resolved
|
|
107
|
+
Provider Bundle supplies the semantic plan, evidence questions, composition
|
|
108
|
+
rules, and output guidance. Context only validates the closed selection,
|
|
109
|
+
digests, inventories, and resulting Candidate contracts. Do not reconstruct a
|
|
110
|
+
parallel profile taxonomy in this reference or route around the Indexer
|
|
111
|
+
lifecycle with an extractor-specific plan.
|
|
127
112
|
|
|
128
113
|
Extractor shape defines what can be emitted. `extractTs()` creates one page per
|
|
129
114
|
selected symbol and permits one owning index unit per source. Use it for an
|