Skip to content

finos/morphir-scala / .claude/skills/squire

squire

Verified

Use when morphir-scala work needs environment diagnostics or build/network/sandbox unblocking; reference repository management; branch lifecycle refresh after squash-merging a target branch into main; Morphir IR spec/schema sync or export; or task-tracking configuration and beads mode resolution.

FileKindSize
.gitignoreother180 B
.mill-versionother19 B
README.mdmarkdown7.6 KB
SKILL.mdskill md6.7 KB
SquireBranch.scalaother6.4 KB
SquireCellar.scalaother7.4 KB
SquireChangelog.scalaother20.6 KB
SquireDoctor.scalaother13.9 KB
SquireEnv.scalaother16.2 KB
SquireModel.scalaother4.9 KB
SquireProcess.scalaother1.5 KB
SquireRepo.scalaother30.4 KB
SquireSchemas.scalaother25.2 KB
SquireSpec.scalaother35.6 KB
SquireTests.scalaother323.1 KB
SquireTracking.scalaother16.4 KB
SquireVersionCorpus.scalaother3.3 KB
millexecutablescript6.5 KB
mill.batscript9.7 KB
references/branch.mdmarkdown4.4 KB
references/cellar.mdmarkdown4.4 KB
references/doctor.mdmarkdown5.3 KB
references/env.mdmarkdown3.9 KB
references/mill-morphir.mdmarkdown1.6 KB
references/repo.mdmarkdown7.6 KB
references/spec-sync.mdmarkdown10.6 KB
references/tracking.mdmarkdown10.9 KB
squireexecutablescript1.2 KB
squire.batscript1.8 KB
squire.scalaother36.8 KB
test-resources/META-INF/services/kyo.test.Testother275 B
test-resources/schemas/morphir-ir-v4.jsonconfig107.1 KB
test-resources/schemas/morphir-ir-v4.yamlconfig74.2 KB

SquireVersionCorpus.scala

View on GitHub
//| scalaVersion: 3.9.0
//| moduleDeps: [SquireModel.scala]

import java.nio.file.Files
import kyo.*

/**
 * Reads `.config/version-rules` into typed cases, for asserting the [[SquireVersion]] port against the same data the
 * originals in `mill-plugins/morphir/core` are asserted against.
 *
 * There is a second loader over these files, `VersionCorpus` in that module's test sources. Neither owns the shape:
 * the JSON does, and a field renamed on one side has to be renamed on the other. That is the coupling the corpus is
 * for, made visible rather than left to a doc comment.
 *
 * The record fields are named to match the JSON keys exactly, since the decode is by field name.
 */
object SquireVersionCorpus:

  final case class ParseCase(text: String, major: Int, minor: Int, patch: Int, prerelease: Maybe[String]) derives Schema
  final case class RejectCase(text: String, why: String) derives Schema
  final case class CompareCase(left: String, right: String, sign: Int) derives Schema
  final case class CompareRejectCase(left: String, right: String, messageContains: String) derives Schema
  final case class TagForCase(version: String, tag: String) derives Schema
  final case class VersionFromTagCase(tag: String, version: Maybe[String]) derives Schema
  final case class StreamCase(
      namespace: Maybe[String],
      pattern: String,
      tagFor: List[TagForCase],
      versionFromTag: List[VersionFromTagCase]
  ) derives Schema
  final case class ReleaseLineCase(file: String, source: String, releaseLine: String) derives Schema
  final case class ReleaseLineRejectCase(file: String, source: String, message: String) derives Schema
  final case class HeadingRow(version: String, date: Maybe[String]) derives Schema
  final case class HeadingCase(file: String, headings: List[HeadingRow]) derives Schema
  final case class AreaCase(
      name: String,
      namespace: Maybe[String],
      changelogPath: String,
      startingVersion: Maybe[String],
      millSelector: String
  ) derives Schema

  final case class Corpus(
      semverParse: List[ParseCase],
      semverRejects: List[RejectCase],
      semverCompare: List[CompareCase],
      semverCompareRejects: List[CompareRejectCase],
      tagStreams: List[StreamCase],
      changelogReleaseLine: List[ReleaseLineCase],
      changelogReleaseLineRejects: List[ReleaseLineRejectCase],
      changelogHeadings: List[HeadingCase],
      areas: List[AreaCase]
  ) derives Schema

  /** Loads the corpus rooted at the given directory, and reads a changelog sample by the file name a case names. */
  def load(directory: Path): Corpus < (Sync & Abort[SquireError]) =
    Sync.defer(Files.readString((directory / "corpus.json").toJava)).map { text =>
      SquireJson.decode[Corpus](text) match
        case Result.Success(corpus) => corpus
        case failure                =>
          Abort.fail(
            SquireError.Failure("version-corpus", s"${directory / "corpus.json"} did not decode: $failure")
          )
    }

  /** The build's own view of an area, as `./mill show ci.releaseAreas` reports it. */
  final case class BuildReleaseArea(
      name: String,
      namespace: Maybe[String],
      changelogPath: String,
      startingVersion: Maybe[String]
  ) derives Schema

  def changelog(directory: Path, file: String): String < Sync =
    Sync.defer(Files.readString((directory / "changelogs" / file).toJava))
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall