refactor(cli): call isCompatibilityActionable instead of mirroring the rule
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Refactorización
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- build-system, cli, tooling
Línea de trabajo
Start with packages/cli/src/lib/skill-lookup.ts, packages/cli/tsconfig.json, and the CLI tsup.config.ts, then inspect packages/contracts/src/compatibility.test.ts and the existing contract export. Verify the workspace dependency, path resolution, rootDir, and bundling behavior by running the CLI bundler and executing node bin/skillx.js check --target . Done means the artifact agrees with isCompatibilityActionable for all five statuses and pnpm test passes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
packages/cli/src/lib/skill-lookup.ts mirrors the compatibility actionability rule by hand:
export function isActionable(status: string | null | undefined): boolean {
return status === 'declared' || status === 'verified';
}
packages/contracts owns the real rule (isCompatibilityActionable, with the vocabulary in COMPATIBILITY_STATUSES). Two implementations of one rule is exactly the drift the cross-surface parity suite in PR #41 exists to catch — and the CLI is the one surface that suite cannot reach.
Why it was not fixed in PR #41
Making the CLI import @skillx/contracts requires changing how the published artifact is bundled:
packages/cli/tsconfig.jsonsetsrootDir: "./src", so any import outsidesrc/fails typecheck;- tsup treats
dependenciesas external by default, and@skillx/contractsships TypeScript source with no compile step, so it has to go indevDependenciesand be force-bundled (noExternal), together with the tsconfigpathsentry that the bundler needs to resolve it.
Getting that wrong breaks the npm publish path, which release-please triggers automatically on merge to main. That is a poor trade for a one-line predicate.
Mitigation already in place
packages/contracts/src/compatibility.test.ts pins COMPATIBILITY_STATUSES to an explicit list, with a comment naming this mirror. Adding a sixth status now fails that test instead of silently leaving the CLI wrong.
What the fix needs
- Add
@skillx/contractstopackages/clidevDependenciesasworkspace:*. - Add the tsconfig
pathsentry and drop or widenrootDir. - Add
noExternal: ['@skillx/contracts']totsup.config.ts. - Delete the mirrored predicate and delegate to the contract.
- Verify at the artifact level, not just in source: run the CLI bundler, then execute the resulting CLI (
node bin/skillx.js check <slug> --target <runtime>) and confirm the bundle inlined the rule instead of leaving an unresolvable import.
Acceptance
- The shipped CLI reports the same actionable decision as
isCompatibilityActionablefor all five statuses. pnpm teststill passes, and the parity test's note about the CLI limitation can be removed.
- Lenguaje dominante
- TypeScript
- Estrellas
- 186
- Forks
- 40
- Merge medio
- 10 h 12 min
- PR fusionados (30 d)
- 16
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nextlevelbuilder/skillx
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
nextlevelbuilder/skillx#65 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
nextlevelbuilder/skillx#63 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
nextlevelbuilder/skillx#49 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
nextlevelbuilder/skillx#28 ·
Los mantenedores suelen responder en 1 día
-
refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
nextlevelbuilder/skillx#27 ·
Los mantenedores suelen responder en 1 día
Todos los issues de nextlevelbuilder/skillx
Issues similares
-
enhancement good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
OWASP/cve-lite-cli#1335 ·
Los mantenedores suelen responder en 1 día
-
Windows: main-screen mouse tracking requires WT_SESSION, so it never enables inside herdr panesAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
code-yeongyu/senpi#3353 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Channels status: needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
mastra-ai/mastra#27093 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement needs-triage ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día