@c4a/context-cli 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 +18 -39
- package/README.zh-CN.md +13 -27
- package/cli.js +59230 -80555
- package/indexers/bundles/context-code-indexer/SKILL.md +30 -3
- package/indexers/bundles/context-code-indexer/context-indexer.yaml +3 -8
- package/indexers/bundles/context-code-indexer/references/indexer.md +110 -7
- package/indexers/bundles/context-code-indexer/references/metrics.md +143 -37
- package/indexers/bundles/context-code-indexer/templates/adapter-integration.md +2 -2
- package/indexers/bundles/context-code-indexer/templates/component-library.md +8 -0
- package/indexers/bundles/context-code-indexer/templates/gateway-facade.md +16 -0
- package/indexers/bundles/context-markdown-indexer/SKILL.md +13 -3
- package/indexers/bundles/context-markdown-indexer/context-indexer.yaml +20 -7
- package/indexers/bundles/context-markdown-indexer/references/indexer.md +33 -4
- package/indexers/bundles/context-markdown-indexer/references/semantic-planning.md +30 -14
- package/indexers/bundles/context-markdown-indexer/references/structure-and-artifacts.md +6 -0
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/anonymous.json +1 -1
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/profiles.json +13 -13
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/routing.json +122 -0
- package/indexers/contracts/operator-contract.json +2 -2
- package/indexers/contracts/profile-contract.json +3819 -454
- package/indexers/release-manifest.json +22 -22
- package/package.json +13 -3
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/context.md +44 -85
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/context/SKILL.md +44 -85
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/commands/c4a-context.md +44 -85
- package/plugins/skills/context/SKILL.md +44 -85
- package/plugins/skills/context-code-indexer/SKILL.md +30 -3
- package/plugins/skills/context-code-indexer/context-indexer.yaml +3 -8
- package/plugins/skills/context-code-indexer/references/indexer.md +110 -7
- package/plugins/skills/context-code-indexer/references/metrics.md +143 -37
- package/plugins/skills/context-code-indexer/templates/adapter-integration.md +2 -2
- package/plugins/skills/context-code-indexer/templates/component-library.md +8 -0
- package/plugins/skills/context-code-indexer/templates/gateway-facade.md +16 -0
- package/plugins/skills/context-markdown-indexer/SKILL.md +13 -3
- package/plugins/skills/context-markdown-indexer/context-indexer.yaml +20 -7
- package/plugins/skills/context-markdown-indexer/references/indexer.md +33 -4
- package/plugins/skills/context-markdown-indexer/references/semantic-planning.md +30 -14
- package/plugins/skills/context-markdown-indexer/references/structure-and-artifacts.md +6 -0
- package/plugins/skills/context-markdown-indexer/tests/fixtures/anonymous.json +1 -1
- package/plugins/skills/context-markdown-indexer/tests/fixtures/profiles.json +13 -13
- package/plugins/skills/context-markdown-indexer/tests/fixtures/routing.json +122 -0
- package/providers/context/actions/advance-current-indexer-lifecycle.yaml +6 -0
- package/providers/context/actions/configure-indexer-providers.yaml +1 -1
- package/providers/context/actions/materialize-indexer-workset-view.yaml +7 -0
- package/providers/context/actions/run-indexer-lifecycle.yaml +7 -0
- package/providers/context/actions/run-indexer-post-author-composer.yaml +1 -1
- package/providers/context/codes.yaml +9 -49
- package/providers/context/graphs/indexer.yaml +75 -592
- package/providers/context/graphs/workspace.yaml +25 -500
- package/providers/context/manifest.json +110 -1199
- package/providers/context/provider.yaml +2 -2
- package/providers/context/resources/diagnostics/projection-stale.md +0 -1
- package/providers/context/resources/dialogue/human-gates.md +3 -3
- package/providers/context/resources/manuals/reference/package-templates.md +2 -3
- package/providers/context/resources/manuals/reference/project-api.md +52 -985
- package/providers/context/resources/procedures/close-and-build.md +8 -23
- package/providers/context/resources/procedures/knowledge-review.md +13 -4
- package/providers/context/resources/procedures/source-capture-detailed.md +6 -8
- package/providers/context/resources/views/authorized-indexer-workset-view.yaml +15 -0
- package/providers/context/resources/views/package-current.yaml +1 -1
- package/providers/context/resources/views/resolved-indexer-instructions.yaml +1 -1
- package/providers/context/resources/views/review-current.yaml +1 -1
- package/providers/context/resources/views/source-boundary.yaml +1 -1
- package/providers/context/resources/views/source-current.yaml +1 -1
- package/providers/context/resources/views/verification-current.yaml +1 -1
- package/providers/context/resources/views/workspace-current.yaml +1 -1
- package/providers/context/schemas/indexer-agent-step-input.schema.json +2 -2
- package/providers/context/schemas/indexer-agent-step-result.schema.json +298 -32
- package/providers/context/schemas/indexer-authorized-workset-view.schema.json +65 -0
- package/providers/context/schemas/indexer-contract-overlay-validation-input.schema.json +0 -42
- package/providers/context/schemas/indexer-contract-overlay-validation-result.schema.json +27 -122
- package/providers/context/schemas/indexer-lifecycle-continuation.schema.json +15 -0
- package/providers/context/schemas/indexer-main-lifecycle-input.schema.json +13 -20
- package/providers/context/schemas/indexer-main-lifecycle-output.schema.json +17 -2
- package/providers/context/schemas/indexer-materialized-resource.schema.json +8 -1
- package/providers/context/schemas/indexer-overlay-question-proposal-input.schema.json +55 -6
- package/providers/context/schemas/indexer-overlay-question-rebind-input.schema.json +4 -4
- package/providers/context/schemas/indexer-workset-view-materialization-request.schema.json +32 -0
- package/providers/context/skills/configure-indexer-providers/SKILL.md +40 -27
- package/providers/context/skills/run-indexer-agent-step/SKILL.md +34 -8
- package/providers/context/skills/run-indexer-lifecycle/SKILL.md +37 -0
- package/providers/context/skills/run-indexer-post-author-composer/SKILL.md +38 -9
- package/docs/document-optimization.md +0 -82
- package/docs/document-optimization.zh-CN.md +0 -70
- package/indexers/capability-manifest.json +0 -40
- package/indexers/contracts/hard-rule-conformance.json +0 -2644
- package/providers/context/actions/accept-main-index-run.yaml +0 -7
- package/providers/context/actions/accept-material-answer-run.yaml +0 -7
- package/providers/context/actions/accept-post-author-composer-run.yaml +0 -7
- package/providers/context/actions/actualize-material-answer-bindings.yaml +0 -8
- package/providers/context/actions/align-next.yaml +0 -6
- package/providers/context/actions/apply-code-index-guidance.yaml +0 -5
- package/providers/context/actions/apply-document-optimization-guidance.yaml +0 -5
- package/providers/context/actions/apply-structure-confirmation.yaml +0 -5
- package/providers/context/actions/audit-material-gap-state.yaml +0 -8
- package/providers/context/actions/audit-projected-artifact-fan-out.yaml +0 -8
- package/providers/context/actions/authorize-indexer-contract-overlay.yaml +0 -7
- package/providers/context/actions/build-main-index-author-worksets.yaml +0 -7
- package/providers/context/actions/build-main-index-catalog-fallback.yaml +0 -7
- package/providers/context/actions/build-main-index-partition-worksets.yaml +0 -7
- package/providers/context/actions/build-material-question-workset.yaml +0 -7
- package/providers/context/actions/build-post-author-composer-worksets.yaml +0 -7
- package/providers/context/actions/build-question-target-inventory.yaml +0 -7
- package/providers/context/actions/build-subject-catalog.yaml +0 -7
- package/providers/context/actions/build-target-resolution-views.yaml +0 -7
- package/providers/context/actions/checkpoint-material-answer-review.yaml +0 -8
- package/providers/context/actions/checkpoint-material-gaps.yaml +0 -8
- package/providers/context/actions/close-indexer-approved-knowledge.yaml +0 -8
- package/providers/context/actions/compile-next.yaml +0 -5
- package/providers/context/actions/compose-indexer-post-author-fragments.yaml +0 -7
- package/providers/context/actions/configure-code-extraction.yaml +0 -5
- package/providers/context/actions/configure-prose-lifecycle.yaml +0 -5
- package/providers/context/actions/converge-main-index-partition-run.yaml +0 -7
- package/providers/context/actions/evaluate-material-gaps.yaml +0 -8
- package/providers/context/actions/extract-next.yaml +0 -5
- package/providers/context/actions/fail-main-index-run.yaml +0 -7
- package/providers/context/actions/fail-material-answer-run.yaml +0 -7
- package/providers/context/actions/fail-post-author-composer-run.yaml +0 -7
- package/providers/context/actions/inspect-code-extraction.yaml +0 -5
- package/providers/context/actions/inspect-document-classification.yaml +0 -5
- package/providers/context/actions/inspect-index-candidate-review-readiness.yaml +0 -8
- package/providers/context/actions/inspect-index-profile-failure.yaml +0 -7
- package/providers/context/actions/inspect-material-answer-review.yaml +0 -8
- package/providers/context/actions/inspect-structure.yaml +0 -5
- package/providers/context/actions/migrate-codeindex.yaml +0 -5
- package/providers/context/actions/observe-main-index-run-ledger.yaml +0 -7
- package/providers/context/actions/observe-material-answer-runs.yaml +0 -7
- package/providers/context/actions/observe-post-author-composer-worksets.yaml +0 -7
- package/providers/context/actions/optimize-documents.yaml +0 -6
- package/providers/context/actions/override-index-profile-audit.yaml +0 -7
- package/providers/context/actions/prepare-main-index-run-ledger.yaml +0 -7
- package/providers/context/actions/prepare-material-answer-runs.yaml +0 -7
- package/providers/context/actions/preview-extraction-batch.yaml +0 -5
- package/providers/context/actions/reconcile-indexer-results.yaml +0 -7
- package/providers/context/actions/reconcile-review-identities.yaml +0 -5
- package/providers/context/actions/record-index-profile-revision.yaml +0 -7
- package/providers/context/actions/report-index-profile-failure.yaml +0 -7
- package/providers/context/actions/resolve-effective-composers.yaml +0 -7
- package/providers/context/actions/review-material-answer-candidate.yaml +0 -8
- package/providers/context/actions/revise-code-index-audit.yaml +0 -5
- package/providers/context/actions/revise-document.yaml +0 -5
- package/providers/context/actions/revise-index-output.yaml +0 -7
- package/providers/context/actions/run-material-answer-indexers.yaml +0 -7
- package/providers/context/actions/start-main-index-run.yaml +0 -7
- package/providers/context/actions/start-material-answer-run.yaml +0 -7
- package/providers/context/actions/start-post-author-composer-run.yaml +0 -7
- package/providers/context/actions/submit-code-index-audit.yaml +0 -6
- package/providers/context/resources/dialogue/code-extraction.md +0 -87
- package/providers/context/resources/dialogue/document-classification.md +0 -33
- package/providers/context/resources/dialogue/structure-confirmation.md +0 -44
- package/providers/context/resources/dialogue/workflow-mode-after-capture.md +0 -25
- package/providers/context/resources/manuals/reference/code-extractors.md +0 -152
- package/providers/context/resources/procedures/code-extraction.md +0 -188
- package/providers/context/resources/procedures/code-index-audit.md +0 -113
- package/providers/context/resources/procedures/document-classification.md +0 -22
- package/providers/context/resources/procedures/document-optimization.md +0 -110
- package/providers/context/resources/procedures/document-revision.md +0 -36
- package/providers/context/resources/procedures/prose-align.md +0 -68
- package/providers/context/resources/procedures/prose-compile.md +0 -23
- package/providers/context/resources/semantic/align/candidate-resolution.md +0 -106
- package/providers/context/resources/semantic/align/density-profile.md +0 -41
- package/providers/context/resources/semantic/align/gates.md +0 -276
- package/providers/context/resources/semantic/align/structure-planning.md +0 -337
- package/providers/context/resources/semantic/code-index/classification.md +0 -270
- package/providers/context/resources/semantic/code-index/templates/adapter.md +0 -118
- package/providers/context/resources/semantic/code-index/templates/api-service.md +0 -116
- package/providers/context/resources/semantic/code-index/templates/background-runtime.md +0 -109
- package/providers/context/resources/semantic/code-index/templates/cli-tool.md +0 -129
- package/providers/context/resources/semantic/code-index/templates/contract-source.md +0 -73
- package/providers/context/resources/semantic/code-index/templates/contracts-and-chains.md +0 -81
- package/providers/context/resources/semantic/code-index/templates/cross-module-chain.md +0 -78
- package/providers/context/resources/semantic/code-index/templates/derived-source.md +0 -116
- package/providers/context/resources/semantic/code-index/templates/domain-service.md +0 -109
- package/providers/context/resources/semantic/code-index/templates/event-flow.md +0 -62
- package/providers/context/resources/semantic/code-index/templates/monorepo-container.md +0 -124
- package/providers/context/resources/semantic/code-index/templates/persistence-boundary.md +0 -56
- package/providers/context/resources/semantic/code-index/templates/plugin-extension.md +0 -52
- package/providers/context/resources/semantic/code-index/templates/protocol-boundary.md +0 -88
- package/providers/context/resources/semantic/code-index/templates/sdk-library.md +0 -132
- package/providers/context/resources/semantic/code-index/templates/web-application.md +0 -145
- package/providers/context/resources/semantic/compile/index.md +0 -31
- package/providers/context/resources/views/code-index-audit.yaml +0 -6
- package/providers/context/resources/views/document-optimization-current.yaml +0 -6
- package/providers/context/resources/views/extraction-preview.yaml +0 -6
- package/providers/context/resources/views/structure-current.yaml +0 -6
- package/providers/context/schemas/code-index-audit-decision.schema.json +0 -94
- package/providers/context/schemas/document-optimization-decisions.schema.json +0 -57
- package/providers/context/schemas/indexer-candidate-review-readiness-input.schema.json +0 -46
- package/providers/context/schemas/indexer-candidate-review-readiness-output.schema.json +0 -104
- package/providers/context/schemas/indexer-contract-overlay-authorization-input.schema.json +0 -32
- package/providers/context/schemas/indexer-contract-overlay-authorization-result.schema.json +0 -121
- package/providers/context/schemas/indexer-material-answer-lifecycle-input.schema.json +0 -90
- package/providers/context/schemas/indexer-material-answer-lifecycle-output.schema.json +0 -80
- package/providers/context/schemas/indexer-material-answer-review-inspection-input.schema.json +0 -32
- package/providers/context/schemas/indexer-material-answer-review-inspection-output.schema.json +0 -32
- package/providers/context/schemas/indexer-material-answer-review-resolution-input.schema.json +0 -19
- package/providers/context/schemas/indexer-material-answer-review-resolution-output.schema.json +0 -87
- package/providers/context/schemas/indexer-material-gap-lifecycle-input.schema.json +0 -86
- package/providers/context/schemas/indexer-material-gap-lifecycle-output.schema.json +0 -19
- package/providers/context/schemas/indexer-post-author-fragment-result.schema.json +0 -18
- package/providers/context/schemas/indexer-post-author-lifecycle-input.schema.json +0 -94
- package/providers/context/schemas/indexer-post-author-lifecycle-output.schema.json +0 -72
- package/providers/context/schemas/indexer-profile-failure-inspection-input.schema.json +0 -13
- package/providers/context/schemas/indexer-profile-failure-inspection-result.schema.json +0 -19
- package/providers/context/schemas/indexer-profile-failure-report-input.schema.json +0 -22
- package/providers/context/schemas/indexer-profile-failure-report-result.schema.json +0 -49
- package/providers/context/schemas/indexer-profile-override-decision.schema.json +0 -20
- package/providers/context/schemas/indexer-profile-override-result.schema.json +0 -49
- package/providers/context/schemas/indexer-profile-revision-agent-input.schema.json +0 -18
- package/providers/context/schemas/indexer-profile-revision-record-input.schema.json +0 -31
- package/providers/context/schemas/indexer-profile-revision-record-result.schema.json +0 -45
- package/providers/context/schemas/indexer-result-reconciliation-input.schema.json +0 -59
- package/providers/context/schemas/indexer-result-reconciliation-output.schema.json +0 -43
- package/providers/context/schemas/prose-structure-batch.schema.json +0 -35
- package/providers/context/skills/revise-index-output/SKILL.md +0 -12
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: semantic.code-index.template.cli-tool
|
|
3
|
-
kind: procedure
|
|
4
|
-
media-type: text/markdown
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# CLI and developer tool template
|
|
8
|
-
|
|
9
|
-
Use for `cli-tool`: command-line applications, developer tools, administrative
|
|
10
|
-
executables, generators, and command-driven plugin hosts. A build script used
|
|
11
|
-
only internally does not need a CLI knowledge unit unless it is a supported
|
|
12
|
-
operator or contributor surface.
|
|
13
|
-
|
|
14
|
-
Recommended `outputProfile`: `command-map`.
|
|
15
|
-
|
|
16
|
-
## Evidence pass
|
|
17
|
-
|
|
18
|
-
Locate:
|
|
19
|
-
|
|
20
|
-
- executable/bin entry, runtime requirement, and command parser;
|
|
21
|
-
- root and nested command registration;
|
|
22
|
-
- positional arguments, flags, defaults, mutually exclusive options, and input
|
|
23
|
-
schemas;
|
|
24
|
-
- configuration files, environment variables, profiles, credential sources,
|
|
25
|
-
and precedence;
|
|
26
|
-
- interactive prompts versus non-interactive/automation behavior;
|
|
27
|
-
- filesystem, repository, network, platform, and plugin side effects;
|
|
28
|
-
- output formats, stdout/stderr behavior, exit codes, polling, and recovery;
|
|
29
|
-
- local development, packaging, installation, compatibility, and release;
|
|
30
|
-
- deprecated commands, aliases, parser helpers, and formatters to exclude.
|
|
31
|
-
|
|
32
|
-
Inspect actual command registration and representative execution paths. Help
|
|
33
|
-
text is useful evidence but may not describe hidden preconditions or effects.
|
|
34
|
-
|
|
35
|
-
## Questions the knowledge must answer
|
|
36
|
-
|
|
37
|
-
1. How is the CLI installed or invoked, and what runtime does it require?
|
|
38
|
-
2. What stable command families exist and what user outcomes do they produce?
|
|
39
|
-
3. What inputs, configuration, credentials, and precedence rules apply?
|
|
40
|
-
4. Which commands mutate files, repositories, remote services, or user state?
|
|
41
|
-
5. What output and exit behavior supports automation and diagnosis?
|
|
42
|
-
6. Which plugin or extension points change the command surface?
|
|
43
|
-
7. How does a user recover from common source-backed failure states?
|
|
44
|
-
|
|
45
|
-
## Suggested knowledge units
|
|
46
|
-
|
|
47
|
-
- **Command map**: invocation model, command families, configuration,
|
|
48
|
-
credentials, side effects, output formats, and extension points.
|
|
49
|
-
- **Task workflow**: an end-to-end supported user goal spanning several
|
|
50
|
-
commands, with preconditions, state transitions, and recovery.
|
|
51
|
-
- **Command-family reference**: coherent subcommands with inputs, outputs,
|
|
52
|
-
side effects, and examples.
|
|
53
|
-
- **Configuration and credentials**: when precedence or environment behavior is
|
|
54
|
-
complex and stable enough for a dedicated page.
|
|
55
|
-
- **Plugin/extension contract**: use the single complete blueprint in
|
|
56
|
-
`plugin-extension.md`; the command map only links commands and configuration
|
|
57
|
-
to that contract.
|
|
58
|
-
- **Development and release guide**: only source-backed contributor workflows
|
|
59
|
-
owned by this module.
|
|
60
|
-
|
|
61
|
-
## Chapter blueprints
|
|
62
|
-
|
|
63
|
-
```markdown
|
|
64
|
-
# <CLI> command map
|
|
65
|
-
## Purpose, installation, and invocation
|
|
66
|
-
## Command families
|
|
67
|
-
## Configuration and precedence
|
|
68
|
-
## Credentials and external dependencies
|
|
69
|
-
## Filesystem/repository/remote side effects
|
|
70
|
-
## Output formats and exit semantics
|
|
71
|
-
## Plugins, compatibility, and release
|
|
72
|
-
## Diagnostics, recovery, and exclusions
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
For a command family:
|
|
76
|
-
|
|
77
|
-
```markdown
|
|
78
|
-
# <Command family>
|
|
79
|
-
## User outcomes and preconditions
|
|
80
|
-
## Commands and arguments
|
|
81
|
-
## Configuration and credential requirements
|
|
82
|
-
## Execution and side effects
|
|
83
|
-
## Output and exit behavior
|
|
84
|
-
## Failure recovery
|
|
85
|
-
## Source-backed examples
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
A workflow page may use:
|
|
89
|
-
|
|
90
|
-
```markdown
|
|
91
|
-
# <User task>
|
|
92
|
-
## Starting state
|
|
93
|
-
## Command sequence
|
|
94
|
-
## State and artifact changes
|
|
95
|
-
## Remote operations
|
|
96
|
-
## Success checks
|
|
97
|
-
## Recovery and rollback boundaries
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Granularity and relationships
|
|
101
|
-
|
|
102
|
-
Prefer command families and user tasks over one page per parser node, flag,
|
|
103
|
-
prompt, formatter, or implementation function. Split only when commands have
|
|
104
|
-
different state ownership, external systems, or safety/recovery contracts.
|
|
105
|
-
|
|
106
|
-
Every retained page must name real commands, task outcomes, state changes, or
|
|
107
|
-
extension identities with source locators. A list of command directories or
|
|
108
|
-
parser nodes is not a command map.
|
|
109
|
-
|
|
110
|
-
Connect commands to configuration, package/file outputs, plugin providers, and
|
|
111
|
-
platform operations only when source registrations or call sites prove them.
|
|
112
|
-
|
|
113
|
-
## Template composition examples
|
|
114
|
-
|
|
115
|
-
- A CLI with installable providers also reads `adapter.md` and
|
|
116
|
-
`plugin-extension.md`.
|
|
117
|
-
- A CLI that primarily wraps a remote protocol selects `protocol-consumer` and
|
|
118
|
-
reads `protocol-boundary.md`.
|
|
119
|
-
- A monorepo release tool may combine this template with
|
|
120
|
-
`monorepo-container.md` and `build-release` without duplicating its command
|
|
121
|
-
registry.
|
|
122
|
-
|
|
123
|
-
## Revise or stop when
|
|
124
|
-
|
|
125
|
-
- no stable command registry or executable entry is found;
|
|
126
|
-
- examples require inventing flags or commands not present in source;
|
|
127
|
-
- side effects or credential behavior are unclear but material to safe use;
|
|
128
|
-
- every option/parser helper is becoming an independent page;
|
|
129
|
-
- deprecated or hidden implementation commands are presented as supported.
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: semantic.code-index.template.contract-source
|
|
3
|
-
kind: procedure
|
|
4
|
-
media-type: text/markdown
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Authoritative contract source template
|
|
8
|
-
|
|
9
|
-
Use for `contract-source`: a module whose maintained value is an authoritative
|
|
10
|
-
IDL, OpenAPI document, schema registry, message contract, or equivalent
|
|
11
|
-
machine-readable interface definition. It defines contracts consumed by other
|
|
12
|
-
modules but does not need to execute or dispatch them itself.
|
|
13
|
-
|
|
14
|
-
Recommended `outputProfile`: `protocol-index`. Also select
|
|
15
|
-
`protocol-provider`, and use `generated-contract` only for generated projections
|
|
16
|
-
that point back to this authority. The normal lifecycle is `authoritative`.
|
|
17
|
-
|
|
18
|
-
## Evidence pass
|
|
19
|
-
|
|
20
|
-
Locate:
|
|
21
|
-
|
|
22
|
-
- schema roots, namespaces/packages, service or message registries, and imports;
|
|
23
|
-
- operation, event, request, response, and error identities;
|
|
24
|
-
- versioning, compatibility, deprecation, and evolution rules;
|
|
25
|
-
- generator configuration, target languages/packages, and generated output
|
|
26
|
-
boundaries;
|
|
27
|
-
- known provider and consumer registrations when those modules are registered;
|
|
28
|
-
- ownership, validation, publication, and release entrypoints.
|
|
29
|
-
|
|
30
|
-
## Questions the knowledge must answer
|
|
31
|
-
|
|
32
|
-
1. Which contracts are authoritative in this module?
|
|
33
|
-
2. How are operations/messages grouped and identified?
|
|
34
|
-
3. What versioning and compatibility rules are declared?
|
|
35
|
-
4. Which generated artifacts and consumers derive from this source?
|
|
36
|
-
5. How is the contract validated, published, and changed?
|
|
37
|
-
|
|
38
|
-
## Suggested knowledge units
|
|
39
|
-
|
|
40
|
-
- **Contract registry**: namespaces, service/message families, authority,
|
|
41
|
-
versions, owners, and navigation.
|
|
42
|
-
- **Operation or message-family reference**: exact identities, payload roles,
|
|
43
|
-
errors, compatibility, and generated targets.
|
|
44
|
-
- **Generation and publication map**: generator inputs/outputs, validation,
|
|
45
|
-
versioning, and release boundary.
|
|
46
|
-
- **Provider-consumer flow**: only when both runtime endpoints are registered
|
|
47
|
-
and source-backed; use the cross-module template.
|
|
48
|
-
|
|
49
|
-
## Chapter blueprint
|
|
50
|
-
|
|
51
|
-
```markdown
|
|
52
|
-
# <Contract module> registry
|
|
53
|
-
## Authority, ownership, and schema roots
|
|
54
|
-
## Namespaces and contract families
|
|
55
|
-
## Operations, messages, and error identities
|
|
56
|
-
## Versioning, compatibility, and deprecation
|
|
57
|
-
## Generated targets and active consumers
|
|
58
|
-
## Validation, publication, and release
|
|
59
|
-
## Evidence and exclusions
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Use the canonical operation record from `protocol-boundary.md` for detailed
|
|
63
|
-
families. Do not duplicate every generated language binding or claim runtime
|
|
64
|
-
behavior from the schema alone.
|
|
65
|
-
|
|
66
|
-
## Granularity and stop conditions
|
|
67
|
-
|
|
68
|
-
Aggregate related operations/messages by authoritative family. Split when
|
|
69
|
-
namespace, owner, version policy, or compatibility behavior differs. Every page
|
|
70
|
-
must contain exact contract identities and source locators, not just filenames.
|
|
71
|
-
|
|
72
|
-
Revise or stop when authority cannot be distinguished from a generated copy,
|
|
73
|
-
imports or versions are unresolved, or compatibility claims are not declared.
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: semantic.code-index.template.contracts-and-chains
|
|
3
|
-
kind: procedure
|
|
4
|
-
media-type: text/markdown
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Contracts, identity groups, and execution chains
|
|
8
|
-
|
|
9
|
-
Use this resource after module classification when a code index must connect
|
|
10
|
-
stable identities without turning the inventory into reader-facing prose. It
|
|
11
|
-
applies to application, service, library, runtime, command, adapter, and
|
|
12
|
-
cross-source units.
|
|
13
|
-
|
|
14
|
-
## Separate inspection facts from reader content
|
|
15
|
-
|
|
16
|
-
The adapter inventory is complete machine evidence. A reader page should group
|
|
17
|
-
members only when they share a source-backed responsibility, boundary, or
|
|
18
|
-
lifecycle. Do not create one sentence, bullet, row, or page per discovered
|
|
19
|
-
identity.
|
|
20
|
-
|
|
21
|
-
An `identityGroups` record must provide:
|
|
22
|
-
|
|
23
|
-
- a stable group `id`;
|
|
24
|
-
- the exact target `members` from the same index-unit inventory;
|
|
25
|
-
- one reader-facing `viewRef` that explains their common responsibility;
|
|
26
|
-
- `sourceFiles` from the eligible-file inventory that prove membership.
|
|
27
|
-
|
|
28
|
-
The referenced page must cite every declared source file. A group does not pass
|
|
29
|
-
coverage merely because its members exist in frontmatter or evidence.
|
|
30
|
-
|
|
31
|
-
## Discover chain candidates
|
|
32
|
-
|
|
33
|
-
Emit a candidate only when code structure or an authoritative declaration
|
|
34
|
-
supports both adjacent endpoints. Supported families are:
|
|
35
|
-
|
|
36
|
-
- `entry-operation`;
|
|
37
|
-
- `operation-handler`;
|
|
38
|
-
- `handler-downstream`;
|
|
39
|
-
- `event-processing`;
|
|
40
|
-
- `command-effect`;
|
|
41
|
-
- `export-implementation`;
|
|
42
|
-
- `cross-source-handoff`.
|
|
43
|
-
|
|
44
|
-
Each candidate records a stable `id`, `from`, `to`, confidence, and the exact
|
|
45
|
-
eligible `sourceFiles` that support the adjacency. Imports, filenames, symbol
|
|
46
|
-
co-occurrence, or similar names alone are ambiguous evidence; mark such a
|
|
47
|
-
candidate ambiguous or request material instead of asserting a runtime chain.
|
|
48
|
-
|
|
49
|
-
## Decide every candidate
|
|
50
|
-
|
|
51
|
-
Every discovered candidate receives exactly one decision:
|
|
52
|
-
|
|
53
|
-
- `document`: add a source-backed structured edge and name its reader-facing
|
|
54
|
-
`viewRef`;
|
|
55
|
-
- `merge`: point `canonicalChainId` at an equivalent candidate whose decision
|
|
56
|
-
is `document`;
|
|
57
|
-
- `exclude`: explain why the static match is not a stable runtime relation;
|
|
58
|
-
- `request-input`: explain which external protocol, runtime registration, or
|
|
59
|
-
authoritative material is missing.
|
|
60
|
-
|
|
61
|
-
Decision coverage is 100%. Excluding all candidates does not close an external
|
|
62
|
-
boundary family: at least one representative chain must be documented, merged
|
|
63
|
-
into a documented chain, or explicitly require material.
|
|
64
|
-
|
|
65
|
-
## Reader-facing chain blueprint
|
|
66
|
-
|
|
67
|
-
```markdown
|
|
68
|
-
## <Reader goal or boundary>
|
|
69
|
-
|
|
70
|
-
<Explain the starting trigger and the stable outcome.>
|
|
71
|
-
|
|
72
|
-
1. **Entry or trigger** — <identity and responsibility>.
|
|
73
|
-
2. **Operation or handler** — <validation, transformation, or state change>.
|
|
74
|
-
3. **External handoff or effect** — <contract, ownership, and next boundary>.
|
|
75
|
-
|
|
76
|
-
Failure and retry boundary: <only source-backed behavior>.
|
|
77
|
-
Evidence: <section-scoped locators for each adjacent handoff>.
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Remove stages that do not apply. Do not leave empty template headings, repeat a
|
|
81
|
-
module inventory, or infer missing runtime behavior.
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: semantic.code-index.template.cross-module-chain
|
|
3
|
-
kind: procedure
|
|
4
|
-
media-type: text/markdown
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Cross-module flow template
|
|
8
|
-
|
|
9
|
-
Use for `cross-module-chain` only when a stable reader question cannot be
|
|
10
|
-
answered inside one module. The chain is an independently owned index unit with
|
|
11
|
-
`outputProfile: "cross-module-flow"`; each participating module keeps its own
|
|
12
|
-
non-duplicated map.
|
|
13
|
-
|
|
14
|
-
## Evidence pass
|
|
15
|
-
|
|
16
|
-
Establish:
|
|
17
|
-
|
|
18
|
-
- an explicit start trigger and terminal outcome;
|
|
19
|
-
- each registered module boundary in execution order;
|
|
20
|
-
- operation, event, repository, command, or plugin identities joining adjacent
|
|
21
|
-
modules;
|
|
22
|
-
- transformations, ownership handoffs, state changes, and failure boundaries;
|
|
23
|
-
- source locators on both sides of every join;
|
|
24
|
-
- authentication, retries, fallback, observability, and recovery only where
|
|
25
|
-
they are explicitly configured.
|
|
26
|
-
|
|
27
|
-
Imports, filenames, symbol co-occurrence, and similar names do not prove a
|
|
28
|
-
runtime chain.
|
|
29
|
-
|
|
30
|
-
## Questions the knowledge must answer
|
|
31
|
-
|
|
32
|
-
1. What reader goal and source-backed trigger start the flow?
|
|
33
|
-
2. Which module owns each step and boundary?
|
|
34
|
-
3. Which exact contract or identity joins each adjacent step?
|
|
35
|
-
4. What state, identity, or data is transformed at every handoff?
|
|
36
|
-
5. Where can the flow fail, retry, fall back, or terminate?
|
|
37
|
-
|
|
38
|
-
## Chapter blueprint
|
|
39
|
-
|
|
40
|
-
```markdown
|
|
41
|
-
# <Cross-module flow>
|
|
42
|
-
## Reader goal and starting trigger
|
|
43
|
-
## Boundary sequence and module ownership
|
|
44
|
-
## Contract and transformation at each handoff
|
|
45
|
-
## State changes and terminal outcome
|
|
46
|
-
## Authentication, failure, retry, and fallback
|
|
47
|
-
## Source-backed edge inventory
|
|
48
|
-
## Known gaps and excluded implementation detail
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Examples include application-to-client-to-endpoint, endpoint-to-service-to-
|
|
52
|
-
repository, producer-to-event-to-consumer, command-to-remote-operation, and
|
|
53
|
-
plugin-host-to-provider.
|
|
54
|
-
|
|
55
|
-
## Extractor and ownership rule
|
|
56
|
-
|
|
57
|
-
A chain normally overlaps the sources already owned by module units. Use
|
|
58
|
-
`extractCustom()` and assign each aggregate candidate to the chain unit through
|
|
59
|
-
its `module` field. `extractTs()` assigns ownership at source level, so it cannot
|
|
60
|
-
represent both a per-module unit and an overlapping cross-source chain unit in
|
|
61
|
-
the same phase.
|
|
62
|
-
|
|
63
|
-
The aggregate candidate may cite evidence from every participating source. It
|
|
64
|
-
must cover all Route-reported structural probes selected by the flow profile;
|
|
65
|
-
one page may cover several probes when it carries each exact evidence locator.
|
|
66
|
-
Use `operation` and `handoff` candidate sections and emit source-backed
|
|
67
|
-
`depends_on` edges from the owning module candidate to the next registered
|
|
68
|
-
module candidate. Narrative arrows or a textual sequence do not satisfy the
|
|
69
|
-
structured relationship requirement.
|
|
70
|
-
|
|
71
|
-
## Granularity and stop conditions
|
|
72
|
-
|
|
73
|
-
Emit one deduplicated page per coherent end-to-end flow family. Split when the
|
|
74
|
-
trigger, terminal outcome, ownership, contract, or failure policy differs.
|
|
75
|
-
|
|
76
|
-
Revise or stop when either endpoint or a joining identity is missing, the chain
|
|
77
|
-
crosses unregistered sources, relationships depend on inference, or the output
|
|
78
|
-
repeats module pages without adding a handoff model.
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: semantic.code-index.template.derived-source
|
|
3
|
-
kind: procedure
|
|
4
|
-
media-type: text/markdown
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Generated, mirrored, vendored, and legacy source template
|
|
8
|
-
|
|
9
|
-
Use for `derived-source` and lifecycle values `generated`, `mirrored`,
|
|
10
|
-
`vendored`, or `legacy`. Its main purpose is to prevent derived artifacts from
|
|
11
|
-
being mistaken for independent knowledge authority while preserving useful
|
|
12
|
-
consumer and provenance information.
|
|
13
|
-
|
|
14
|
-
## Evidence pass
|
|
15
|
-
|
|
16
|
-
Locate:
|
|
17
|
-
|
|
18
|
-
- generation, sync, vendoring, migration, or deprecation markers;
|
|
19
|
-
- authoritative repository, schema, template, source directory, or upstream
|
|
20
|
-
package;
|
|
21
|
-
- generator/sync command, configuration, version pin, and output boundary;
|
|
22
|
-
- ownership and update cadence;
|
|
23
|
-
- consumers that still import or execute the derived tree;
|
|
24
|
-
- local modifications, compatibility wrappers, or hand-maintained overlays;
|
|
25
|
-
- release/build artifacts and whether they are committed or reproducible;
|
|
26
|
-
- replacement path for legacy source when one is explicitly maintained.
|
|
27
|
-
|
|
28
|
-
Do not assume all files in a generated-looking directory are derived. Confirm
|
|
29
|
-
markers, build steps, headers, manifests, or source mapping.
|
|
30
|
-
|
|
31
|
-
## Questions the knowledge must answer
|
|
32
|
-
|
|
33
|
-
1. Why does this source exist and what lifecycle category applies?
|
|
34
|
-
2. Where is the authoritative source of truth?
|
|
35
|
-
3. How is the derived content produced, synchronized, or versioned?
|
|
36
|
-
4. Which consumers depend on it and through what supported surface?
|
|
37
|
-
5. Are local edits permitted, overwritten, or layered separately?
|
|
38
|
-
6. What is safe to inspect here, and what knowledge belongs upstream?
|
|
39
|
-
7. For legacy source, what current replacement and migration status are proven?
|
|
40
|
-
|
|
41
|
-
## Suggested knowledge units
|
|
42
|
-
|
|
43
|
-
- **Provenance record**: lifecycle, authority, generator/sync, version relation,
|
|
44
|
-
ownership, output boundary, and consumer summary.
|
|
45
|
-
- **Generated public surface**: only when this tree is the supported consumer
|
|
46
|
-
interface; combine with `sdk-library` and keep the upstream schema explicit.
|
|
47
|
-
- **Compatibility or migration boundary**: when maintained wrappers or legacy
|
|
48
|
-
behavior remain operationally relevant and source-backed.
|
|
49
|
-
- **Update/recovery procedure**: only maintained generation or synchronization
|
|
50
|
-
commands, verification, and overwrite boundaries.
|
|
51
|
-
|
|
52
|
-
Default `outputProfile` to `provenance-only` unless a supported consumer surface
|
|
53
|
-
requires another profile. A consumer-facing derived unit should set
|
|
54
|
-
`sourceOfTruth` to the confirmed authority locator; a missing authority remains
|
|
55
|
-
an advisory risk rather than a reason to hide the supported consumer surface.
|
|
56
|
-
|
|
57
|
-
## Chapter blueprints
|
|
58
|
-
|
|
59
|
-
```markdown
|
|
60
|
-
# <Derived source> provenance
|
|
61
|
-
## Lifecycle classification
|
|
62
|
-
## Authority and ownership
|
|
63
|
-
## Generator, sync, or vendoring mechanism
|
|
64
|
-
## Version and compatibility relationship
|
|
65
|
-
## Output boundary and local-edit policy
|
|
66
|
-
## Active consumers
|
|
67
|
-
## Update, verification, and recovery
|
|
68
|
-
## Reader-facing knowledge owned elsewhere
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
For a generated public client:
|
|
72
|
-
|
|
73
|
-
```markdown
|
|
74
|
-
# <Generated client> consumer surface
|
|
75
|
-
## Intended consumers and supported import
|
|
76
|
-
## Authoritative schema and generation version
|
|
77
|
-
## Client initialization and operation families
|
|
78
|
-
## Generated versus maintained behavior
|
|
79
|
-
## Compatibility and regeneration
|
|
80
|
-
## Evidence and excluded generated detail
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
## Granularity and relationships
|
|
84
|
-
|
|
85
|
-
Do not duplicate pages already owned by the authoritative schema,
|
|
86
|
-
implementation, or package. Generated files may provide exact locators and
|
|
87
|
-
cross-checks but should not expand every model, constant, serializer, or method
|
|
88
|
-
into reader-facing Markdown.
|
|
89
|
-
|
|
90
|
-
Relate the derived unit to its authority and active consumers. A relationship
|
|
91
|
-
to an upstream schema must use an explicit locator or generation configuration,
|
|
92
|
-
not a naming guess.
|
|
93
|
-
|
|
94
|
-
If the authority cannot be located, a narrow provenance unit may still record
|
|
95
|
-
confirmed lifecycle markers, generator clues, output boundaries, and active
|
|
96
|
-
consumers. Keep any separate unit that promises field semantics, compatibility,
|
|
97
|
-
or upstream meaning as `material-required` until the missing authority is
|
|
98
|
-
provided.
|
|
99
|
-
|
|
100
|
-
## Template composition examples
|
|
101
|
-
|
|
102
|
-
- A generated API client is `sdk-library` + `derived-source` and reads
|
|
103
|
-
`protocol-boundary.md` for protocol authority.
|
|
104
|
-
- A vendored library with no project-owned surface remains one provenance page,
|
|
105
|
-
not a copied API reference.
|
|
106
|
-
- A legacy adapter still serving callers combines this template with
|
|
107
|
-
`adapter.md`; document only proven compatibility and migration behavior.
|
|
108
|
-
|
|
109
|
-
## Revise or stop when
|
|
110
|
-
|
|
111
|
-
- the authoritative source cannot be identified for semantic or compatibility
|
|
112
|
-
claims beyond a narrow provenance record;
|
|
113
|
-
- generated and hand-maintained files cannot be separated;
|
|
114
|
-
- the plan duplicates upstream reference material without consumer value;
|
|
115
|
-
- legacy replacement or deprecation claims are inferred rather than evidenced;
|
|
116
|
-
- generated symbols dominate projected pages.
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: semantic.code-index.template.domain-service
|
|
3
|
-
kind: procedure
|
|
4
|
-
media-type: text/markdown
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Domain service template
|
|
8
|
-
|
|
9
|
-
Use for `service` modules whose stable value is a domain/use-case boundary or a
|
|
10
|
-
reusable service contract and its first-level orchestration. Do not classify a
|
|
11
|
-
directory as a service merely because it contains classes or functions named
|
|
12
|
-
`Service`.
|
|
13
|
-
|
|
14
|
-
Recommended `outputProfile`: `service-boundary`.
|
|
15
|
-
|
|
16
|
-
## Evidence pass
|
|
17
|
-
|
|
18
|
-
Locate:
|
|
19
|
-
|
|
20
|
-
- service construction, registration, dependency injection, or public entry;
|
|
21
|
-
- supported operations and their callers or protocol handlers;
|
|
22
|
-
- use-case/domain orchestration and the point where ownership changes;
|
|
23
|
-
- repositories, transactions, caches, downstream clients, and event ports;
|
|
24
|
-
- invariants, idempotency, consistency, permission, or failure boundaries;
|
|
25
|
-
- configuration and runtime wiring that materially change the service;
|
|
26
|
-
- generated clients/models and internal helpers that should remain evidence.
|
|
27
|
-
|
|
28
|
-
Follow representative public operations through one orchestration layer. Stop
|
|
29
|
-
at the first stable domain, persistence, or downstream protocol boundary unless
|
|
30
|
-
the confirmed knowledge goal explicitly needs deeper implementation behavior.
|
|
31
|
-
|
|
32
|
-
## Questions the knowledge must answer
|
|
33
|
-
|
|
34
|
-
1. What responsibility and invariants does this service own?
|
|
35
|
-
2. Which operations form its supported boundary, and who calls them?
|
|
36
|
-
3. How do operations coordinate domain logic and dependencies?
|
|
37
|
-
4. Where are transaction, consistency, idempotency, or state boundaries?
|
|
38
|
-
5. What failures can cross the boundary, and how are they represented?
|
|
39
|
-
6. Which dependencies are stable contracts versus internal implementation?
|
|
40
|
-
|
|
41
|
-
## Suggested knowledge units
|
|
42
|
-
|
|
43
|
-
- **Service boundary**: responsibility, public operations, ownership,
|
|
44
|
-
invariants, callers, and stable dependencies.
|
|
45
|
-
- **Operation/use-case map**: operation to orchestration to first stable
|
|
46
|
-
downstream/persistence/event boundary.
|
|
47
|
-
- **State and consistency contract**: only when transaction, idempotency,
|
|
48
|
-
caching, or durable state is important and evidenced.
|
|
49
|
-
- **Dependency map**: concrete ports/clients/repositories and why each boundary
|
|
50
|
-
matters; avoid a raw import inventory.
|
|
51
|
-
- **Runtime/configuration guide**: only module-owned configuration, startup,
|
|
52
|
-
diagnostics, or release behavior.
|
|
53
|
-
|
|
54
|
-
## Chapter blueprints
|
|
55
|
-
|
|
56
|
-
```markdown
|
|
57
|
-
# <Domain service> boundary
|
|
58
|
-
## Responsibility and non-responsibilities
|
|
59
|
-
## Supported operations and callers
|
|
60
|
-
## Domain rules and invariants
|
|
61
|
-
## Dependency and port boundaries
|
|
62
|
-
## State, transaction, and idempotency behavior
|
|
63
|
-
## Failure and recovery behavior
|
|
64
|
-
## Configuration and runtime wiring
|
|
65
|
-
## Evidence and excluded implementation detail
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
For a use-case family:
|
|
69
|
-
|
|
70
|
-
```markdown
|
|
71
|
-
## <Use-case family>
|
|
72
|
-
- Trigger or caller:
|
|
73
|
-
- Supported operation:
|
|
74
|
-
- Preconditions and invariants:
|
|
75
|
-
- Orchestration steps:
|
|
76
|
-
- Persistence/downstream/event boundary:
|
|
77
|
-
- Result and failure semantics:
|
|
78
|
-
- Source evidence:
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## Granularity and relationships
|
|
82
|
-
|
|
83
|
-
Group operations that share responsibility, invariants, and dependency paths.
|
|
84
|
-
Split only when ownership or consistency semantics differ. Do not publish every
|
|
85
|
-
exported method: language visibility is not proof of a supported service API.
|
|
86
|
-
Every retained page must name supported operations, callers, ports, or state
|
|
87
|
-
identities and include source locators; a folder/class inventory is not a
|
|
88
|
-
service boundary.
|
|
89
|
-
|
|
90
|
-
Relationships should connect supported operations to real callers, ports,
|
|
91
|
-
repositories, or downstream operations. Do not infer a domain flow from
|
|
92
|
-
similar names or shared models.
|
|
93
|
-
|
|
94
|
-
## Template composition examples
|
|
95
|
-
|
|
96
|
-
- An RPC implementation reads `api-service.md` for its inbound registration and
|
|
97
|
-
this template for domain orchestration.
|
|
98
|
-
- A service backed by durable storage selects the `persistence` facet and reads
|
|
99
|
-
`persistence-boundary.md`.
|
|
100
|
-
- A service activated only by events also reads `background-runtime.md` and the
|
|
101
|
-
`event-flow.md` template.
|
|
102
|
-
|
|
103
|
-
## Revise or stop when
|
|
104
|
-
|
|
105
|
-
- no stable caller or public service boundary can be found;
|
|
106
|
-
- the proposed content is a class-by-class implementation listing;
|
|
107
|
-
- invariants or data semantics depend on unavailable documentation;
|
|
108
|
-
- generated models are being treated as the domain source of truth;
|
|
109
|
-
- an end-to-end chain crosses undeclared source modules.
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: semantic.code-index.template.event-flow
|
|
3
|
-
kind: procedure
|
|
4
|
-
media-type: text/markdown
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Event producer and consumer template
|
|
8
|
-
|
|
9
|
-
Use for `event-producer` or `event-consumer`. This template supplements the
|
|
10
|
-
owning runtime, service, application, or adapter page; selecting an event facet
|
|
11
|
-
does not by itself justify a separate end-to-end page.
|
|
12
|
-
|
|
13
|
-
## Evidence pass
|
|
14
|
-
|
|
15
|
-
Locate:
|
|
16
|
-
|
|
17
|
-
- topic, stream, queue, hook, notification, or event identity;
|
|
18
|
-
- authoritative schema and versioning source;
|
|
19
|
-
- producer call and publication condition;
|
|
20
|
-
- subscription/consumer registration and handler dispatch;
|
|
21
|
-
- delivery, ordering, partitioning, retry, dead-letter, checkpoint, and
|
|
22
|
-
idempotency configuration;
|
|
23
|
-
- emitted side effects, observability, replay, and recovery entrypoints.
|
|
24
|
-
|
|
25
|
-
Do not derive delivery guarantees from framework defaults.
|
|
26
|
-
|
|
27
|
-
## Questions the knowledge must answer
|
|
28
|
-
|
|
29
|
-
1. What event is emitted or consumed, under what condition, and by whom?
|
|
30
|
-
2. Where is publication or subscription registered?
|
|
31
|
-
3. What delivery and recovery behavior is actually configured?
|
|
32
|
-
4. What state or side effects change, and how can failed work be identified?
|
|
33
|
-
|
|
34
|
-
## Chapter blueprint
|
|
35
|
-
|
|
36
|
-
```markdown
|
|
37
|
-
# <Event flow or family>
|
|
38
|
-
## Event identity and authoritative schema
|
|
39
|
-
## Producer and publication condition
|
|
40
|
-
## Delivery and routing semantics
|
|
41
|
-
## Consumer registration and processing
|
|
42
|
-
## Idempotency, retry, checkpoint, and failure destination
|
|
43
|
-
## Side effects and observability
|
|
44
|
-
## Source-backed producer-to-consumer relationship
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
When only one endpoint is registered, keep an event record inside that
|
|
48
|
-
module's runtime or service map and omit the unavailable endpoint. Create a
|
|
49
|
-
separate event-flow page only when both sides and their shared event identity
|
|
50
|
-
are evidenced, or when one side alone has enough delivery and recovery
|
|
51
|
-
semantics to be a stable operator-facing topic.
|
|
52
|
-
|
|
53
|
-
## Granularity and stop conditions
|
|
54
|
-
|
|
55
|
-
Group events with the same schema authority, delivery policy, ownership, and
|
|
56
|
-
handler family. Do not create pages per event field, generated payload type,
|
|
57
|
-
handler helper, or retry branch.
|
|
58
|
-
|
|
59
|
-
Every retained record must name the event identity, registration or call site,
|
|
60
|
-
and source locator. Revise or stop when delivery semantics would be guessed,
|
|
61
|
-
the shared identity is missing, or the output would contain empty producer or
|
|
62
|
-
consumer sections.
|