Skip to content
CAI
Software that uses CAICheck a score

luoxiu/Schedule

64.4

Adequate · 1 October 2026

1.8k

lines of production code

Swift

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Swift library designed for managing scheduled tasks and time-based operations. It provides core components for defining execution plans, handling intervals, and batching timed tasks with thread-safe state management. The library supports various scheduling triggers, including one-time delays, repeating intervals, and specific day or time constraints.

Features

Add Schedule playground demo

A new playground example has been added to demonstrate the Schedule library's scheduling capabilities, including one-time delays, repeating intervals, and specific day/time triggers.

Schedule.playground · high confidence

Initial release of the Schedule library for Swift

This change introduces the core scheduling engine for the Schedule library. It provides \Plan\ and \Interval\ types to define execution schedules, \Task\ and \TaskCenter\ for managing and batching timed operations, and specialized \RunLoopTask\ support for run-loop-based timers. The library also includes domain-specific types for time-based scheduling (\Time\, \Monthday\, \Weekday\) and date-based periods (\Period\), along with foundational utilities like \Atomic\ and \Bag\ for thread-safe state management.

Sources · high confidence

Architecture

Xcode project structure and build configuration added

The Schedule.xcodeproj directory now contains the full Xcode project file (project.pbxproj) along with associated workspace and scheme configurations. This includes the definition of the main Schedule framework target, a dedicated ScheduleTests target with its own Info.plist, and a Scheme for building and testing the package. The project structure organizes source files (such as Atomic, Bag, Interval, Plan, Task, and TaskCenter) and their corresponding test files, enabling direct development and testing within the Xcode IDE.

Schedule.xcodeproj · high confidence

Test coverage

Initial test suite for Schedule

Added a comprehensive XCTest suite for the Schedule library, covering core components such as Plan, Task, TaskCenter, Interval, Period, Time, Weekday, Monthday, and various utility types like Atomic and Bag. The tests verify scheduling logic, task lifecycle management, interval arithmetic, and date/time parsing to ensure reliability across supported platforms.

Tests · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 64 → 64 (+0.9)
  • Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (-0.2)
  • Architecture 91 → 98 (+6.1)
  • Maturity 49 → 49 (+0.0)
  • Readiness 55 → 58 (+3.4)
  • Security 100 → 100 (+0.0)

Resolved (1)

  • Documentation: no installation or build instructions (README.md)

New (5)

  • Dependency hygiene PARTLY measured — SwiftPM pinning read, dependency currency NOT established
  • Duplicated block (8 lines × 2) (Sources/Schedule/Plan.swift)
  • Inconsistent input types for the same operation. every accepts Interval, Period, and String to define recurrence. Interval and Period are both time durations but have different internal structures (nanoseconds vs date components). String is a parser. This forces users to know which type to use for what kind of schedule (e.g., 'every 5 seconds' vs 'every 5 days').
  • Redundant comparison methods. These are logically equivalent to using the standard comparison operators (<, >) or the existing compare method. Providing specific boolean predicates for length comparison duplicates the intent of the comparison operators and adds API surface without distinct semantic value.
  • Verbosity and inconsistency with standard library patterns. While distinct, having 8 separate methods for unit conversion is verbose. More importantly, Interval stores data as nanoseconds: Double. The existence of asNanoseconds alongside the property nanoseconds is redundant. Furthermore, Swift standard library conventions often prefer a single components or description approach, or extension-based conversions, rather than hardcoding every unit into the core type.

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

luoxiu/Schedule was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit ca64940da38282f4ee7ec915a1c3a7e1a2ff02a0 — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.