refactor(cli): call isCompatibilityActionable instead of mirroring the rule
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- build-system, cli, tooling
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 186
- フォーク
- 40
- 平均マージ
- 10時間 12分
- マージ済み PR(30日)
- 16
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nextlevelbuilder/skillx のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
nextlevelbuilder/skillx#65 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
nextlevelbuilder/skillx#63 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
nextlevelbuilder/skillx#49 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
nextlevelbuilder/skillx#28 ·
メンテナーはふだん 1 日以内に返信
-
refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
nextlevelbuilder/skillx#27 ·
メンテナーはふだん 1 日以内に返信
nextlevelbuilder/skillx の issue をすべて見る
似ている issue
-
ai-driven-qa bug claude Minor
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
linagora/twake-contacts-frontend#241 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
ui(ListToolbar): search takes the full row on a phone instead of sharing it with the result countオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
priority:high
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
ahmedkhaleel2004/gitdiagram#228 ·