From 0e08d69767b72fec55c7d5610e382448be628f5a Mon Sep 17 00:00:00 2001 From: rochala Date: Wed, 21 Oct 2026 12:29:42 +0200 Subject: [PATCH 1/4] Tell agents when to use each get member mode Refresh the example output to the current format, including the Supertypes line from #247. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NKsT2pk4Cgn8JG8KsYEWoP --- skills/cellar/SKILL.md | 47 +++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/skills/cellar/SKILL.md b/skills/cellar/SKILL.md index b66f22a..fd2d4d7 100644 --- a/skills/cellar/SKILL.md +++ b/skills/cellar/SKILL.md @@ -32,7 +32,8 @@ Query the current project's code and all its dependencies. Cellar auto-detects t - `--test`: query the test-scope classpath (sbt/scala-cli; for Mill, use the test module directly, e.g. `--module foo.test`) - `--no-cache`: skip classpath cache, re-extract from build tool - `--java-home `: override JRE classpath -- `-l`, `--limit `: max results for `list`/`search` (default: 50), max members for `get` +- `-l`, `--limit `: max results for `list`/`search` (default: 50). On `get` it truncates members with no way + to page; prefer `--hide-inherited` to shrink output - `--hide-inherited`: show only members declared on the type itself (`get` commands) - `--group-inherited`: group members by declaring type with section headers (`get` commands) - `-v`, `--verbose` / `--debug`: diagnostics to stderr. Use when a symbol you expect is reported as @@ -95,26 +96,44 @@ cellar search --module lib flatMap ## Example output -`cellar get-external --hide-inherited org.typelevel:cats-core_3:2.10.0 cats.Monad` +`cellar get-external --hide-inherited -l 4 org.typelevel:cats-core_3:2.10.0 cats.Monad` -```markdown +````markdown ## cats.Monad -`trait Monad[F] extends FlatMap[F] with Applicative[F]` -**Flags:** abstract +```scala +trait Monad[F[_]] extends FlatMap[F] with Applicative[F] +``` +**Supertypes:** cats.Applicative, cats.InvariantMonoidal, cats.FlatMap, cats.FlatMapArityFunctions, cats.Apply, cats.ApplyArityFunctions, cats.InvariantSemigroupal, cats.Semigroupal, cats.Functor, cats.Invariant, java.io.Serializable + +Monad. +Allows composition of dependent effectful functions. + **Origin:** cats.Monad **Members:** -def iterateWhile[A](f: F[A]): (p: A => Boolean): F[A] -def untilM[G, A](f: F[A]): (cond: => F[Boolean]): (G: Alternative[G]): F[G[A]] -def whileM_[A](p: F[Boolean]): (body: => F[A]): F[Unit] -def iterateUntil[A](f: F[A]): (p: A => Boolean): F[A] -… (+ 7 more) +```scala +def iterateWhile[A](f: F[A])(p: A => Boolean): F[A] +def untilM[G[_], A](f: F[A])(cond: => F[Boolean])(implicit G: Alternative[G]): F[G[A]] +def ifElseM[A](branches: (F[Boolean], F[A])*)(els: F[A]): F[A] +def iterateUntilM[A](init: A)(f: A => F[A])(p: A => Boolean): F[A] +// … 6 more members +``` **Companion members:** -trait Ops[F, A] -def apply[F](instance: Monad[F]): Monad[F] -… +```scala +trait Ops[F[_], A] extends Serializable +object ops +def apply[F[_]](implicit instance: Monad[F]): Monad[F] +trait ToMonadOps extends Serializable +// … 4 more members ``` +```` + +`**Supertypes:**` lists every ancestor, nearest first: the order Scala searches for a member's implementation. + +### Choosing member output -Use `--hide-inherited` to get only own members. Without it, all inherited members are shown (can be large for deep hierarchies). +- Default: every member callable on the type, inherited ones included. Use it to find what you can call. +- `--hide-inherited`: only what the type itself declares. Use it for what a subtype adds, or when the full output is too large. +- `--group-inherited`: members under `// Declared on` / `// Inherited from` headers. Use it when you need the declaring parent, e.g. to read its docs or find what to override. ## When Metals MCP is also available From 44c3c9e47d16902e3c0a4280bb01c0e9084578df Mon Sep 17 00:00:00 2001 From: rochala Date: Wed, 21 Oct 2026 12:34:14 +0200 Subject: [PATCH 2/4] Show the full member list in the skill example --limit on get goes away in #254. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NKsT2pk4Cgn8JG8KsYEWoP --- skills/cellar/SKILL.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/skills/cellar/SKILL.md b/skills/cellar/SKILL.md index fd2d4d7..e0efd38 100644 --- a/skills/cellar/SKILL.md +++ b/skills/cellar/SKILL.md @@ -32,8 +32,7 @@ Query the current project's code and all its dependencies. Cellar auto-detects t - `--test`: query the test-scope classpath (sbt/scala-cli; for Mill, use the test module directly, e.g. `--module foo.test`) - `--no-cache`: skip classpath cache, re-extract from build tool - `--java-home `: override JRE classpath -- `-l`, `--limit `: max results for `list`/`search` (default: 50). On `get` it truncates members with no way - to page; prefer `--hide-inherited` to shrink output +- `-l`, `--limit `: max results for `list`/`search` (default: 50), max members for `get` - `--hide-inherited`: show only members declared on the type itself (`get` commands) - `--group-inherited`: group members by declaring type with section headers (`get` commands) - `-v`, `--verbose` / `--debug`: diagnostics to stderr. Use when a symbol you expect is reported as @@ -96,7 +95,7 @@ cellar search --module lib flatMap ## Example output -`cellar get-external --hide-inherited -l 4 org.typelevel:cats-core_3:2.10.0 cats.Monad` +`cellar get-external --hide-inherited org.typelevel:cats-core_3:2.10.0 cats.Monad` ````markdown ## cats.Monad @@ -115,7 +114,12 @@ def iterateWhile[A](f: F[A])(p: A => Boolean): F[A] def untilM[G[_], A](f: F[A])(cond: => F[Boolean])(implicit G: Alternative[G]): F[G[A]] def ifElseM[A](branches: (F[Boolean], F[A])*)(els: F[A]): F[A] def iterateUntilM[A](init: A)(f: A => F[A])(p: A => Boolean): F[A] -// … 6 more members +def map[A, B](fa: F[A])(f: A => B): F[B] +def whileM_[A](p: F[Boolean])(body: => F[A]): F[Unit] +def whileM[G[_], A](p: F[Boolean])(body: => F[A])(implicit G: Alternative[G]): F[G[A]] +def untilM_[A](f: F[A])(cond: => F[Boolean]): F[Unit] +def iterateUntil[A](f: F[A])(p: A => Boolean): F[A] +def iterateWhileM[A](init: A)(f: A => F[A])(p: A => Boolean): F[A] ``` **Companion members:** ```scala @@ -123,7 +127,10 @@ trait Ops[F[_], A] extends Serializable object ops def apply[F[_]](implicit instance: Monad[F]): Monad[F] trait ToMonadOps extends Serializable -// … 4 more members +object ops +object nonInheritedOps extends ToMonadOps +trait AllOps[F[_], A] extends Ops[F, A] with FlatMap.AllOps[F, A] with Applicative.AllOps[F, A] +object nonInheritedOps ``` ```` From 98a0696b7d5248664f09cebcea63f2e1b6fc5f7f Mon Sep 17 00:00:00 2001 From: rochala Date: Wed, 21 Oct 2026 16:24:13 +0200 Subject: [PATCH 3/4] Keep the skill example verbatim and word Supertypes order for Java too Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NKsT2pk4Cgn8JG8KsYEWoP --- skills/cellar/SKILL.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/skills/cellar/SKILL.md b/skills/cellar/SKILL.md index e0efd38..f049f5d 100644 --- a/skills/cellar/SKILL.md +++ b/skills/cellar/SKILL.md @@ -106,6 +106,8 @@ trait Monad[F[_]] extends FlatMap[F] with Applicative[F] Monad. Allows composition of dependent effectful functions. +See: [[http://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/baastad.pdf Monads for functional programming]] +Must obey the laws defined in cats.laws.MonadLaws. **Origin:** cats.Monad **Members:** @@ -134,7 +136,7 @@ object nonInheritedOps ``` ```` -`**Supertypes:**` lists every ancestor, nearest first: the order Scala searches for a member's implementation. +`**Supertypes:**` lists every ancestor in linearization order, the order member lookup follows. ### Choosing member output From 47162b8acd45a9021432c0da293074b0e20ad057 Mon Sep 17 00:00:00 2001 From: rochala Date: Wed, 21 Oct 2026 16:48:05 +0200 Subject: [PATCH 4/4] Regenerate the skill example now that objects are listed once Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NKsT2pk4Cgn8JG8KsYEWoP --- skills/cellar/SKILL.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/skills/cellar/SKILL.md b/skills/cellar/SKILL.md index c73c733..3c8e8af 100644 --- a/skills/cellar/SKILL.md +++ b/skills/cellar/SKILL.md @@ -129,10 +129,8 @@ trait Ops[F[_], A] extends Serializable object ops def apply[F[_]](implicit instance: Monad[F]): Monad[F] trait ToMonadOps extends Serializable -object ops object nonInheritedOps extends ToMonadOps trait AllOps[F[_], A] extends Ops[F, A] with FlatMap.AllOps[F, A] with Applicative.AllOps[F, A] -object nonInheritedOps ``` ````