fix(skills): correct scoring-checks function signature across platforms#181
Open
xiaolai wants to merge 1 commit intocaliber-ai-org:masterfrom
Open
fix(skills): correct scoring-checks function signature across platforms#181xiaolai wants to merge 1 commit intocaliber-ai-org:masterfrom
xiaolai wants to merge 1 commit intocaliber-ai-org:masterfrom
Conversation
The .agents/ and .cursor/ scoring-checks skills documented incompatible
check function signatures that contradict src/scoring/checks/*.ts:
.agents/ used: export default function {checkName}(ctx: ScoringContext): Check[]
.cursor/ used: export function <checkName>(fingerprint: Fingerprint, config: ParsedConfig): Check[]
Actual pattern: export function check{Category}(dir: string): Check[]
The actual check functions take a `dir: string` path and inspect the
filesystem directly (existsSync, readFileSync). They do not receive a
ScoringContext, Fingerprint, or ParsedConfig object.
Additional fixes:
- .cursor/ referenced non-existent fields (weight, maxScore, score, reasons)
instead of the actual Check shape (maxPoints, earnedPoints, passed, detail)
- Both versions referenced non-existent types and patterns
Updated both platform copies to document the correct dir-based named-export
pattern matching src/scoring/checks/existence.ts and src/scoring/index.ts.
Co-Authored-By: Claude Code <noreply@anthropic.com>
This was referenced Apr 20, 2026
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.
Bug
The
.agents/and.cursor/copies ofskills/scoring-checks/SKILL.mddocument check function signatures that contradict every actual check function insrc/scoring/checks/:.claude/export function check{Category}(dir: string): Check[]✅.agents/export default function {checkName}(ctx: ScoringContext): Check[]❌.cursor/export function <checkName>(fingerprint: Fingerprint, config: ParsedConfig): Check[]❌The actual functions in
src/scoring/checks/(checkExistence,checkQuality,checkGrounding, etc.) all take a singledir: stringparameter. They inspect the filesystem directly viafs.existsSync,fs.readFileSync, etc.The
.cursor/version also referenced non-existentCheckfields (weight,maxScore,score,reasons) instead of the actual interface (maxPoints,earnedPoints,passed,detail).Why it matters
An agent following the
.agents/skill will create checks expecting aScoringContextthat doesn't exist at the call site. The.cursor/skill's(fingerprint, config)parameters aren't passed bycomputeLocalScore()either — it callscheckExistence(dir), notcheckExistence(fingerprint, config). Either version produces TypeScript compile errors before any check can run.Fix
Updated
.agents/and.cursor/to document the correct(dir: string): Check[]pattern, with the correctCheckinterface shape, matching.claude/and the actualsrc/scoring/checks/*.tsfiles.