@c4a/context 0.7.1 → 0.7.4
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 +65 -170
- package/README.zh-CN.md +52 -129
- package/docs/README.md +9 -10
- package/docs/README.zh-CN.md +6 -7
- package/docs/getting-started.md +73 -428
- package/docs/guides/agent-guide.md +94 -518
- package/docs/guides/code-indexer-skill-authoring.md +24 -13
- package/docs/guides/markdown-indexer-skill-authoring.md +14 -14
- package/docs/reference/code-extractors.md +29 -121
- package/docs/reference/indexer-provider-protocol.md +43 -110
- package/docs/reference/package-templates.md +2 -3
- package/docs/reference/project-api.md +52 -986
- package/index.d.ts +10 -8
- package/index.js +4739 -7103
- package/indexerAgentStepProtocol.d.ts +1366 -7649
- package/indexerArtifact.d.ts +225 -0
- package/indexerArtifactDependencies.d.ts +41 -39
- package/indexerArtifactResult.d.ts +219 -252
- package/indexerAuthorizedWorksetView.d.ts +368 -0
- package/indexerBaseQuestionAmendment.d.ts +484 -280
- package/indexerBenchmark.d.ts +16 -16
- package/indexerCandidateCompile.d.ts +66 -60
- package/indexerCapabilityGroupEvidence.d.ts +6 -6
- package/indexerCatalogFallback.d.ts +122 -128
- package/indexerCollectionMapping.d.ts +13 -13
- package/indexerContentLayers.d.ts +8 -8
- package/indexerContractOverlay.d.ts +10 -10
- package/indexerControlledInvocation.d.ts +12 -12
- package/indexerControlledProgram.d.ts +2467 -2797
- package/indexerCoreExports.d.ts +6 -6
- package/indexerCustomizationDraft.d.ts +3315 -2091
- package/indexerCustomizationLadder.d.ts +2 -2
- package/indexerDependencyView.d.ts +108 -108
- package/indexerEffectiveArtifact.d.ts +1134 -0
- package/indexerEvidenceAdapterAuthorityMerge.d.ts +48 -0
- package/indexerEvidenceAdapterResult.d.ts +52 -52
- package/indexerExampleDecision.d.ts +128 -128
- package/indexerExampleIdentity.d.ts +6 -6
- package/indexerGeneratedAuthoringAudit.d.ts +18 -18
- package/indexerIncrementalImpact.d.ts +16 -16
- package/indexerInspectorWorksetProjection.d.ts +6 -0
- package/indexerInventoryDisposition.d.ts +70 -70
- package/indexerLayerComposition.d.ts +2139 -373
- package/indexerLayoutChange.d.ts +10 -10
- package/indexerLayoutProposalSet.d.ts +71 -66
- package/indexerLayoutResolver.d.ts +53 -48
- package/indexerLayoutTransition.d.ts +0 -50
- package/indexerLifecycle.d.ts +0 -13
- package/indexerMainLifecycle.d.ts +10 -0
- package/indexerMainRunLedger.d.ts +138 -11
- package/indexerMainRunProtocol.d.ts +1406 -785
- package/indexerMainWorkset.d.ts +460 -206
- package/indexerMaterialGapLedger.d.ts +13 -2904
- package/indexerOverlayQuestionAmendment.d.ts +491 -287
- package/indexerOverlayQuestionApplyProposal.d.ts +1022 -614
- package/indexerParserCapabilityCatalog.d.ts +136 -0
- package/indexerParserCoordinate.d.ts +16 -16
- package/indexerParserDependencyIntent.d.ts +22 -0
- package/indexerParserExecutionPlan.d.ts +388 -0
- package/indexerParserFactView.d.ts +42 -22
- package/indexerPartitionConvergence.d.ts +0 -3
- package/indexerPartitionInventory.d.ts +2 -0
- package/indexerPartitionPlan.d.ts +101 -99
- package/indexerPhysicalArtifactManifest.d.ts +8 -8
- package/indexerPostAuthorComposition.d.ts +116 -1156
- package/indexerPostAuthorRunLedger.d.ts +1434 -280
- package/indexerPrimaryProjection.d.ts +10 -10
- package/indexerPrimaryResultView.d.ts +435 -0
- package/indexerProfileContract.d.ts +181 -181
- package/indexerProgramExecutionAuthorization.d.ts +12 -12
- package/indexerProgramRunProtocol.d.ts +2141 -2749
- package/indexerProjectProposal.d.ts +496 -292
- package/indexerProjectedArtifactFanOutAudit.d.ts +0 -3
- package/indexerProtocolCommon.d.ts +4 -1
- package/indexerProvider.d.ts +134 -218
- package/indexerProviderComposition.d.ts +53 -53
- package/indexerProviderResolution.d.ts +12 -12
- package/indexerProviderResolutionAction.d.ts +14 -14
- package/indexerProviderRouting.d.ts +923 -515
- package/indexerProviderSelectionProposal.d.ts +893 -485
- package/indexerQuestionAuthority.d.ts +46 -47
- package/indexerReaderTargetInventory.d.ts +8 -8
- package/indexerRegistry.d.ts +765 -357
- package/indexerRequirementConfirmation.d.ts +98 -98
- package/indexerRequirementLifecycle.d.ts +224 -224
- package/indexerResultReconciliation.d.ts +204 -5919
- package/indexerResultReconciliationRun.d.ts +0 -1
- package/indexerRunEnvelope.d.ts +20 -20
- package/indexerSemanticInput.d.ts +3678 -0
- package/indexerStructuredDeclaration.d.ts +57 -53
- package/indexerSubjectCatalog.d.ts +14 -14
- package/indexerSubjectIdentity.d.ts +2 -2
- package/indexerSubjectKeyAuthority.d.ts +31 -30
- package/indexerTemplateRendering.d.ts +64 -64
- package/indexerToolSnapshot.d.ts +8 -8
- package/package.json +1 -1
- package/phases.d.ts +3 -183
- package/codeIndexPlan.d.ts +0 -158
- package/indexerAuditFacts.d.ts +0 -66
- package/indexerAuditOverrideReadiness.d.ts +0 -27
- package/indexerAuditProtocol.d.ts +0 -238
- package/indexerAuditRevision.d.ts +0 -726
- package/indexerAuditRevisionActions.d.ts +0 -236
- package/indexerMaterialAnswer.d.ts +0 -738
- package/indexerMaterialAnswerActualization.d.ts +0 -91
- package/indexerMaterialAnswerExecutionPlan.d.ts +0 -2887
- package/indexerMaterialAnswerFlow.d.ts +0 -63
- package/indexerMaterialAnswerLayout.d.ts +0 -76
- package/indexerMaterialAnswerReview.d.ts +0 -217
- package/indexerMaterialAnswerReviewRoute.d.ts +0 -6145
- package/indexerMaterialAnswerRunLedger.d.ts +0 -918
- package/indexerMaterialAnswerRunProtocol.d.ts +0 -1253
- package/indexerMaterialQuestionExclusion.d.ts +0 -129
- package/indexerMaterialQuestionWorkset.d.ts +0 -508
- package/indexerPlannedMaterialAnswer.d.ts +0 -116
- package/indexerProfileMetricAudit.d.ts +0 -218
- package/indexerWorksetRead.d.ts +0 -287
|
@@ -34,18 +34,22 @@ rules, metric operators and thresholds.
|
|
|
34
34
|
4. **Activation and profiles.** Declare strong/supporting/negative signals.
|
|
35
35
|
Dependency names are candidates, not runtime proof. One module may combine
|
|
36
36
|
one primary profile with supporting/extensions and selected composers.
|
|
37
|
-
5. **Sources and Artifacts.**
|
|
37
|
+
5. **Sources and Artifacts.** Write for a reader outside the indexed module:
|
|
38
|
+
make responsibility, stable interfaces/entrypoints, handoffs and the core
|
|
39
|
+
state, failure, operation and source-of-truth facts needed for correct use
|
|
40
|
+
and attribution discoverable. Declare source roles and logical-unit intent;
|
|
38
41
|
select only CLI-registered Artifact kinds/policy variants. Keep logical unit
|
|
39
|
-
identity separate from physical Artifact count
|
|
42
|
+
identity separate from physical Artifact count, and measure useful coverage
|
|
43
|
+
by answered profile questions rather than symbol or path counts.
|
|
40
44
|
6. **Inventory protocols.** Close every input member with an explicit
|
|
41
45
|
disposition. Use stable aggregation, full-path example identity and
|
|
42
46
|
structured chain decisions; do not substitute page prose for inventory.
|
|
43
|
-
7. **Metrics.** Reference registered metric ids
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
8. **Revision boundary.**
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
7. **Metrics.** Reference registered metric ids as reader-quality guidance.
|
|
48
|
+
The CLI may report advisory observations, but a Provider cannot return a
|
|
49
|
+
pass, threshold, retry count, or risk-acceptance decision.
|
|
50
|
+
8. **Revision boundary.** Hard contract or source failures block at their
|
|
51
|
+
owner. Reader-quality feedback reopens the same Author or Composer through
|
|
52
|
+
`context revise`; it does not create a metric retry ledger or risk Gate.
|
|
49
53
|
9. **Reader questions.** Declare reusable question templates with stable refs,
|
|
50
54
|
target domains and allowed evidence contracts. Do not make a question id
|
|
51
55
|
globally unique to one SubjectKey group.
|
|
@@ -68,11 +72,13 @@ rules, metric operators and thresholds.
|
|
|
68
72
|
15. **Marketplace layout.** Archives keep one top-level Skill directory with
|
|
69
73
|
`SKILL.md`, the manifest and referenced runtime resources. Exclude tests,
|
|
70
74
|
caches, credentials, local paths and Host-specific temporary manifests.
|
|
71
|
-
16. **Material
|
|
72
|
-
evidence is missing.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
16. **Material gaps.** Return a canonical question disposition in the same
|
|
76
|
+
main Result when required evidence is missing. Never render a gap as an
|
|
77
|
+
empty page or speculative prose. Registered Markdown or tool material may
|
|
78
|
+
enrich the same main indexing batch before Candidate generation; do not
|
|
79
|
+
create a separate answer operation, Candidate, checkpoint or Review. The
|
|
80
|
+
CLI projects allowed enrichment material into that same Authorized
|
|
81
|
+
Workset View; Providers must not reopen registered sources themselves.
|
|
76
82
|
17. **Backend profiles.** Test neutral RPC/HTTP, Gateway, Event/function,
|
|
77
83
|
Cron/worker, sync/reconciliation, stateful service/storage and library
|
|
78
84
|
shapes. Local facts remain baseline when optional remote metadata is absent.
|
|
@@ -115,6 +121,11 @@ Markdown Indexers must reuse the same Node when the SubjectKey is equal. An
|
|
|
115
121
|
enricher uses the supplied TargetResolutionView (`resolved`, `absent` or
|
|
116
122
|
`ambiguous`) and never guesses identity from a title or path resemblance.
|
|
117
123
|
|
|
124
|
+
Every Section uses the exact `document_kind`, `reader_goal` and
|
|
125
|
+
`artifact_kind` tuple from the current profile's unique layout mapping. The
|
|
126
|
+
Provider never returns a collection name; Context resolves the collection from
|
|
127
|
+
that tuple and rejects missing or ambiguous mappings.
|
|
128
|
+
|
|
118
129
|
## Publication gate
|
|
119
130
|
|
|
120
131
|
Do not publish until the exact packed artifact passes manifest/schema
|
|
@@ -62,6 +62,11 @@ alphabetic batches. Do not create one page per heading/member or inflate page
|
|
|
62
62
|
count to satisfy a metric. The CLI owns Artifact-policy eligibility, physical
|
|
63
63
|
fan-out audit, layout actualization and the final Candidate compile.
|
|
64
64
|
|
|
65
|
+
The first actual Section of each reader Artifact begins with one concise,
|
|
66
|
+
source-backed level-one heading. Context uses that heading as the outline and
|
|
67
|
+
Candidate Review display title. It never participates in SubjectKey derivation
|
|
68
|
+
or ownership, and later Sections in the same Artifact do not repeat it.
|
|
69
|
+
|
|
65
70
|
Each Section carries exact positive and negative dependency refs. Incremental
|
|
66
71
|
impact is Section/Artifact-local: a source membership, question denominator,
|
|
67
72
|
candidate pool, evidence span or run-envelope change invalidates only the
|
|
@@ -77,24 +82,19 @@ hard metrics. Deterministic blocks render only registered facts; semantic prose
|
|
|
77
82
|
must cite consumed evidence. Placeholders, speculation, fabricated transitions
|
|
78
83
|
and “content unavailable” pages are invalid even when the structure looks rich.
|
|
79
84
|
|
|
80
|
-
##
|
|
85
|
+
## Missing material
|
|
81
86
|
|
|
82
87
|
When current material cannot answer a required canonical question, return the
|
|
83
88
|
exact material-question disposition for the supplied owner cell, question
|
|
84
89
|
contract and Subject target. Do not invent a new question contract or landing.
|
|
85
|
-
Context
|
|
86
|
-
|
|
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.
|
|
90
|
+
Context reports the unresolved set in current reconciliation state; it does not
|
|
91
|
+
create a second checkpoint ledger or published gap artifact.
|
|
94
92
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
Capture the missing Markdown or other source normally, then rerun `main-index`.
|
|
94
|
+
The new Result updates the same knowledge Candidate and enters the same final
|
|
95
|
+
content Review. There is no answer-only operation or evidence-specific Review.
|
|
96
|
+
A blocking gap closes only through current source or an explicit non-delegable
|
|
97
|
+
requirement change.
|
|
98
98
|
|
|
99
99
|
## Markdown author fixture checklist
|
|
100
100
|
|
|
@@ -109,7 +109,7 @@ Release fixtures should cover:
|
|
|
109
109
|
move in both directions;
|
|
110
110
|
- protected values, links, images/assets and source-span fidelity;
|
|
111
111
|
- editorial positives and placeholder/speculation/unsupported negatives;
|
|
112
|
-
- material-
|
|
112
|
+
- material-gap runtime recovery, main-index retry and no-output-leak;
|
|
113
113
|
- Section-local incremental invalidation, new membership/denominator/candidate
|
|
114
114
|
pool changes and unaffected Section reuse.
|
|
115
115
|
|
|
@@ -1,131 +1,39 @@
|
|
|
1
|
-
# Code
|
|
1
|
+
# Code Parser Selection
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Code parsing is an Indexer Provider implementation detail. A knowledge
|
|
4
|
+
workspace selects the Provider and profile in `src/indexers.yaml`; it does not
|
|
5
|
+
declare a separate extraction phase in `src/index.ts`.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Selection order
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
1. Identify the target boundary and the knowledge questions.
|
|
10
|
+
2. Let the selected Provider inspect language, manifests, entries, routes, and
|
|
11
|
+
contracts.
|
|
12
|
+
3. Use the smallest parser set that covers those questions.
|
|
13
|
+
4. Keep deterministic parser output as Provider facts; let the Provider author
|
|
14
|
+
reader-oriented knowledge pages from those facts and readable sources.
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|---|---|
|
|
16
|
-
| `package.json` | TypeScript, TSX, JavaScript, or JSX |
|
|
17
|
-
| `go.mod` | Go |
|
|
18
|
-
| `Cargo.toml` | Rust |
|
|
19
|
-
| `pyproject.toml` or `setup.py` | Python |
|
|
20
|
-
| `pom.xml` or `build.gradle` | Java or JVM |
|
|
21
|
-
| multiple manifests | a mixed module that may need more than one extractor |
|
|
22
|
-
|
|
23
|
-
Do not select `extractTs()` merely because a repository contains some
|
|
24
|
-
TypeScript. Decide against the exact confirmed module and include boundary. A
|
|
25
|
-
mixed module may compose multiple structural passes; parser selection is not an
|
|
26
|
-
exclusive repository-wide switch.
|
|
27
|
-
|
|
28
|
-
## Selection Order
|
|
29
|
-
|
|
30
|
-
Use the narrowest reusable capability that covers the confirmed source:
|
|
31
|
-
|
|
32
|
-
1. Use a Context-owned phase when its contract matches the source.
|
|
33
|
-
2. Otherwise use a reusable structural package inside `extractCustom()`.
|
|
34
|
-
3. If no reusable package covers the syntax or repository protocol, implement a
|
|
35
|
-
project-owned adapter and keep it in the Context workspace.
|
|
36
|
-
|
|
37
|
-
Current reusable capabilities are:
|
|
38
|
-
|
|
39
|
-
| Source fact | Preferred capability | Lifecycle integration |
|
|
40
|
-
|---|---|---|
|
|
41
|
-
| TypeScript/JavaScript package or TSX/JSX file scope | `extractTs()` | Context-owned phase |
|
|
42
|
-
| Go declarations, imports, calls, and common HTTP routes | `@c4a/extract-go` | call from `extractCustom()` |
|
|
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 ECMAScript symbols |
|
|
45
|
-
| Rust, Python, Java/JVM, or an unsupported framework/protocol | no assumed built-in parser | project-owned `extractCustom()` adapter |
|
|
46
|
-
|
|
47
|
-
The custom extraction preview verifies this selection mechanically. Context
|
|
48
|
-
detects applicable community capabilities from source manifests and stable path
|
|
49
|
-
signals, then checks that candidate evidence covers every required entry,
|
|
50
|
-
route, implementation boundary, workspace, or protocol probe. One aggregated
|
|
51
|
-
module page is valid when it closes that structural coverage. A callback that
|
|
52
|
-
only hashes a few filenames or renders configured prose does not satisfy the
|
|
53
|
-
probe, even when its Markdown count is small.
|
|
54
|
-
|
|
55
|
-
The probe does not assign business meaning and does not require one page per
|
|
56
|
-
fact. The project adapter still owns grouping, titles, explanations, and
|
|
57
|
-
cross-module semantics. If the source uses an unsupported language or protocol,
|
|
58
|
-
report a capability gap instead of claiming that a known probe was consumed.
|
|
16
|
+
## Community parser packages
|
|
59
17
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
Before editing `src/index.ts`, read the Route-selected Context lifecycle and
|
|
68
|
-
extractor resources completely. They are the installed contract for
|
|
69
|
-
Context-owned phases such as `extractTs()`; do not require a separate
|
|
70
|
-
workspace copy of an implementation package and do not infer APIs from bundled
|
|
71
|
-
JavaScript.
|
|
72
|
-
|
|
73
|
-
Only a capability imported directly by a project-owned `extractCustom()`
|
|
74
|
-
adapter requires its package README. Use this matrix to decide whether that
|
|
75
|
-
optional capability is relevant, add only that dependency, then read the
|
|
76
|
-
README from the resolved installed package before implementing the callback.
|
|
77
|
-
Never assume that a transitive or dev-only package is present at a hard-coded
|
|
78
|
-
`node_modules` path.
|
|
79
|
-
|
|
80
|
-
A project-owned adapter may use an existing parser, compiler API, or command
|
|
81
|
-
whose output is deterministic. It must return source-backed candidates through
|
|
82
|
-
`extractCustom()`; it must not write lifecycle, knowledge, or Review files.
|
|
83
|
-
Framework-specific classification and rendering remain in the project. The CLI
|
|
84
|
-
and structural parser must not infer product meaning.
|
|
85
|
-
|
|
86
|
-
## Decision To Report
|
|
87
|
-
|
|
88
|
-
Before the first extraction preview, state briefly:
|
|
89
|
-
|
|
90
|
-
- the inspected module and manifest signals;
|
|
91
|
-
- the selected Context phase or structural package;
|
|
92
|
-
- whether coverage is complete or which facts remain project-owned; and
|
|
93
|
-
- why another available extractor is not needed.
|
|
94
|
-
|
|
95
|
-
After preview, use `inspection.structuralProbes` and each index unit's
|
|
96
|
-
`structuralCoverage` as the exact audit result. An uncovered probe is a
|
|
97
|
-
configuration problem, not a Review decision.
|
|
18
|
+
| Package | Useful structural facts |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `@c4a/extract-ts` | TypeScript/JavaScript symbols, exports, imports, calls, and React Router routes |
|
|
21
|
+
| `@c4a/extract-go` | Go declarations, imports, calls, and common HTTP routes |
|
|
22
|
+
| `@c4a/extract-rush` | Rush projects, tags, entries, dependencies, and owner boundaries |
|
|
23
|
+
| `@c4a/extract` | Shared extraction result and adapter contracts |
|
|
98
24
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
codeindex or reuse an unrelated parser.
|
|
25
|
+
These packages do not create Candidate rows, write `knowledge/`, or control
|
|
26
|
+
Review. The Code Indexer Provider owns those lifecycle responsibilities.
|
|
102
27
|
|
|
103
|
-
##
|
|
28
|
+
## Unsupported technologies
|
|
104
29
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
parallel profile taxonomy in this reference or route around the Indexer
|
|
111
|
-
lifecycle with an extractor-specific plan.
|
|
30
|
+
When the current Provider cannot parse a required boundary, first use its
|
|
31
|
+
supported customization ladder (`config`, instruction append, template
|
|
32
|
+
override, then program extension). Add a reusable parser to the Provider only
|
|
33
|
+
when the same technology boundary is useful across projects. Do not create a
|
|
34
|
+
project-local parallel knowledge pipeline.
|
|
112
35
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
aggregation, registries, protocol indexes, cross-module flows, or multiple
|
|
117
|
-
candidate owners over one source; each candidate declares its `module` and
|
|
118
|
-
at least one evidence-scoped `section`; there is no page-level Markdown
|
|
119
|
-
fallback. Each section's typed coverage and exact evidence is checked against
|
|
120
|
-
the output profile during preview. Resolve repositories from
|
|
121
|
-
the extractor context's `sources[].absolutePath`, never from a
|
|
122
|
-
machine-specific checkout path. Cross-module flow output must also emit
|
|
123
|
-
source-backed structured edges. Generated clients/models, mirrored sources, legacy
|
|
124
|
-
implementations, and internal helpers should normally be excluded or recorded
|
|
125
|
-
as provenance rather than expanded one symbol per page.
|
|
36
|
+
Parser coverage is complete when every required inventory item has an explicit
|
|
37
|
+
disposition and the resulting pages answer the declared reader questions. A
|
|
38
|
+
large symbol count by itself is not useful coverage.
|
|
126
39
|
|
|
127
|
-
If a repository uses service manifests or protocol registrations that the
|
|
128
|
-
community inspector cannot interpret, keep that interpretation in a generic
|
|
129
|
-
project-owned `inspect` adapter attached to `extractCustom()`. Return findings
|
|
130
|
-
and capability gaps through the public Context contract; do not add internal
|
|
131
|
-
framework names or directory rules to the CLI.
|
|
@@ -184,8 +184,8 @@ Bundles, expanded variants, semantic split parts and the single CLI
|
|
|
184
184
|
`catalog-fallback` parent do not. Counts up to 100 continue, 101 through 300
|
|
185
185
|
continue with a warning, and counts above 300 return the non-Gate
|
|
186
186
|
`indexer-plan-revision-required` outcome before any author workset runs. That
|
|
187
|
-
partial outcome
|
|
188
|
-
revision ledger.
|
|
187
|
+
partial outcome reopens the owning semantic step; it does not create a profile
|
|
188
|
+
revision ledger or an override route.
|
|
189
189
|
|
|
190
190
|
Artifact content has three mechanically separate layers. `facts[]` contains
|
|
191
191
|
canonical, source-bound values and never reader prose. A structured
|
|
@@ -392,9 +392,8 @@ verified or exact project-authorized program may use the `trusted-program` path,
|
|
|
392
392
|
which is not an isolation claim. An untrusted program without a real sandbox is
|
|
393
393
|
not executable.
|
|
394
394
|
|
|
395
|
-
The program input
|
|
396
|
-
`context.indexer.run-
|
|
397
|
-
is `context.indexer.run-result/v1`, wrapped by
|
|
395
|
+
The program input is `context.indexer.run-request/v2` with the single
|
|
396
|
+
`main-index` operation. Its output is `context.indexer.run-result/v1`, wrapped by
|
|
398
397
|
`context.indexer.controlled-program-result/v1` to bind the exact invocation and
|
|
399
398
|
payload digest. Context still validates the operation-specific Result and
|
|
400
399
|
recomputes mechanical gates independently.
|
|
@@ -412,9 +411,9 @@ program, instructions, templates, config, CLI/profile contracts and only
|
|
|
412
411
|
`primary_resource_binding_digest`; a post-author resource cannot satisfy that
|
|
413
412
|
schema.
|
|
414
413
|
|
|
415
|
-
`context.indexer.main-workset/
|
|
414
|
+
`context.indexer.main-workset/v2` digests its complete canonical payload. A
|
|
416
415
|
workset set permits only one author workset for an Indexer, owner cohort and
|
|
417
|
-
group key. `context.indexer.main-transport-batch/
|
|
416
|
+
group key. `context.indexer.main-transport-batch/v2` may carry several complete
|
|
418
417
|
worksets but intentionally has no batch identity, digest, page number or
|
|
419
418
|
reader-facing name. Regrouping worksets for Host transport therefore cannot
|
|
420
419
|
change an individual workset or Result identity.
|
|
@@ -429,17 +428,14 @@ same workset with the next authorized strategy. This path has no user Gate and
|
|
|
429
428
|
does not consume profile-revision attempts; an exhausted strategy set routes
|
|
430
429
|
to the CLI catalog fallback.
|
|
431
430
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
`
|
|
439
|
-
|
|
440
|
-
set, and operation validation compares it with the actual CLI-issued receipts.
|
|
441
|
-
Changing a cursor, page size, call grouping or Host batch cannot manufacture a
|
|
442
|
-
new logical unit such as `batch-1` or alter an Artifact identity.
|
|
431
|
+
Context projects every source-specific fact, dependency and verified Provider
|
|
432
|
+
fragment authorized for one main workset into the single
|
|
433
|
+
`context.indexer.authorized-workset-view/v1` resource. The Agent reads that
|
|
434
|
+
managed resource and uses its file locators directly. It does not construct
|
|
435
|
+
source-specific reads, semantic windows, cursors or receipt fields. Workset,
|
|
436
|
+
View and execution-request identity bind the accepted Result; Host call grouping
|
|
437
|
+
cannot manufacture a new logical unit such as `batch-1` or alter an Artifact
|
|
438
|
+
identity.
|
|
443
439
|
|
|
444
440
|
Post-author composition uses its own
|
|
445
441
|
`context.indexer.post-author-run-ledger/v1`; it never reuses primary main-run
|
|
@@ -515,7 +511,7 @@ derived under `knowledge/<collection>/` and never accepted from a Provider.
|
|
|
515
511
|
|
|
516
512
|
Template Artifacts enter layout only after validated rendering. Only rendered
|
|
517
513
|
Sections exist; an omitted optional projection does not create an empty
|
|
518
|
-
Section, while a retained material gap remains
|
|
514
|
+
Section, while a retained material gap remains unresolved without
|
|
519
515
|
reader-visible placeholder content. Artifact Bundle purpose and `split_of`
|
|
520
516
|
lineage are retained in the proposal. A proposal set rejects duplicate Node
|
|
521
517
|
owners, Artifact identities, logical Section identities, Section placements
|
|
@@ -545,12 +541,9 @@ fan-out to an already approved Node, removing or renaming an Artifact,
|
|
|
545
541
|
splitting/merging its declared lineage, moving a logical Section, or changing
|
|
546
542
|
an approved collection/path is represented by a digest-bound layout change
|
|
547
543
|
report and requires the human, non-delegable `confirm-layout-change` Gate.
|
|
548
|
-
`context.indexer.layout-transition/v1`
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
then does it expose the conditional Gate. Replacing the proposal set makes the
|
|
552
|
-
prior actualization stale. The legacy align Route remains available only until
|
|
553
|
-
the workflow cutover; it is not an authority for the new Indexer protocol.
|
|
544
|
+
`context.indexer.layout-transition/v1` binds the current proposal set and base
|
|
545
|
+
projections before exposing the conditional Gate. No parallel align Route can
|
|
546
|
+
approve or rewrite that transition.
|
|
554
547
|
|
|
555
548
|
## Explicit Result-bound Candidate compile
|
|
556
549
|
|
|
@@ -559,7 +552,7 @@ author Results from the durable main-run store. Its input repeats only the
|
|
|
559
552
|
exact workset, execution-request, acceptance and Artifact Result digests; the
|
|
560
553
|
CLI rejects a missing, extra, forged or stale Result reference before
|
|
561
554
|
materialization. Callers cannot provide an alternate Result body, Provider
|
|
562
|
-
contract
|
|
555
|
+
contract or a second document-authoring payload.
|
|
563
556
|
|
|
564
557
|
The compiler validates every accepted run envelope and acceptance record,
|
|
565
558
|
then binds each Candidate to the same Indexer Result, source identity,
|
|
@@ -582,62 +575,19 @@ customization may be proposed only after the explicit
|
|
|
582
575
|
`indexer-customization-required` outcome and its capability-gap proof; compile
|
|
583
576
|
itself never invents one.
|
|
584
577
|
|
|
585
|
-
## Material
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
the
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
material-answer run ledger uses CAS transitions and content-addressed accepted
|
|
599
|
-
records. A complete accepted empty Result is recovered without another dispatch;
|
|
600
|
-
an interrupted running entry without its accepted record returns to pending.
|
|
601
|
-
Before acceptance, every evidence claim must resolve through an exact current
|
|
602
|
-
source-span read receipt, and unused or stale receipts are rejected.
|
|
603
|
-
|
|
604
|
-
A `material-answer` Result cannot move a retained gap directly to an approved
|
|
605
|
-
state. Context first validates the exact workset, question revision, eligible
|
|
606
|
-
Indexer, Provider fingerprint, source authority, canonical spans, evidence
|
|
607
|
-
content digests, provenance selector and minimum item/origin counts. Only a
|
|
608
|
-
passing candidate can produce
|
|
609
|
-
`context.indexer.material-answer-baseline-report/v1`. Its fixed Review scope is
|
|
610
|
-
`question-target-source-span-evidence-binding`; the strict schema has no field
|
|
611
|
-
for approving a reader page, Artifact content or final knowledge candidate.
|
|
612
|
-
|
|
613
|
-
`context.indexer.material-answer-review-decision/v1` binds that report, the
|
|
614
|
-
candidate set, workset, question revision and binding digest. Applying an
|
|
615
|
-
`approved` decision uses the workset's predecessor ledger revision as a CAS
|
|
616
|
-
base, consumes that workset and records the decision digest in the canonical
|
|
617
|
-
answer binding. A successor ledger revision does not make the consumed workset
|
|
618
|
-
self-stale. A rejected, insufficient, forged or differently scoped decision
|
|
619
|
-
cannot create `answer-approved` state.
|
|
620
|
-
|
|
621
|
-
Layout uses an unapplied
|
|
622
|
-
`context.indexer.material-answer-layout-proposal/v1`. Each planned or existing
|
|
623
|
-
answer landing must map uniquely to an actual `node:`, `artifact:` or
|
|
624
|
-
`section:` ref. Before creating a resolved actualization, Context recomputes
|
|
625
|
-
`context.indexer.material-answer-evidence-compatibility/v1` from the retained
|
|
626
|
-
canonical evidence and current question/source authority. A changed source set,
|
|
627
|
-
origin, snapshot, kind, span, content digest, provenance rule or minimum count
|
|
628
|
-
reopens the gap to `unresolved`. A missing or colliding landing remains
|
|
629
|
-
`answer-approved`; rejecting or replacing a layout proposal invalidates its
|
|
630
|
-
resolved mappings back to `answer-approved`.
|
|
631
|
-
|
|
632
|
-
`context.indexer.material-answer-flow-status/v1` is the admission fact for the
|
|
633
|
-
next stages. An unresolved blocking gap stops layout. An `answer-approved`
|
|
634
|
-
blocking gap may enter layout but cannot consume a conditional layout Gate or
|
|
635
|
-
enter the main Candidate Review. Those two admissions become true only when
|
|
636
|
-
every blocking answer has a current actualization for the exact layout digest.
|
|
637
|
-
Optional gaps remain reported but do not become blocking. Final close removes
|
|
638
|
-
a resolved ledger entry only when the approved structure projection carries
|
|
639
|
-
the same question, binding, actualized target and complete canonical evidence
|
|
640
|
-
ref set.
|
|
578
|
+
## Material gaps and the single authoring path
|
|
579
|
+
|
|
580
|
+
Reconciliation reports unresolved material gaps from the current accepted
|
|
581
|
+
Results. Required gaps keep the current lifecycle blocked; optional gaps remain
|
|
582
|
+
diagnostics in that report. Context does not create a second checkpoint, audit
|
|
583
|
+
ledger, answer workset, or special close route for them.
|
|
584
|
+
|
|
585
|
+
Newly captured Markdown, tool snapshots, or other authorized material re-enter
|
|
586
|
+
the normal `main-index` operation. The affected Partition and Author worksets
|
|
587
|
+
run again, reconciliation is recomputed, and the user reviews the resulting
|
|
588
|
+
knowledge Candidate once. Successful close writes only approved knowledge and
|
|
589
|
+
the recovery metadata in `knowledge/structure.yaml`, then clears transient
|
|
590
|
+
Indexer runtime state.
|
|
641
591
|
|
|
642
592
|
## Detector and inspector
|
|
643
593
|
|
|
@@ -660,12 +610,19 @@ payloads fail closed.
|
|
|
660
610
|
`present`, `absent` or `unknown`; a present signal requires evidence. Context,
|
|
661
611
|
not the detector, derives `matched`, `not-matched` or `indeterminate`.
|
|
662
612
|
|
|
663
|
-
An authoring inspector consumes `context.indexer.inspector-request/v1
|
|
664
|
-
|
|
665
|
-
|
|
613
|
+
An authoring inspector consumes `context.indexer.inspector-request/v1`, including
|
|
614
|
+
the exact active Provider profiles and Registry variants, and returns
|
|
615
|
+
`context.indexer.inspector-result/v1`. Its evidence payload is the shared
|
|
616
|
+
`context.indexer.evidence-adapter-result/v1`; its `fact_payloads` carry only
|
|
617
|
+
validated profile variants, source Fact refs, bounded template variables and a
|
|
618
|
+
structured availability status. Context requires one payload for every
|
|
619
|
+
enrichment fact, verifies each payload digest and source ref, rejects Registry
|
|
620
|
+
variant drift, then adapts the values into the same internal Authorized Workset
|
|
621
|
+
View projection source used by other inputs. Inspector files are always
|
|
666
622
|
`enricher` plus `lightweight-evidence`; they cannot own baseline inventory or
|
|
667
623
|
contribute a denominator. The Result must close the requested inventory and
|
|
668
|
-
authorized source/module scope.
|
|
624
|
+
authorized source/module scope. No Inspector protocol or technical identifier
|
|
625
|
+
is exposed as a separate Agent input. Detector and inspector entries run only from
|
|
669
626
|
the reverified content-addressed stage through the same empty-environment,
|
|
670
627
|
no-shell, bounded JSON subprocess runner. Timeout, stdin/stdout/stderr overflow,
|
|
671
628
|
invalid UTF-8/JSON, undeclared evidence and scope expansion are typed failures;
|
|
@@ -782,27 +739,3 @@ structured claim passed owner-local evidence coverage, and lists every
|
|
|
782
739
|
semantic-prose block or direct authored template variable as
|
|
783
740
|
`semantic-prose-agent-review-required`. It does not scan free prose to claim
|
|
784
741
|
that unsupported natural-language assertions were mechanically detected.
|
|
785
|
-
|
|
786
|
-
## Material-question target exclusion
|
|
787
|
-
|
|
788
|
-
A target exclusion is not a Provider Result and does not change the confirmed
|
|
789
|
-
requirement. Context first emits
|
|
790
|
-
`context.indexer.material-question-exclusion-report/v1` for one current
|
|
791
|
-
unresolved `QuestionTargetKey`. The report binds the project, predecessor
|
|
792
|
-
ledger revision, question-target inventory, question contract and revision,
|
|
793
|
-
target ref/item digest, exact allowlisted reason, derived severity and the
|
|
794
|
-
reader-visible impact.
|
|
795
|
-
|
|
796
|
-
`confirm-material-question-exclusion` accepts only that report and always emits
|
|
797
|
-
`context.indexer.material-question-exclusion-confirmation/v1` with human,
|
|
798
|
-
non-delegable authority. Managed mode, Provider omission, wildcard targets and
|
|
799
|
-
non-allowlisted reasons cannot create the decision. Apply revalidates the
|
|
800
|
-
report against the current resolved question and ledger before retaining only
|
|
801
|
-
the reason code and decision digest in the entry.
|
|
802
|
-
|
|
803
|
-
The successor ledger is checkpointed with the predecessor revision through the
|
|
804
|
-
same durable structure journal. A question contract, owner, target item,
|
|
805
|
-
question revision or other pair dependency change replaces the retained
|
|
806
|
-
exclusion with an unresolved entry in one checkpoint. The Material Gap ledger
|
|
807
|
-
is intentionally absent from the main-workset identity, so this target-level
|
|
808
|
-
decision does not invalidate unrelated main indexing worksets.
|
|
@@ -348,9 +348,8 @@ src-N#span:<heading-hint> L<start>-<end>@<span-hash>
|
|
|
348
348
|
|
|
349
349
|
The code symbol form includes the source-relative file so same-name symbols in
|
|
350
350
|
different files resolve to one exact symbol-index row. Consumers should still
|
|
351
|
-
treat the complete `source_ref` as opaque. Production
|
|
352
|
-
|
|
353
|
-
`code_origin`.
|
|
351
|
+
treat the complete `source_ref` as opaque. Production pages do not expose
|
|
352
|
+
Candidate fingerprints, Indexer digests, or `code_origin`.
|
|
354
353
|
|
|
355
354
|
`#span:` refs retain source snapshot line ranges for human review, diffing, and
|
|
356
355
|
stable re-pinning. They resolve against committed file/lark document snapshots,
|