feat(genomic): add recursive boilerplate scanning#48
Merged
pyramation merged 1 commit intomainfrom Dec 27, 2025
Merged
Conversation
- Add scanBoilerplatesRecursive function to discover all boilerplates in a directory tree by looking for .boilerplate.json files - Add findBoilerplateByPath for matching fromPath against discovered boilerplates (exact match, then unambiguous basename match) - Add findBoilerplateByType and filterBoilerplatesByType helpers - Add scanBoilerplates method to TemplateScaffolder class - Update resolveFromPath to use recursive scan as fallback when direct path and .boilerplates.json resolution fail This enables proper boilerplate discovery when using --dir . to bypass .boilerplates.json, ensuring directories without .boilerplate.json (like scripts/) are never shown as options.
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
3 tasks
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.
Summary
Adds recursive boilerplate discovery to the genomic scaffolder, enabling proper filtering of directories that contain
.boilerplate.jsonfiles. This solves the issue where non-boilerplate directories (likescripts/) would appear as options when using--dir .to bypass.boilerplates.json.Key changes:
scanBoilerplatesRecursivefunction that recursively finds all directories with.boilerplate.jsonfindBoilerplateByPathfunction for matching user-provided paths against discovered boilerplates (exact match, then unambiguous basename match)scanBoilerplatesmethod toTemplateScaffolderclass for convenienceresolveFromPathto use recursive scanning as a fallback resolution strategyWith this change, when a user runs
pgpm init --dir ., only directories with.boilerplate.json(e.g.,default/module,default/workspace) will be available as options.Review & Testing Checklist for Human
pgpm init --dir .only showsdefault/moduleanddefault/workspace, notscripts/findBoilerplateByPath- returns null for ambiguous matches (e.g., if bothdefault/moduleandsupabase/moduleexist,modulereturns null)resolveFromPath. For large template repos, this could add latency. Consider if caching is needed.Test Plan
pgpm init --dir .and verify only valid boilerplates appearpgpm init module --dir .and verify it resolves todefault/modulepgpm init workspacestill works (uses.boilerplates.json)Notes
SKIP_DIRECTORIESlist is hardcoded but can be extended viaskipDirectoriesoption