Define typed application services and adapter ports #2

Closed
opened 2026-09-03 14:22:16 +00:00 by JayKobe6k · 0 comments
Owner

Goal

Introduce the backend-independent application boundary used by the CLI and future HTTP, MCP, and GUI adapters. No frontend should orchestrate libclang directly or access LadybugDB directly.

Scope

  • Add typed requests, responses, and errors for create index, update index, value lineage, and entity search use cases.
  • Define application-owned ports for project acquisition, C compilation planning, translation-unit indexing, index catalog access, graph persistence, search, and lineage traversal.
  • Keep CSourceIndexer as a narrow one-translation-unit parser boundary; rename or wrap it if needed so project indexing is not confused with parsing one TU.
  • Keep Ladybug values, raw Cypher, native handles, and row decoding out of the application and domain modules.
  • Model cancellation/progress only if there is a concrete caller requirement; do not make the initial API async speculatively.

Acceptance criteria

  • All use cases can be exercised against in-memory fake ports without invoking the CLI, libclang, or LadybugDB.
  • Request and result types use newtypes/enums rather than strings or untyped maps for identifiers, modes, formats, and closed sets.
  • Expected input, indexing, query, and persistence failures return typed errors with context and no panics.
  • Unit tests prove command-independent service dispatch and error propagation.
  • Module documentation identifies the domain, application, parser-adapter, persistence-adapter, and frontend boundaries.

Dependencies

None. This establishes the contracts consumed by the remaining issues.

## Goal Introduce the backend-independent application boundary used by the CLI and future HTTP, MCP, and GUI adapters. No frontend should orchestrate libclang directly or access LadybugDB directly. ## Scope - Add typed requests, responses, and errors for create index, update index, value lineage, and entity search use cases. - Define application-owned ports for project acquisition, C compilation planning, translation-unit indexing, index catalog access, graph persistence, search, and lineage traversal. - Keep `CSourceIndexer` as a narrow one-translation-unit parser boundary; rename or wrap it if needed so project indexing is not confused with parsing one TU. - Keep Ladybug values, raw Cypher, native handles, and row decoding out of the application and domain modules. - Model cancellation/progress only if there is a concrete caller requirement; do not make the initial API async speculatively. ## Acceptance criteria - All use cases can be exercised against in-memory fake ports without invoking the CLI, libclang, or LadybugDB. - Request and result types use newtypes/enums rather than strings or untyped maps for identifiers, modes, formats, and closed sets. - Expected input, indexing, query, and persistence failures return typed errors with context and no panics. - Unit tests prove command-independent service dispatch and error propagation. - Module documentation identifies the domain, application, parser-adapter, persistence-adapter, and frontend boundaries. ## Dependencies None. This establishes the contracts consumed by the remaining issues.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
JayKobe6k/ClariTree#2
No description provided.