본문으로 건너뛰기
cccskills
무료GitHub에 공개

cats-focus-monad

Cats Focus + Monad: Lawful composition for effect management

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi스타 71(GitHub 71 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(2)

  • SKILL.md1.9 KB
  • CONCOMITANT_SKILLS.md802 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Cats Focus + Monad

flatMap that shit

Core Laws

// Monad Laws
pure(a).flatMap(f) === f(a)                    // Left identity
fa.flatMap(pure) === fa                        // Right identity  
fa.flatMap(f).flatMap(g) === fa.flatMap(a => f(a).flatMap(g))  // Associativity

Focus (Monocle Optics)

import monocle.Focus
import monocle.syntax.all._

case class State(entropy: Long, archive: List[HyDefn])

// Lens into nested structure
val entropyLens = Focus[State](_.entropy)
val archiveLens = Focus[State](_.archive)

// Compose
state.focus(_.archive).modify(_ :+ newDefn)

Monad Composition Pattern

import cats.Monad
import cats.syntax.all._

def godelStep[F[_]: Monad](state: State): F[State] =
  for {
    entropy  <- nextEntropy[F](state.entropy)
    hydefn   <- generateHyDefn[F](entropy)
    proven   <- attemptProof[F](hydefn)
    newState <- if (proven) 
                  Monad[F].pure(state.focus(_.archive).modify(_ :+ hydefn))
                else 
                  Monad[F].pure(state)
  } yield newState

GF(3) Trit

cats-focus-monad (0) ⊕ cats-effect (+1) ⊕ validation (-1) = 0 ✓

Commands

# Add to build.sbt
libraryDependencies ++= Seq(
  "org.typelevel" %% "cats-core" % "2.13.0",
  "dev.optics" %% "monocle-core" % "3.3.0",
  "dev.optics" %% "monocle-macro" % "3.3.0"
)

Autopoietic Marginalia

The interaction IS the skill improving itself.

Every use of this skill is an opportunity for worlding:

  • MEMORY (-1): Record what was learned
  • REMEMBERING (0): Connect patterns to other skills
  • WORLDING (+1): Evolve the skill based on use

Add Interaction Exemplars here as the skill is used.

CT lattice atlas

Part of: para-mensch-commons (CT lattice family).

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Model ElevenLabs voice synthesis as an ACSet schema with Unison ability handlers for typed voice operations. Use when integrating ElevenLabs TTS into category-theoretic pipelines, building typed voice synthesis workflows, or managing multi-voice narration with GF(3) conservation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi712026년 7월 10일 업데이트

Systematic process for analyzing and modernizing legacy applications to comply with the 12-Factor App methodology. Covers code analysis, configuration externalization, dependency management, and container/Kubernetes best practices.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi712026년 7월 10일 업데이트

13c0e3

무료

Gay MCP skill at invocation 26

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi712026년 7월 10일 업데이트

19d57d

무료

Gay MCP skill at invocation 5

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi712026년 7월 10일 업데이트

1ea91a

무료

Gay MCP skill at invocation 27

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi712026년 7월 10일 업데이트

1eab21

무료

Gay MCP skill at invocation 3

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi712026년 7월 10일 업데이트

plurigrid의 스킬 모두 보기

이 스킬의 문제 신고