fix(lib): detect technologies in informal multi-project directories#107
Conversation
44d7709 to
2b60519
Compare
2b60519 to
0ab6121
Compare
📝 WalkthroughWalkthroughSe actualizan metadatos y hashes del registro de habilidades, estados de revisión y seguridad, referencias de archivos y configuraciones Astro. También se agregan exclusiones para archivos generados y scripts temporales. ChangesActualización del registro de habilidades
Estimated code review effort: 3 (Moderate) | ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@packages/autoskills/skills-registry/clerk-astro-patterns/templates/astro-basic-auth/astro.config.mjs`:
- Around line 5-10: Actualiza el registro de skills en index.json para que el
hash sha256 asociado a la plantilla astro-basic-auth/astro.config.mjs sea
0082ecc32befa3751c50dbae23bef6098fa2ede8f3c8ce7621836df837beb226, sin modificar
el contenido de la configuración ni otros hashes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 81e77ce3-0d86-4177-be0c-0b7c5501e58c
📒 Files selected for processing (4)
.gitignoreastro.config.mjspackages/autoskills/skills-registry/clerk-astro-patterns/templates/astro-basic-auth/astro.config.mjspackages/autoskills/skills-registry/index.json
|
|
||
| export default defineConfig({ | ||
| integrations: [clerk()], | ||
| adapter: node({ mode: "standalone" }), | ||
| output: "server", | ||
| }) | ||
| }); |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
actual=$(sha256sum packages/autoskills/skills-registry/clerk-astro-patterns/templates/astro-basic-auth/astro.config.mjs | awk '{print $1}')
expected=$(jq -r '."clerk-astro-patterns".sha256["templates/astro-basic-auth/astro.config.mjs"]' packages/autoskills/skills-registry/index.json)
test "$actual" = "$expected"Repository: midudev/autoskills
Length of output: 199
🏁 Script executed:
python3 - <<'PY'
import hashlib, json, pathlib
file_path = pathlib.Path("packages/autoskills/skills-registry/clerk-astro-patterns/templates/astro-basic-auth/astro.config.mjs")
index_path = pathlib.Path("packages/autoskills/skills-registry/index.json")
data = file_path.read_bytes()
actual = hashlib.sha256(data).hexdigest()
index = json.loads(index_path.read_text())
expected = index["clerk-astro-patterns"]["sha256"]["templates/astro-basic-auth/astro.config.mjs"]
print("actual =", actual)
print("expected =", expected)
print("match =", actual == expected)
PYRepository: midudev/autoskills
Length of output: 263
🏁 Script executed:
python3 - <<'PY'
import json, pathlib
index_path = pathlib.Path("packages/autoskills/skills-registry/index.json")
index = json.loads(index_path.read_text())
print("top-level keys:", list(index.keys())[:20])
for k, v in index.items():
if isinstance(v, dict) and "sha256" in v:
print("entry key:", k)
print("sha256 keys sample:", list(v["sha256"].keys())[:20])
break
PYRepository: midudev/autoskills
Length of output: 221
🏁 Script executed:
python3 - <<'PY'
import pathlib
p = pathlib.Path("packages/autoskills/skills-registry/index.json")
text = p.read_text()
for needle in ["clerk", "astro", "templates/astro-basic-auth/astro.config.mjs"]:
print(f"--- {needle} ---")
for i, line in enumerate(text.splitlines(), 1):
if needle in line:
print(f"{i}: {line}")
PYRepository: midudev/autoskills
Length of output: 4471
🏁 Script executed:
python3 - <<'PY'
import hashlib, json, pathlib
file_path = pathlib.Path("packages/autoskills/skills-registry/clerk-astro-patterns/templates/astro-basic-auth/astro.config.mjs")
index_path = pathlib.Path("packages/autoskills/skills-registry/index.json")
actual = hashlib.sha256(file_path.read_bytes()).hexdigest()
index = json.loads(index_path.read_text())
expected = index["skills"]["clerk-astro-patterns"]["sha256"]["templates/astro-basic-auth/astro.config.mjs"]
print("actual =", actual)
print("expected =", expected)
print("match =", actual == expected)
PYRepository: midudev/autoskills
Length of output: 320
Actualiza el hash del template en el registro
packages/autoskills/skills-registry/index.json tiene sha256 desfasado para packages/autoskills/skills-registry/clerk-astro-patterns/templates/astro-basic-auth/astro.config.mjs; debería ser 0082ecc32befa3751c50dbae23bef6098fa2ede8f3c8ce7621836df837beb226.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@packages/autoskills/skills-registry/clerk-astro-patterns/templates/astro-basic-auth/astro.config.mjs`
around lines 5 - 10, Actualiza el registro de skills en index.json para que el
hash sha256 asociado a la plantilla astro-basic-auth/astro.config.mjs sea
0082ecc32befa3751c50dbae23bef6098fa2ede8f3c8ce7621836df837beb226, sin modificar
el contenido de la configuración ni otros hashes.
Fixes #51
Problem
When
autoskillsis run from a parent folder containing multiple independentsub-projects (no
pnpm-workspace.yaml, noworkspacesfield, nodeno.jsonworkspace),
resolveWorkspaces()returns[]and root detection finds nothing,resulting in "No technologies detected".
Root Cause
The detection engine in
detectTechnologies()only scans sub-directories whena 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 immediatesubdirectories (1 level deep) for
package.json,deno.json, ordeno.jsoncfiles. This is used as a fallback inside
detectTechnologies()when bothconditions are true:
resolveWorkspaces()returns[](no formal workspace config)Skips
SCAN_SKIP_DIRS(node_modules,.git,dist, etc.) and hiddendirectories (those starting with
.). Does not activate when the root itselfhas detectable technologies.
Tests
Added 6 new tests in
workspace.test.tsunder the describe blockdetectTechnologies — informal multi-project directory fallback:package.jsonpackage.jsonhas no depsnode_modulesduring fallback scanSummary by CodeRabbit
Mantenimiento
Mejoras internas
Estilo