Skip to content

fix(lib): detect technologies in informal multi-project directories#107

Open
ThurubilliSaiManoj2026 wants to merge 1 commit into
midudev:mainfrom
ThurubilliSaiManoj2026:51-detect-technologies-in-multi-project-directories
Open

fix(lib): detect technologies in informal multi-project directories#107
ThurubilliSaiManoj2026 wants to merge 1 commit into
midudev:mainfrom
ThurubilliSaiManoj2026:51-detect-technologies-in-multi-project-directories

Conversation

@ThurubilliSaiManoj2026
Copy link
Copy Markdown

Fixes #51

Problem

When autoskills is run from a parent folder containing multiple independent
sub-projects (no pnpm-workspace.yaml, no workspaces field, no deno.json
workspace), resolveWorkspaces() returns [] and root detection finds nothing,
resulting in "No technologies detected".

Root Cause

The detection engine in detectTechnologies() only scans sub-directories when
a formal workspace config is present. Plain multi-project folders are not
covered by any existing code path.

Fix

Added scanSubdirProjects() — a private function that scans immediate
subdirectories (1 level deep) for package.json, deno.json, or deno.jsonc
files. This is used as a fallback inside detectTechnologies() when both
conditions are true:

  • resolveWorkspaces() returns [] (no formal workspace config)
  • Root detection yields zero technologies

Skips SCAN_SKIP_DIRS (node_modules, .git, dist, etc.) and hidden
directories (those starting with .). Does not activate when the root itself
has detectable technologies.

Tests

Added 6 new tests in workspace.test.ts under the describe block
detectTechnologies — informal multi-project directory fallback:

  • Detects technologies when root has no package.json
  • Detects technologies when root package.json has no deps
  • Does NOT trigger fallback when root already has detectable tech
  • Skips node_modules during fallback scan
  • Skips hidden directories during fallback scan
  • Deduplicates technologies across multiple sub-projects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No technologies detected in multi-project directories

1 participant