@c4a/context-cli 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/cli.js +32779 -32620
  2. package/indexers/capability-manifest.json +4 -9
  3. package/indexers/release-manifest.json +1 -1
  4. package/package.json +3 -3
  5. package/plugins/VERSION +1 -1
  6. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  7. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  8. package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
  9. package/providers/context/actions/run-indexer-lifecycle.yaml +7 -0
  10. package/providers/context/codes.yaml +3 -27
  11. package/providers/context/graphs/indexer.yaml +2 -28
  12. package/providers/context/graphs/workspace.yaml +37 -473
  13. package/providers/context/manifest.json +58 -558
  14. package/providers/context/provider.yaml +2 -2
  15. package/providers/context/resources/diagnostics/projection-stale.md +0 -1
  16. package/providers/context/resources/manuals/reference/project-api.md +39 -38
  17. package/providers/context/resources/views/document-optimization-current.yaml +1 -1
  18. package/providers/context/resources/views/package-current.yaml +1 -1
  19. package/providers/context/resources/views/resolved-indexer-instructions.yaml +1 -1
  20. package/providers/context/resources/views/review-current.yaml +1 -1
  21. package/providers/context/resources/views/source-boundary.yaml +1 -1
  22. package/providers/context/resources/views/source-current.yaml +1 -1
  23. package/providers/context/resources/views/verification-current.yaml +1 -1
  24. package/providers/context/resources/views/workspace-current.yaml +1 -1
  25. package/providers/context/schemas/indexer-contract-overlay-validation-input.schema.json +0 -42
  26. package/providers/context/schemas/indexer-contract-overlay-validation-result.schema.json +27 -122
  27. package/providers/context/schemas/indexer-lifecycle-continuation.schema.json +15 -0
  28. package/providers/context/schemas/indexer-overlay-question-proposal-input.schema.json +4 -4
  29. package/providers/context/schemas/indexer-overlay-question-rebind-input.schema.json +4 -4
  30. package/providers/context/skills/run-indexer-lifecycle/SKILL.md +36 -0
  31. package/providers/context/actions/align-next.yaml +0 -6
  32. package/providers/context/actions/apply-code-index-guidance.yaml +0 -5
  33. package/providers/context/actions/apply-document-optimization-guidance.yaml +0 -5
  34. package/providers/context/actions/apply-structure-confirmation.yaml +0 -5
  35. package/providers/context/actions/authorize-indexer-contract-overlay.yaml +0 -7
  36. package/providers/context/actions/compile-next.yaml +0 -5
  37. package/providers/context/actions/configure-code-extraction.yaml +0 -5
  38. package/providers/context/actions/configure-prose-lifecycle.yaml +0 -5
  39. package/providers/context/actions/extract-next.yaml +0 -5
  40. package/providers/context/actions/inspect-code-extraction.yaml +0 -5
  41. package/providers/context/actions/inspect-document-classification.yaml +0 -5
  42. package/providers/context/actions/inspect-structure.yaml +0 -5
  43. package/providers/context/actions/migrate-codeindex.yaml +0 -5
  44. package/providers/context/actions/optimize-documents.yaml +0 -6
  45. package/providers/context/actions/preview-extraction-batch.yaml +0 -5
  46. package/providers/context/actions/revise-code-index-audit.yaml +0 -5
  47. package/providers/context/actions/submit-code-index-audit.yaml +0 -6
  48. package/providers/context/resources/dialogue/code-extraction.md +0 -87
  49. package/providers/context/resources/dialogue/document-classification.md +0 -33
  50. package/providers/context/resources/dialogue/structure-confirmation.md +0 -44
  51. package/providers/context/resources/dialogue/workflow-mode-after-capture.md +0 -25
  52. package/providers/context/resources/manuals/reference/code-extractors.md +0 -152
  53. package/providers/context/resources/procedures/code-extraction.md +0 -188
  54. package/providers/context/resources/procedures/code-index-audit.md +0 -113
  55. package/providers/context/resources/procedures/document-classification.md +0 -22
  56. package/providers/context/resources/procedures/document-optimization.md +0 -110
  57. package/providers/context/resources/procedures/prose-align.md +0 -68
  58. package/providers/context/resources/procedures/prose-compile.md +0 -23
  59. package/providers/context/resources/semantic/align/candidate-resolution.md +0 -106
  60. package/providers/context/resources/semantic/align/density-profile.md +0 -41
  61. package/providers/context/resources/semantic/align/gates.md +0 -276
  62. package/providers/context/resources/semantic/align/structure-planning.md +0 -337
  63. package/providers/context/resources/semantic/code-index/classification.md +0 -270
  64. package/providers/context/resources/semantic/code-index/templates/adapter.md +0 -118
  65. package/providers/context/resources/semantic/code-index/templates/api-service.md +0 -116
  66. package/providers/context/resources/semantic/code-index/templates/background-runtime.md +0 -109
  67. package/providers/context/resources/semantic/code-index/templates/cli-tool.md +0 -129
  68. package/providers/context/resources/semantic/code-index/templates/contract-source.md +0 -73
  69. package/providers/context/resources/semantic/code-index/templates/contracts-and-chains.md +0 -81
  70. package/providers/context/resources/semantic/code-index/templates/cross-module-chain.md +0 -78
  71. package/providers/context/resources/semantic/code-index/templates/derived-source.md +0 -116
  72. package/providers/context/resources/semantic/code-index/templates/domain-service.md +0 -109
  73. package/providers/context/resources/semantic/code-index/templates/event-flow.md +0 -62
  74. package/providers/context/resources/semantic/code-index/templates/monorepo-container.md +0 -124
  75. package/providers/context/resources/semantic/code-index/templates/persistence-boundary.md +0 -56
  76. package/providers/context/resources/semantic/code-index/templates/plugin-extension.md +0 -52
  77. package/providers/context/resources/semantic/code-index/templates/protocol-boundary.md +0 -88
  78. package/providers/context/resources/semantic/code-index/templates/sdk-library.md +0 -132
  79. package/providers/context/resources/semantic/code-index/templates/web-application.md +0 -145
  80. package/providers/context/resources/semantic/compile/index.md +0 -31
  81. package/providers/context/resources/views/code-index-audit.yaml +0 -6
  82. package/providers/context/resources/views/extraction-preview.yaml +0 -6
  83. package/providers/context/resources/views/structure-current.yaml +0 -6
  84. package/providers/context/schemas/code-index-audit-decision.schema.json +0 -94
  85. package/providers/context/schemas/document-optimization-decisions.schema.json +0 -57
  86. package/providers/context/schemas/indexer-contract-overlay-authorization-input.schema.json +0 -32
  87. package/providers/context/schemas/indexer-contract-overlay-authorization-result.schema.json +0 -121
  88. package/providers/context/schemas/prose-structure-batch.schema.json +0 -35
@@ -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.
@@ -1,124 +0,0 @@
1
- ---
2
- id: semantic.code-index.template.monorepo-container
3
- kind: procedure
4
- media-type: text/markdown
5
- ---
6
-
7
- # Monorepo and module-container template
8
-
9
- Use for `monorepo-container`: a workspace whose stable knowledge is the
10
- registration, ownership, dependency, build, or release topology of multiple
11
- child modules. Do not treat the physical repository as one application merely
12
- because it has one Git remote.
13
-
14
- Recommended `outputProfile`: `module-registry`.
15
-
16
- ## Evidence pass
17
-
18
- Locate:
19
-
20
- - workspace/package/service manifests and child-module discovery rules;
21
- - build graph, task orchestration, cache, dependency, and affected-scope logic;
22
- - ownership, tags, boundaries, layering, or dependency constraints;
23
- - shared configuration and tooling inherited by child modules;
24
- - release groups, independent packages, deployment units, and version policy;
25
- - generated, mirrored, vendored, fixture, example, and legacy subtrees;
26
- - cross-module registries or contracts that warrant separate chain units.
27
-
28
- Use declared manifests as the primary inventory. Directory discovery is a
29
- fallback and must not silently include generated output or dependency caches.
30
-
31
- ## Questions the knowledge must answer
32
-
33
- 1. How are child modules discovered and identified?
34
- 2. Which modules are applications, services, libraries, tools, or derived
35
- sources, and who owns them?
36
- 3. What dependency and layering rules connect or constrain them?
37
- 4. How do build, test, cache, release, and deployment boundaries work?
38
- 5. Which configuration is inherited globally versus owned by a child module?
39
- 6. Which cross-module flows are important enough to index separately?
40
- 7. Which large or generated subtrees are intentionally excluded?
41
-
42
- ## Suggested knowledge units
43
-
44
- - **Module registry**: child identity, path, type, owner, manifest, supported
45
- entry, build/release unit, and lifecycle.
46
- - **Dependency/topology map**: declared dependency directions, layering rules,
47
- shared contracts, and source-backed edges.
48
- - **Build and release map**: task graph, affected-scope behavior, cache,
49
- artifacts, release groups, and deployment units.
50
- - **Shared tooling/configuration**: only stable workspace-level behavior that
51
- materially affects multiple children.
52
- - **Cross-module chain unit**: independently owned, source-backed flow joining
53
- several child modules; do not hide it inside the container summary.
54
-
55
- Every user-visible child application, service, library, or CLI is classified as
56
- its own index unit before deeper extraction.
57
-
58
- For `extractTs()`, each child package must first be registered as its own source
59
- boundary. One root source cannot be assigned to several index units because
60
- source-level ownership would be ambiguous. If source registration intentionally
61
- remains at repository level, use `extractCustom()` for the container registry
62
- and assign aggregate candidates explicitly; do not use `include` to simulate
63
- package ownership.
64
-
65
- ## Chapter blueprints
66
-
67
- ```markdown
68
- # <Workspace> module registry
69
- ## Workspace purpose and discovery rules
70
- ## Child module inventory
71
- ## Module types, ownership, and lifecycle
72
- ## Dependency and layering constraints
73
- ## Shared configuration and tooling
74
- ## Build, test, cache, and release topology
75
- ## Generated/mirrored boundaries and exclusions
76
- ## Cross-module knowledge entrypoints
77
- ```
78
-
79
- One child-module record may use:
80
-
81
- ```markdown
82
- ## <Module>
83
- - Path and manifest:
84
- - Primary/additional types and facets:
85
- - Responsibility and owner:
86
- - Stable entrypoints:
87
- - Direct module dependencies:
88
- - Build/release unit:
89
- - Lifecycle/source of truth:
90
- - Deeper index unit:
91
- ```
92
-
93
- ## Granularity and relationships
94
-
95
- Do not perform a repository-wide symbol scan as the container extraction. The
96
- container owns topology; child units own reader-facing application/service/API
97
- knowledge. Aggregate the registry when hundreds of children share the same
98
- shape, but preserve exact identities and locators.
99
-
100
- A workspace manifest, package registry, build graph, or release manifest is a
101
- valid stable `entries` locator even when the container has no executable
102
- process. Every registry page must retain exact child identities and locators;
103
- a directory listing is not a module map.
104
-
105
- Use manifest/build-graph evidence for dependency edges. Imports can supplement
106
- but should not override declared workspace ownership or package boundaries.
107
-
108
- ## Template composition examples
109
-
110
- - A workspace containing a Web app, API gateway, CLI, and generated client
111
- produces one registry plus separately classified child units.
112
- - A workspace with independent release groups selects `build-release`; retain
113
- the release map at the container level and package-specific compatibility in
114
- each `sdk-library` unit.
115
- - A cross-module request flow reads `cross-module-chain.md` and receives its
116
- own output owner when it spans several child units.
117
-
118
- ## Revise or stop when
119
-
120
- - module discovery relies only on a broad filesystem scan;
121
- - the plan treats all repository files as one index unit;
122
- - child ownership or source-of-truth boundaries are ambiguous;
123
- - generated/cache/vendor directories dominate projected output;
124
- - dependencies are inferred solely from names without manifest or graph proof.
@@ -1,56 +0,0 @@
1
- ---
2
- id: semantic.code-index.template.persistence-boundary
3
- kind: procedure
4
- media-type: text/markdown
5
- ---
6
-
7
- # Persistence boundary template
8
-
9
- Use for `persistence` when durable state, cache behavior, consistency, or
10
- recovery is part of the confirmed reader goal. This template supplements the
11
- service or runtime that owns the operations; it is not a request to catalog
12
- every model or query.
13
-
14
- ## Evidence pass
15
-
16
- Locate:
17
-
18
- - repository/data-access interface and concrete callers;
19
- - datastore, table, collection, keyspace, entity, or file identity when
20
- source-backed;
21
- - transaction, consistency, cache, lock, idempotency, and concurrency bounds;
22
- - read/write/query families and domain mapping;
23
- - schema/migration authority, versioning, and operational recovery;
24
- - generated models, query helpers, fixtures, and migrations that should remain
25
- supporting evidence.
26
-
27
- ## Questions the knowledge must answer
28
-
29
- 1. Which service or domain operation owns each read or write family?
30
- 2. What durable or cached state is addressed?
31
- 3. Where are transaction, consistency, locking, and idempotency boundaries?
32
- 4. Which schema or migration source is authoritative?
33
- 5. What failure, migration, or recovery behavior is maintained?
34
-
35
- ## Chapter blueprint
36
-
37
- ```markdown
38
- # <Persistence boundary>
39
- ## Owned state and authoritative schema
40
- ## Repository or data-access entry
41
- ## Callers and operation families
42
- ## Transaction, consistency, cache, and locking behavior
43
- ## Failure, migration, and recovery boundaries
44
- ## Source evidence and excluded query helpers
45
- ```
46
-
47
- ## Granularity and stop conditions
48
-
49
- Group operations by owned state and consistency policy. Split only when schema
50
- authority, transaction ownership, datastore, or recovery semantics differ.
51
- Every page must identify real state and caller boundaries with source locators;
52
- a directory or class inventory is not a persistence model.
53
-
54
- Revise or stop when the datastore identity or owning operation is unknown,
55
- transaction/consistency behavior would be guessed, or generated bindings and
56
- migrations would dominate reader-facing pages.
@@ -1,52 +0,0 @@
1
- ---
2
- id: semantic.code-index.template.plugin-extension
3
- kind: procedure
4
- media-type: text/markdown
5
- ---
6
-
7
- # Plugin and extension boundary template
8
-
9
- Use for `plugin-extension`. This file owns the complete plugin contract
10
- blueprint. CLI, SDK, and adapter templates should point here and only add their
11
- module-specific command, public API, or mapping context.
12
-
13
- ## Evidence pass
14
-
15
- Locate:
16
-
17
- - discovery mechanism, manifest, registry, or installation contract;
18
- - activation, deactivation, update, and removal lifecycle;
19
- - contribution points, commands, hooks, providers, and host services;
20
- - configuration, identity, compatibility, permissions, and isolation;
21
- - failure containment, fallback, diagnostics, and version negotiation;
22
- - public extension API and maintained examples when consumers implement it.
23
-
24
- ## Questions the knowledge must answer
25
-
26
- 1. How does the host discover, install, and activate an extension?
27
- 2. What may the extension contribute or call?
28
- 3. Which configuration, identity, permission, and compatibility rules apply?
29
- 4. How are failures isolated, surfaced, and recovered?
30
-
31
- ## Chapter blueprint
32
-
33
- ```markdown
34
- # <Plugin boundary>
35
- ## Host and extension responsibilities
36
- ## Discovery and installation
37
- ## Activation and removal lifecycle
38
- ## Contribution and capability contracts
39
- ## Configuration, permissions, and isolation
40
- ## Compatibility, failure, diagnostics, and recovery
41
- ## Source-backed host-to-extension relationships
42
- ```
43
-
44
- ## Granularity and stop conditions
45
-
46
- Prefer one contract per host/extension model, with compact records for coherent
47
- contribution families. Do not create separate copies under CLI, adapter, and
48
- SDK pages. Every page must name concrete manifests, registries, hooks, or
49
- capability identities and their source locators.
50
-
51
- Revise or stop when discovery or activation is inferred, permissions and
52
- isolation would be guessed, or examples describe an unsupported extension API.
@@ -1,88 +0,0 @@
1
- ---
2
- id: semantic.code-index.template.protocol-boundary
3
- kind: procedure
4
- media-type: text/markdown
5
- ---
6
-
7
- # Protocol provider and consumer template
8
-
9
- Use for `protocol-provider`, `protocol-consumer`, or `generated-contract`. This
10
- template owns the canonical operation record. Application, API, service, SDK,
11
- and adapter templates provide module context but must not create a second
12
- registry for the same operations.
13
-
14
- ## Evidence pass
15
-
16
- Locate:
17
-
18
- - the authoritative IDL, OpenAPI document, schema, service definition, or
19
- explicit registration;
20
- - provider operation identity and dispatch when the provider is in scope;
21
- - consumer client construction and concrete operation call site when the
22
- consumer is in scope;
23
- - request, response, message, identity, and context mapping boundaries;
24
- - authentication, authorization, timeout, retry, compatibility, and error
25
- translation that are explicitly configured;
26
- - generated bindings, their generator/version, and their upstream authority.
27
-
28
- Do not infer protocol semantics from matching type names, generated model
29
- fields, imports, or transport-library dependencies.
30
-
31
- ## Questions the knowledge must answer
32
-
33
- 1. Which concrete operation or coherent operation family is provided or used?
34
- 2. Where is it registered or called, and where is its contract authoritative?
35
- 3. What request, response, identity, credential, and context mapping occurs?
36
- 4. What timeout, retry, compatibility, and failure behavior is source-backed?
37
- 5. Which generated artifacts are locators rather than independent authority?
38
-
39
- ## Canonical operation record
40
-
41
- Use this record wherever another selected template asks for an operation,
42
- route-to-client, or adapter mapping registry. Add type-specific detail around
43
- it rather than copying the operation into another table.
44
-
45
- ```markdown
46
- ## <Protocol operation or family>
47
- - Provider identity and registration:
48
- - Consumer call site:
49
- - Authoritative contract:
50
- - Request, identity, and context mapping:
51
- - Response and error mapping:
52
- - Timeout, retry, and compatibility:
53
- - Source-backed relationship:
54
- ```
55
-
56
- Provider-only records omit the consumer line. Consumer-only records omit
57
- provider dispatch and remain inside the owning module page unless the opposite
58
- endpoint is also a registered source and an evidenced cross-module flow is a
59
- separate reader goal.
60
-
61
- ## Generated and authoritative contracts
62
-
63
- For `generated-contract`, record the upstream schema, generator, version/pin,
64
- generated output boundary, and runtime consumer. Generated code may locate
65
- operations and fields but does not become semantic authority by itself.
66
-
67
- When the upstream authority is unavailable, a separate provenance unit may
68
- still record the generated boundary, generator markers, current consumers, and
69
- known authority gap with `outputProfile: "provenance-only"`. Keep the unit that
70
- would explain field semantics or compatibility as `material-required`; do not
71
- block the independently supported provenance record.
72
-
73
- For a `contract-source` module, preserve exact operation identities, namespaces,
74
- versions, compatibility declarations, imports, and generator targets. Do not
75
- invent runtime dispatch or consumer behavior that the contract does not define.
76
-
77
- ## Granularity and relationships
78
-
79
- Aggregate operations by contract, ownership, and execution family. Split when
80
- authority, mapping, security, versioning, or failure semantics materially
81
- differ. Do not create pages for every generated request/response type or field.
82
-
83
- Every page must contain concrete operation or schema identities and source
84
- locators. A page that only says a module “uses an API” is not sufficient.
85
-
86
- Revise or stop when operation identity is unavailable, authority is ambiguous,
87
- security/error behavior would be guessed, or a claimed provider-consumer join
88
- has no source-backed registration and call evidence.