feat(discovery): add Phase 1 shared discovery layer and discover CLI command#149
Open
feat(discovery): add Phase 1 shared discovery layer and discover CLI command#149
Conversation
…command Implements the discovery/query layer from the product Phase 1 strategy. Changes: - core/src/discovery/discovery-types.ts: New DiscoveryOutput schema with scored matches, confidence, reasons, disambiguation, related resources, and next_actions fields - core/src/discovery/discovery-service.ts: DiscoveryService.query() — weighted ranking (exact/prefix/contains/tag/path/description/fuzzy), Levenshtein tolerance (edit distance ≤ 2), dependency centrality bonus, disambiguation for close candidates, depth-1 related resources, next-action suggestions - core/src/discovery/discovery-service.test.ts: 12 fixture-based tests covering exact match, prefix, typo tolerance, type filter, no-match, disambiguation, related resources, next_actions, centrality bonus, inline token parsing - core/src/index.ts + browser.ts: Export discovery types and DiscoveryService - core/src/introspection/schema-generator.ts: Register discover command schema - cli/src/discover-action.ts: New CLI action with human and JSON output - cli/src/cli-actions.ts: Export discoverAction - cli/src/cli.ts: Register `dbt-tools discover "<query>"` command with --type, --limit, --fields, --json, --no-json, --dbt-target flags Quality gates: lint score 100, all 409 tests pass, coverage above thresholds, knip clean. https://claude.ai/code/session_01B9YSAvBqrwo9Ber77Dp7Zp
Fix Trunk Check CI failures caused by prettier formatting differences in the four new discovery files. https://claude.ai/code/session_01B9YSAvBqrwo9Ber77Dp7Zp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the discovery/query layer from the product Phase 1 strategy.
Changes:
scored matches, confidence, reasons, disambiguation, related resources,
and next_actions fields
ranking (exact/prefix/contains/tag/path/description/fuzzy), Levenshtein
tolerance (edit distance ≤ 2), dependency centrality bonus, disambiguation
for close candidates, depth-1 related resources, next-action suggestions
exact match, prefix, typo tolerance, type filter, no-match, disambiguation,
related resources, next_actions, centrality bonus, inline token parsing
dbt-tools discover "<query>"command with --type,--limit, --fields, --json, --no-json, --dbt-target flags
Quality gates: lint score 100, all 409 tests pass, coverage above thresholds,
knip clean.
https://claude.ai/code/session_01B9YSAvBqrwo9Ber77Dp7Zp