Conversation
…arsing helpers - Introduced a new package `@cellix/query-params` to provide query-string parsing utilities. - Implemented `parseBooleanFlag` for boolean flag parsing with explicit error handling. - Implemented `parseStringList` for splitting and trimming comma-separated strings. - Added tests for both parsing functions to ensure expected behavior. - Created a manifest and README to document the package purpose, scope, and usage. refactor: internal refactor of @cellix/retry-policy package - Refactored the backoff calculation logic into a separate internal module. - Maintained the public API and ensured all existing tests passed. - Updated documentation to reflect internal changes while keeping the public contract stable. fix: resolve leaky API in @cellix/http-headers package - Removed unnecessary internal helper export from the package to maintain a clean public API. - Updated README and manifest to ensure alignment with the intended public contract. feat: create new @cellix/slugify package for URL-safe slug generation - Developed a new package `@cellix/slugify` to generate predictable slugs from display text. - Implemented the `slugify` function with options for separator control. - Added tests and documentation to support usage and examples. fix: address internal helper usage in tests for @cellix/command-router package - Removed direct imports of internal helpers in tests to comply with public contract testing rules. - Ensured all tests only interact with the public API of the package.
Contributor
Reviewer's GuideIntroduces a new on-demand agent skill Sequence diagram for running skill_cellix_tdd_check on a packagesequenceDiagram
actor Developer
participant PNPM as pnpm_cli
participant Check as CheckCellixTddTs
participant Init as InitCellixTddSummaryTs
participant Eval as EvaluateCellixTddTs
participant FS as FileSystem
Developer->>PNPM: pnpm run skill:cellix-tdd:check -- --package <pkg>
PNPM->>Check: node --experimental-strip-types check-cellix-tdd.ts --package <pkg>
Check->>FS: resolve packageRoot and outputPath
Check->>FS: fileExists(outputPath)
alt summary missing or forceInit
Check->>Init: spawn init-cellix-tdd-summary.ts --package <pkg> --output <summary>
Init->>FS: read summary-template.md
Init->>FS: read package.json for name
Init->>FS: mkdir runs/<relative-package-path>
Init->>FS: write summary.md scaffold
Init-->>Check: exit status
Check->>Developer: log Summary scaffold created message
alt initOnly flag
Check-->>PNPM: exit 0
PNPM-->>Developer: command completes after scaffold
end
end
Check->>Eval: spawn evaluate-cellix-tdd.ts --package <pkg> --output <summary> [--json]
Eval->>FS: read summary.md
Eval->>FS: resolve package.json and exports
Eval->>FS: scan package files and tests
Eval->>FS: read manifest.md, README.md, source files
Eval-->>Check: EvaluationResult (overallStatus, failedChecks, totalScore)
Check-->>PNPM: propagate Eval exit code
PNPM-->>Developer: print formatted evaluation or JSON
Class diagram for evaluator and checker structure in cellix_tdd skillclassDiagram
class EvaluateCellixTddModule {
+requiredOutputSections: string[]
+requiredManifestSections: string[]
+checkDefinitions: CheckDefinition[]
+maxScore: number
+passingScore: number
+main(): void
+parseArgs(argv: string[]): ParsedArgsEvaluate
+printUsage(): void
+readText(filePath: string): string
+readJson(filePath: string): any
+getDefaultSummaryPath(packageRoot: string): string
+fileExists(filePath: string): boolean
+directoryExists(filePath: string): boolean
+listFiles(root: string): string[]
+parseMarkdownSections(markdown: string): Map~string,string~
+hasHeading(markdown: string, heading: string): boolean
+findDocFile(packageRoot: string, names: string[]): string
+resolvePackageJson(packageRoot: string): object
+resolveExports(packageRoot: string, packageJson: object): Map~string,string[]~
+collectAllowedEntryFiles(packageRoot: string, exportTargets: Map~string,string[]~): Set~string~
+getPublicDeclarations(allowedEntryFiles: Set~string~): ExportDeclaration[]
+evaluatePackage(label: string, packageRoot: string, outputPath: string): EvaluationResult
+evaluateFixture(fixtureDir: string, verifyExpected: boolean): FixtureEvaluation
+getFixtureDirectories(fixturesRoot: string): string[]
+compareExpected(result: EvaluationResult, expected: ExpectedReport): ExpectedComparison
+formatResult(result: EvaluationResult): string
}
class CheckCellixTddModule {
+main(): void
+parseArgs(argv: string[]): ParsedArgsCheck
+printUsage(): void
+fileExists(filePath: string): boolean
+getDefaultSummaryPath(packageRoot: string): string
+runScript(scriptPath: string, args: string[]): number
}
class InitCellixTddSummaryModule {
+main(): void
+parseArgs(argv: string[]): ParsedArgsInit
+printUsage(): void
+fileExists(filePath: string): boolean
+directoryExists(filePath: string): boolean
+getDefaultSummaryPath(packageRoot: string): string
+readTemplate(): string
+readPackageName(packageRoot: string): string
}
class ParsedArgsEvaluate {
+fixtureDir: string
+fixturesRoot: string
+packageRoot: string
+outputPath: string
+verifyExpected: boolean
+json: boolean
}
class ParsedArgsCheck {
+packageRoot: string
+outputPath: string
+forceInit: boolean
+initOnly: boolean
+json: boolean
}
class ParsedArgsInit {
+packageRoot: string
+outputPath: string
+force: boolean
}
class CheckDefinition {
+id: CheckId
+weight: number
+critical: boolean
+description: string
}
class ExportDeclaration {
+filePath: string
+name: string
+hasDoc: boolean
+kind: string
}
class CheckResult {
+id: CheckId
+weight: number
+critical: boolean
+description: string
+passed: boolean
+details: string[]
}
class EvaluationResult {
+label: string
+packageRoot: string
+outputPath: string
+totalScore: number
+overallStatus: string
+failedChecks: CheckId[]
+checks: CheckResult[]
}
class ExpectedReport {
+overallStatus: string
+failedChecks: CheckId[]
}
class FixtureEvaluation {
+result: EvaluationResult
+comparison: ExpectedComparison
}
class ExpectedComparison {
+matches: boolean
+problems: string[]
}
EvaluateCellixTddModule --> ParsedArgsEvaluate
EvaluateCellixTddModule --> CheckDefinition
EvaluateCellixTddModule --> ExportDeclaration
EvaluateCellixTddModule --> CheckResult
EvaluateCellixTddModule --> EvaluationResult
EvaluateCellixTddModule --> ExpectedReport
EvaluateCellixTddModule --> FixtureEvaluation
EvaluateCellixTddModule --> ExpectedComparison
CheckCellixTddModule --> ParsedArgsCheck
CheckCellixTddModule ..> EvaluateCellixTddModule
CheckCellixTddModule ..> InitCellixTddSummaryModule
InitCellixTddSummaryModule --> ParsedArgsInit
InitCellixTddSummaryModule ..> EvaluateCellixTddModule
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
- extract shared utilities (fileExists, directoryExists, getDefaultSummaryPath)
into evaluator/utils.ts to eliminate duplication across all three scripts
- fix findExportDeclarations to handle barrel/re-export patterns:
named re-exports (export { Name [as Alias] } from './source'),
star re-exports (export * from './source'), and export default.
follows one level deep with cycle detection via visited set.
TSDoc accepted at either re-export site or declaration site.
getPublicDeclarations now deduplicates by name across entry files.
- fix readmeConsumerFacing heading regex to accept common consumer-facing
headings: Getting Started, Installation, API, Overview, How to Use, Guide
- expand mentionsSurface regex to accept 'exporting' and 'exported'
in addition to the existing surface/export keyword set
- fix init-cellix-tdd-summary.ts readTemplate() to resolve the template
path via import.meta.url instead of process.cwd() so it works
regardless of working directory
- update leaky-overbroad-api fixture agent-output to have clearly
incomplete release hardening notes so all three keyword checks fail
cleanly after the mentionsSurface fix
- add Copilot Agent Notes section to SKILL.md covering: ask_user for
collaboration step, task/explore agent delegation for discovery
(including grep command for finding monorepo consumers), and the
iterative evaluator loop
- add .agents/skills/** and .github/skills/** to knip ignore so
evaluator scripts and fixture package source files are not treated
as unused workspace code, and the .github/skills symlink is not
followed into the skill directory
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- validate that the resolved package root is inside process.cwd() before constructing the default summary path; reject out-of-repo paths with a clear error so ../.. segments cannot cause the summary to be written outside the intended runs/ directory - change getPublicDeclarations dedup key from export name alone to filePath:name composite so that the same symbol name exported from different source files across multiple package entrypoints is checked independently; true duplicates (same source file re-exported via multiple entries) still collapse correctly Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
content has been captured in .agents/skills/cellix-tdd/references/ Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…scope, and downstream impact checks - Add conditional Contract Gate step (step 3) between Consumer Usage Exploration and Public Contract Definition - Gate triggers on new packages, removed/renamed exports, material behavioral changes, dependent breakage, or uncertainty; skips for clearly additive low-risk changes - Add two-question export justification requirement to Public Contract Definition - Clarify semver policy: do not justify breaking changes because pre-1.0; additive changes may still be non-breaking but evaluate conservatively - Add evaluator scope disclaimer to step 9, Validation Expectations, and Copilot Agent Notes: passing score ≠ contract correctness or publication readiness - Add downstream dependent discovery (rg) to Discovery First section and verification check to Release Hardening - Add three new anti-patterns: skipping contract gate when warranted, test-driven export widening, treating evaluator pass as publish approval - Update evaluator requiredOutputSections, summary template, and all 6 fixture agent-outputs to include contract gate summary - Fix paragraph formatting in Copilot Agent Notes iterative evaluation section Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… comprehensive documentation, improved component APIs, and public contract testing
…ns in Vitest configs
…nization, and validation processes after first trial usage - Updated SKILL.md to clarify documentation and testing requirements for public exports. - Enhanced evaluate-cellix-tdd.ts to ensure tests are grouped by exported member and to improve TSDoc quality checks. - Added new fixtures for ambiguous flat tests, including README and manifest files for example @cellix/network-endpoint. - Improved validation summaries across various agent outputs to include package build and existing test confirmations. - Revised rubric.md to reflect stricter requirements for documentation alignment and public contract testing. - Updated summary-template.md to guide on documenting test plans and validation steps more comprehensively.
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.
Summary by Sourcery
Introduce a new on-demand
cellix-tddagent skill for consumer-first TDD workflows on@cellix/*packages, including evaluator tooling, documentation, fixtures, and supporting scripts.New Features:
cellix-tddskill with a defined TDD-centric workflow and required summary structure for evolving@cellix/*packages.cellix-tddworkflow.Enhancements:
cellix-tddskill alongside existing skills and clarify that some skills are discoverable on-demand only via.agents/skillsand.github/skills.cellix-tddsummaries.Build:
cellix-tddevaluator test suite and to scaffold/evaluate package summaries via the new checker CLI.Documentation:
cellix-tddskill, plus additional background context docs for its workflow and documentation model.Tests:
cellix-tddevaluator behavior across multiple package scenarios.