@c4a/context 0.7.0 → 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 -422
- package/docs/guides/agent-guide.md +94 -523
- 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 -136
- package/docs/reference/indexer-provider-protocol.md +60 -138
- package/docs/reference/package-templates.md +2 -3
- package/docs/reference/project-api.md +52 -985
- package/index.d.ts +12 -10
- package/index.js +12749 -15335
- package/indexerAgentStepProtocol.d.ts +1366 -7649
- package/indexerArtifact.d.ts +225 -0
- package/indexerArtifactDependencies.d.ts +41 -39
- package/indexerArtifactResult.d.ts +221 -255
- package/indexerAuthorizedWorksetView.d.ts +368 -0
- package/indexerBaseQuestionAmendment.d.ts +484 -280
- package/indexerBenchmark.d.ts +16 -16
- package/indexerCandidateCompile.d.ts +206 -16
- 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/{indexerOverlayTrust.d.ts → indexerContractOverlay.d.ts} +23 -569
- 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 +497 -293
- package/indexerOverlayQuestionApplyProposal.d.ts +1030 -622
- 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 -281
- 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,146 +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.
|
|
59
|
-
|
|
60
|
-
An optional package does not create a new CLI phase. Add it as an explicit
|
|
61
|
-
workspace dependency, then map its structural facts to candidates in the
|
|
62
|
-
project callback. Do not add a parser package when its documented coverage does
|
|
63
|
-
not match the inspected source.
|
|
16
|
+
## Community parser packages
|
|
64
17
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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.
|
|
98
|
-
|
|
99
|
-
If no current capability can parse the source reliably, stop at configuration
|
|
100
|
-
and report the missing generic capability. Do not silently emit an empty
|
|
101
|
-
codeindex or reuse an unrelated parser.
|
|
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 |
|
|
102
24
|
|
|
103
|
-
|
|
25
|
+
These packages do not create Candidate rows, write `knowledge/`, or control
|
|
26
|
+
Review. The Code Indexer Provider owns those lifecycle responsibilities.
|
|
104
27
|
|
|
105
|
-
|
|
106
|
-
archetype template: API/service, background runtime, SDK/library, interactive
|
|
107
|
-
application, adapter, CLI/tool, monorepo container, derived source,
|
|
108
|
-
authoritative contract source, or unknown.
|
|
109
|
-
A hybrid module may declare several `moduleTypes` and several behavior `facets`;
|
|
110
|
-
keep one primary `moduleType` for concise reports. Record inspected paths in
|
|
111
|
-
`moduleTypeEvidence`, record every Markdown file actually read in `documents`, then read all matching Route-recommended files below
|
|
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.
|
|
28
|
+
## Unsupported technologies
|
|
118
29
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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.
|
|
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.
|
|
127
35
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
aggregation, registries, protocol indexes, cross-module flows, or multiple
|
|
132
|
-
candidate owners over one source; each candidate declares its `module` and
|
|
133
|
-
at least one evidence-scoped `section`; there is no page-level Markdown
|
|
134
|
-
fallback. Each section's typed coverage and exact evidence is checked against
|
|
135
|
-
the output profile during preview. Resolve repositories from
|
|
136
|
-
the extractor context's `sources[].absolutePath`, never from a
|
|
137
|
-
machine-specific checkout path. Cross-module flow output must also emit
|
|
138
|
-
source-backed structured edges. Generated clients/models, mirrored sources, legacy
|
|
139
|
-
implementations, and internal helpers should normally be excluded or recorded
|
|
140
|
-
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.
|
|
141
39
|
|
|
142
|
-
If a repository uses service manifests or protocol registrations that the
|
|
143
|
-
community inspector cannot interpret, keep that interpretation in a generic
|
|
144
|
-
project-owned `inspect` adapter attached to `extractCustom()`. Return findings
|
|
145
|
-
and capability gaps through the public Context contract; do not add internal
|
|
146
|
-
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
|
|
@@ -310,32 +310,20 @@ Graph outcome. Only `selection-validation-required` returns a selection
|
|
|
310
310
|
proposal input. The Route writes no workspace or runtime state, and neither a
|
|
311
311
|
visible-Skill claim nor the Route report authorizes Bundle materialization.
|
|
312
312
|
|
|
313
|
-
## Contract overlay validation
|
|
313
|
+
## Contract overlay validation
|
|
314
314
|
|
|
315
315
|
`validate-indexer-contract-overlays` recomputes the complete data-only overlay
|
|
316
316
|
against the exact CLI base and operator contracts. Invalid DSL, executable
|
|
317
317
|
fields, identity redefinition, threshold weakening, digest drift or a partial
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
without an installed trust bundle, or an attestation whose issuer/key is absent
|
|
328
|
-
from the canonical bundle returns `authorization-required`; the request binds
|
|
329
|
-
the exact attestation digest (or null) together with the
|
|
330
|
-
project/overlay/base/operator/Provider/conformance digest set. The
|
|
331
|
-
non-delegable `authorize-indexer-contract-overlay` Gate may issue that
|
|
332
|
-
project-exact authorization under the independent
|
|
333
|
-
`context.indexer-contract-overlay` authority; revalidation then produces the
|
|
334
|
-
same trust-receipt protocol with trust class
|
|
335
|
-
`project-authorized-exact-digest`. Cross-project or stale reports cannot be
|
|
336
|
-
reused. Once the bundle contains the declared issuer/key, an invalid signature,
|
|
337
|
-
expired key, revoked key, or malformed policy is a hard trust failure and
|
|
338
|
-
cannot downgrade to project authorization.
|
|
318
|
+
Provider identity fails validation. The selected Provider Bundle integrity is
|
|
319
|
+
an exact input, not a self-reported trust assertion.
|
|
320
|
+
|
|
321
|
+
Successful validation emits
|
|
322
|
+
`context.indexer.overlay-validation-receipt/v1`. The receipt binds the exact
|
|
323
|
+
project, overlay, base contract, operator contract, Provider Bundle integrity
|
|
324
|
+
and canonical conformance report. There is no signature, KMS, trust-bundle or
|
|
325
|
+
overlay-authorization protocol. Changing any bound digest requires
|
|
326
|
+
revalidation; a stale receipt cannot be reused.
|
|
339
327
|
|
|
340
328
|
## Question amendment back-edge
|
|
341
329
|
|
|
@@ -347,8 +335,8 @@ and durable single-file journal. A Skill question ref is guidance only; it
|
|
|
347
335
|
cannot provide or alter the contract payload.
|
|
348
336
|
|
|
349
337
|
An overlay-backed question follows a different sequence. Context first
|
|
350
|
-
recomputes overlay DSL conformance and verifies
|
|
351
|
-
|
|
338
|
+
recomputes overlay DSL conformance and verifies the exact validation receipt.
|
|
339
|
+
Only then may
|
|
352
340
|
`context.indexer.overlay-question-amendment/v1` expand namespaced question and
|
|
353
341
|
target-domain additions from that overlay. The target coverage domain must
|
|
354
342
|
already be in scope and have one existing primary owner. The amendment is a
|
|
@@ -359,23 +347,24 @@ The executable sequence is
|
|
|
359
347
|
`propose-overlay-question-amendment`,
|
|
360
348
|
`confirm-overlay-question-amendment`, then
|
|
361
349
|
`rebind-indexer-selection-to-requirement`. Proposal and rebind inputs carry the
|
|
362
|
-
exact
|
|
350
|
+
exact overlay validation input and result; Context recomputes and
|
|
363
351
|
compares that pair instead of accepting a detached receipt. Confirmation emits
|
|
364
352
|
the exact amendment decision and performs no project write.
|
|
365
353
|
|
|
366
354
|
The rebind Action then proves that Indexer/provider
|
|
367
355
|
identity, operations, scopes, profile composition, requirement bindings, owner
|
|
368
|
-
closure and read authority are byte-identical. It revalidates overlay
|
|
356
|
+
closure and read authority are byte-identical. It revalidates overlay
|
|
357
|
+
conformance,
|
|
369
358
|
reuses the exact staged Bundles, and reruns both static and final selection
|
|
370
359
|
against the target requirement digest. Provider and SubjectKey authority must
|
|
371
360
|
remain unchanged. Final selection resolves every CLI-base question back to its
|
|
372
|
-
exact selected profile contract and requires one current
|
|
361
|
+
exact selected profile contract and requires one current validation proof
|
|
373
362
|
for every overlay question; forged bindings and duplicate, stale, or unused
|
|
374
363
|
proofs fail before the final report is issued. The report binds the resulting
|
|
375
364
|
question authority set digest. The resulting
|
|
376
365
|
`context.indexer.overlay-question-registry-apply-proposal/v1` contains the full
|
|
377
366
|
target `src/indexers.yaml` snapshot and binds the amendment, confirmation,
|
|
378
|
-
overlay
|
|
367
|
+
overlay validation, rebound selection, SubjectKey schema set and finalized reports.
|
|
379
368
|
The proposal goes through the same `stage-indexer-project-proposal` and
|
|
380
369
|
`apply-indexer-project` Actions as ordinary registry/customization proposals.
|
|
381
370
|
The latter dispatches this typed proposal to one expected-base CAS, project
|
|
@@ -403,9 +392,8 @@ verified or exact project-authorized program may use the `trusted-program` path,
|
|
|
403
392
|
which is not an isolation claim. An untrusted program without a real sandbox is
|
|
404
393
|
not executable.
|
|
405
394
|
|
|
406
|
-
The program input
|
|
407
|
-
`context.indexer.run-
|
|
408
|
-
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
|
|
409
397
|
`context.indexer.controlled-program-result/v1` to bind the exact invocation and
|
|
410
398
|
payload digest. Context still validates the operation-specific Result and
|
|
411
399
|
recomputes mechanical gates independently.
|
|
@@ -423,9 +411,9 @@ program, instructions, templates, config, CLI/profile contracts and only
|
|
|
423
411
|
`primary_resource_binding_digest`; a post-author resource cannot satisfy that
|
|
424
412
|
schema.
|
|
425
413
|
|
|
426
|
-
`context.indexer.main-workset/
|
|
414
|
+
`context.indexer.main-workset/v2` digests its complete canonical payload. A
|
|
427
415
|
workset set permits only one author workset for an Indexer, owner cohort and
|
|
428
|
-
group key. `context.indexer.main-transport-batch/
|
|
416
|
+
group key. `context.indexer.main-transport-batch/v2` may carry several complete
|
|
429
417
|
worksets but intentionally has no batch identity, digest, page number or
|
|
430
418
|
reader-facing name. Regrouping worksets for Host transport therefore cannot
|
|
431
419
|
change an individual workset or Result identity.
|
|
@@ -440,17 +428,14 @@ same workset with the next authorized strategy. This path has no user Gate and
|
|
|
440
428
|
does not consume profile-revision attempts; an exhausted strategy set routes
|
|
441
429
|
to the CLI catalog fallback.
|
|
442
430
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
`
|
|
450
|
-
|
|
451
|
-
set, and operation validation compares it with the actual CLI-issued receipts.
|
|
452
|
-
Changing a cursor, page size, call grouping or Host batch cannot manufacture a
|
|
453
|
-
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.
|
|
454
439
|
|
|
455
440
|
Post-author composition uses its own
|
|
456
441
|
`context.indexer.post-author-run-ledger/v1`; it never reuses primary main-run
|
|
@@ -526,7 +511,7 @@ derived under `knowledge/<collection>/` and never accepted from a Provider.
|
|
|
526
511
|
|
|
527
512
|
Template Artifacts enter layout only after validated rendering. Only rendered
|
|
528
513
|
Sections exist; an omitted optional projection does not create an empty
|
|
529
|
-
Section, while a retained material gap remains
|
|
514
|
+
Section, while a retained material gap remains unresolved without
|
|
530
515
|
reader-visible placeholder content. Artifact Bundle purpose and `split_of`
|
|
531
516
|
lineage are retained in the proposal. A proposal set rejects duplicate Node
|
|
532
517
|
owners, Artifact identities, logical Section identities, Section placements
|
|
@@ -556,12 +541,9 @@ fan-out to an already approved Node, removing or renaming an Artifact,
|
|
|
556
541
|
splitting/merging its declared lineage, moving a logical Section, or changing
|
|
557
542
|
an approved collection/path is represented by a digest-bound layout change
|
|
558
543
|
report and requires the human, non-delegable `confirm-layout-change` Gate.
|
|
559
|
-
`context.indexer.layout-transition/v1`
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
then does it expose the conditional Gate. Replacing the proposal set makes the
|
|
563
|
-
prior actualization stale. The legacy align Route remains available only until
|
|
564
|
-
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.
|
|
565
547
|
|
|
566
548
|
## Explicit Result-bound Candidate compile
|
|
567
549
|
|
|
@@ -570,7 +552,7 @@ author Results from the durable main-run store. Its input repeats only the
|
|
|
570
552
|
exact workset, execution-request, acceptance and Artifact Result digests; the
|
|
571
553
|
CLI rejects a missing, extra, forged or stale Result reference before
|
|
572
554
|
materialization. Callers cannot provide an alternate Result body, Provider
|
|
573
|
-
contract
|
|
555
|
+
contract or a second document-authoring payload.
|
|
574
556
|
|
|
575
557
|
The compiler validates every accepted run envelope and acceptance record,
|
|
576
558
|
then binds each Candidate to the same Indexer Result, source identity,
|
|
@@ -593,62 +575,19 @@ customization may be proposed only after the explicit
|
|
|
593
575
|
`indexer-customization-required` outcome and its capability-gap proof; compile
|
|
594
576
|
itself never invents one.
|
|
595
577
|
|
|
596
|
-
## Material
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
the
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
material-answer run ledger uses CAS transitions and content-addressed accepted
|
|
610
|
-
records. A complete accepted empty Result is recovered without another dispatch;
|
|
611
|
-
an interrupted running entry without its accepted record returns to pending.
|
|
612
|
-
Before acceptance, every evidence claim must resolve through an exact current
|
|
613
|
-
source-span read receipt, and unused or stale receipts are rejected.
|
|
614
|
-
|
|
615
|
-
A `material-answer` Result cannot move a retained gap directly to an approved
|
|
616
|
-
state. Context first validates the exact workset, question revision, eligible
|
|
617
|
-
Indexer, Provider fingerprint, source authority, canonical spans, evidence
|
|
618
|
-
content digests, provenance selector and minimum item/origin counts. Only a
|
|
619
|
-
passing candidate can produce
|
|
620
|
-
`context.indexer.material-answer-baseline-report/v1`. Its fixed Review scope is
|
|
621
|
-
`question-target-source-span-evidence-binding`; the strict schema has no field
|
|
622
|
-
for approving a reader page, Artifact content or final knowledge candidate.
|
|
623
|
-
|
|
624
|
-
`context.indexer.material-answer-review-decision/v1` binds that report, the
|
|
625
|
-
candidate set, workset, question revision and binding digest. Applying an
|
|
626
|
-
`approved` decision uses the workset's predecessor ledger revision as a CAS
|
|
627
|
-
base, consumes that workset and records the decision digest in the canonical
|
|
628
|
-
answer binding. A successor ledger revision does not make the consumed workset
|
|
629
|
-
self-stale. A rejected, insufficient, forged or differently scoped decision
|
|
630
|
-
cannot create `answer-approved` state.
|
|
631
|
-
|
|
632
|
-
Layout uses an unapplied
|
|
633
|
-
`context.indexer.material-answer-layout-proposal/v1`. Each planned or existing
|
|
634
|
-
answer landing must map uniquely to an actual `node:`, `artifact:` or
|
|
635
|
-
`section:` ref. Before creating a resolved actualization, Context recomputes
|
|
636
|
-
`context.indexer.material-answer-evidence-compatibility/v1` from the retained
|
|
637
|
-
canonical evidence and current question/source authority. A changed source set,
|
|
638
|
-
origin, snapshot, kind, span, content digest, provenance rule or minimum count
|
|
639
|
-
reopens the gap to `unresolved`. A missing or colliding landing remains
|
|
640
|
-
`answer-approved`; rejecting or replacing a layout proposal invalidates its
|
|
641
|
-
resolved mappings back to `answer-approved`.
|
|
642
|
-
|
|
643
|
-
`context.indexer.material-answer-flow-status/v1` is the admission fact for the
|
|
644
|
-
next stages. An unresolved blocking gap stops layout. An `answer-approved`
|
|
645
|
-
blocking gap may enter layout but cannot consume a conditional layout Gate or
|
|
646
|
-
enter the main Candidate Review. Those two admissions become true only when
|
|
647
|
-
every blocking answer has a current actualization for the exact layout digest.
|
|
648
|
-
Optional gaps remain reported but do not become blocking. Final close removes
|
|
649
|
-
a resolved ledger entry only when the approved structure projection carries
|
|
650
|
-
the same question, binding, actualized target and complete canonical evidence
|
|
651
|
-
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.
|
|
652
591
|
|
|
653
592
|
## Detector and inspector
|
|
654
593
|
|
|
@@ -671,12 +610,19 @@ payloads fail closed.
|
|
|
671
610
|
`present`, `absent` or `unknown`; a present signal requires evidence. Context,
|
|
672
611
|
not the detector, derives `matched`, `not-matched` or `indeterminate`.
|
|
673
612
|
|
|
674
|
-
An authoring inspector consumes `context.indexer.inspector-request/v1
|
|
675
|
-
|
|
676
|
-
|
|
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
|
|
677
622
|
`enricher` plus `lightweight-evidence`; they cannot own baseline inventory or
|
|
678
623
|
contribute a denominator. The Result must close the requested inventory and
|
|
679
|
-
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
|
|
680
626
|
the reverified content-addressed stage through the same empty-environment,
|
|
681
627
|
no-shell, bounded JSON subprocess runner. Timeout, stdin/stdout/stderr overflow,
|
|
682
628
|
invalid UTF-8/JSON, undeclared evidence and scope expansion are typed failures;
|
|
@@ -793,27 +739,3 @@ structured claim passed owner-local evidence coverage, and lists every
|
|
|
793
739
|
semantic-prose block or direct authored template variable as
|
|
794
740
|
`semantic-prose-agent-review-required`. It does not scan free prose to claim
|
|
795
741
|
that unsupported natural-language assertions were mechanically detected.
|
|
796
|
-
|
|
797
|
-
## Material-question target exclusion
|
|
798
|
-
|
|
799
|
-
A target exclusion is not a Provider Result and does not change the confirmed
|
|
800
|
-
requirement. Context first emits
|
|
801
|
-
`context.indexer.material-question-exclusion-report/v1` for one current
|
|
802
|
-
unresolved `QuestionTargetKey`. The report binds the project, predecessor
|
|
803
|
-
ledger revision, question-target inventory, question contract and revision,
|
|
804
|
-
target ref/item digest, exact allowlisted reason, derived severity and the
|
|
805
|
-
reader-visible impact.
|
|
806
|
-
|
|
807
|
-
`confirm-material-question-exclusion` accepts only that report and always emits
|
|
808
|
-
`context.indexer.material-question-exclusion-confirmation/v1` with human,
|
|
809
|
-
non-delegable authority. Managed mode, Provider omission, wildcard targets and
|
|
810
|
-
non-allowlisted reasons cannot create the decision. Apply revalidates the
|
|
811
|
-
report against the current resolved question and ledger before retaining only
|
|
812
|
-
the reason code and decision digest in the entry.
|
|
813
|
-
|
|
814
|
-
The successor ledger is checkpointed with the predecessor revision through the
|
|
815
|
-
same durable structure journal. A question contract, owner, target item,
|
|
816
|
-
question revision or other pair dependency change replaces the retained
|
|
817
|
-
exclusion with an unresolved entry in one checkpoint. The Material Gap ledger
|
|
818
|
-
is intentionally absent from the main-workset identity, so this target-level
|
|
819
|
-
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,
|