Yichus / Reference / API MCP tools

api_organize

Render one organization lens over the module as the text the CLI's `organize` prints: page (how organized the program is, at a glance: layers, blocks, holes), vocabulary (the declared concepts, their operations by role, embedded concepts, unreferenced concepts, and bare-scalar parameters), stack (the blocks by layer in the order a reader learns them, with reuse), conventions (how the project writes each recurring shape and where it disagrees with itself), aid (the separate heuristic reading for a weaker reader; clearly labeled as such), map (the definitions by layer with compiled size, reuse, direct dependencies, duplicated mass, and layer-skipping branches), abstractions (higher-order generators and parameter slots, curried partial applications, call-site instantiations with semantic policy objects or passed functions, the security/effect responsibility split across routes, and declared Yichus/Organize::AbstractionSpec claims with GuardResponsibility InGenerator, ByPolicyObject(concept), InPassedFunction, EnvelopeOnly, or NoGuardClaim checked deterministically against the IR; when you extract a rule that several definitions now call, declare it with AbstractionSpec(name, generator, NoGuardClaim, [members]) so the check can confirm every member reaches it on every path; `abstractions` in the result holds generators, specializations, instantiations, routeShapes, and declaredAbstractions), flow (the effect sequences in causal order under declared backing systems and expectations), layers (the packages in rows by level, the packages each one uses with how many of their definitions, and the direct effect sites and tables in each package's own definitions; `layers` in the result holds the packages with their definitions and levels, and the package and definition edges, all from type-checked references), structure (pictures drawn from where values go and from the checked types: records of functions and the values that fill them, whether each call through a record or a handed-in function gets it from a parameter or reaches for it by name, values built step by step, packages as phases by the types they make and take, and what each caller does with a shared definition's result: returns it as is on every path or on some paths, works on it further, only branches on it, runs it for its effect and keeps no value, or drops it; a record or effect handle is handed in on every path, reached for or built here on every path, or handed in on some paths only or not traced; when requirements is passed, `scenarios` in the result holds one decision tree per entry, computed by following values from the handler into the definitions it calls: nodes are branch points whose test comes from the request, the caller, a handle read or a call result, with the declared authority and roles first, arms carry their pattern, leaves carry the outcome and every effect on the path, and arms that change neither are folded), effects (each declared route as a tree, in source order, of every effect its handler can reach: the calls to it, the IO values handed to a definition as an argument, the typed branch tests around it, and transaction scopes; `effects` in the result holds one row per effect use with its route, table, site, the chain of definitions with the frames around each position, passedTo and under) or writes (the same with only row writes). The effects lens states structure; it does not judge whether a write should sit under a wrapper or a guard. With a view argument over stack, map, or conventions, an authored view (order, foreground, declared groups, captions) renders under the unchanged page or is refused with the reason. The implementations lens returns a structured comparison: all typed user references, signatures, direct primitive effects, access findings, and located compiled repetition. Its nested groups and role meanings are authored, never inferred architecture or permission proof. The composition lens returns source-composition-1 under composition plus a text diagram. It joins checked source occurrences, escrow declaration roles and operation targets, verified flow matches and named parts, and static effect-use contexts. All supplied user definitions remain visible, including disconnected declarations; unresolved evidence and scope are explicit. Source references, declared targets and matched bodies have different meanings. It accepts optional exact qualified focus for effect expansion, and takes no authored view. For a large program, pass read to obtain a bounded source-composition-read-1 page: package inventory, package definitions, a definitions search, resolved direct user-binding relationships, then an exact occurrence witness. Definitions search requires nonempty where with exact package, opaque checked signatureId, exported, usedOutside, and/or referencesBinding filters; all predicates combine with AND and results sort by qualified ID. Missing identities fail; direct references do not establish execution. Each page reports snapshot, scope and continuation; binding reads include incoming and outgoing counts. Effects and unresolved evidence require a separate complete composition request. The existing complete composition response and exact focus remain available when read is omitted. The page lists; the reader judges.

Kind: Organize. Family orientation: MCP servers list it once api_tools opens that family. Origin: Yichus/Mcp::catalog.

CLI: yichus organize — the same renderers, reached differently and not one-for-one: the tool's lens argument is page, stack, conventions, aid, layers, structure, effects, writes or implementations, and its view is a parameter; the CLI's subcommands are page, vocabulary, stack, conventions, aid, layers, structure, effects, writes, map, flow, view and diff. map is ToolKind.AbstractionMap; implementations has no subcommand; the tool's effects and writes also return the tree's rows, and layers its facts; vocabulary, flow and diff no tool.

Parameters

Read the result according to this tool’s scope: static checks, bounded execution checks, and descriptive diagrams answer different questions. A successful call is not a general approval of the program. The safety and permissions guide compares the checks and provides editable ownership, guard, and role examples.