The library documents itself · Metaprogramming & code rules
stzSelfDoc
16 own methods · 0 forms written with extensions, listed under their method
the source: base/meta/stzSelfDoc.ring(opens in a new tab) · All classes · The area reference: Metaprogramming & code rules
Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean
Examples: 2 come from the library's tests; 4 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzSelfDoc("stzListOfStrings"). 10 methods have none yet. Examples run on 2026-10-03 12:54 inside the library at commit 0e72e2e2c.
Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
ClassName
introspectionno extension
composed example
o1 = new stzSelfDoc("stzListOfStrings")
? o1.ClassName()
#--> stzListOfStringscomposed from the signature, run for this pageSource
introspectionno extension
composed example
o1 = new stzSelfDoc("stzListOfStrings")
? o1.Source()
#--> D:/GitHub/_wts/libraries/stzlib/base/string/stzStringList.ringcomposed from the signature, run for this pageNumberOfMethods
introspectionno extension
composed example
o1 = new stzSelfDoc("stzListOfStrings")
? o1.NumberOfMethods()
#--> 171composed from the signature, run for this pageMethodNames
introspectionno extension
introspection 1 examples run
oDoc = StzSelfDocQ("stzList")
? oDoc.HowTo("remove duplicates")
? oDoc.HasMethod("DuplicatesRemoved")
#--> Q([...]).RemoveDuplicates() -- composed by grammar (remove duplicates)
#--> 1library testno extensionDescriptionOf
introspectionno extension
DefiningClassOf
The class that actually DEFINES pcName (this class or an ancestor it inherits from). "" if the method is unknown.no extension
NumberOfInheritedMethods
How many of the harvested methods are inherited (defined by an ancestor).no extension
composed example
o1 = new stzSelfDoc("stzListOfStrings")
? o1.NumberOfInheritedMethods()
#--> 171composed from the signature, run for this pageExplainMethod
ExplainMethod(name) -- a plain-language explanation of one method (DATA, a string): its name + doc-comment (or a name-derived phrase if undocumented).no extension
Show
explain (deterministic, templated -- no model)no extension
Ask
Ask(question) -- the methods whose MEANING best matches a plain-English question, as [ [name, score, description], ... ] best first (DATA). Uses the loaded embedding model (2c) when present, else lexical similarity -- so it works with zero setup and sharpens with a model. The natural- programming entry: describe what you want, get the operation.no extension
AskFor
ask (semantic -- embeddings/reranker or lexical)no extension
BestMethodFor
The single best-matching method name for a question (DATA, a string).no extension
HowTo(intent) -- resolve a plain-English intent to a runnable method call on this class, DETERMINISTICALLY (no LLM). Two engines, unified: (1) the GRAMMAR composes a method name from the intent and grounds it against this class's real API; if the class implements it, that is the answer (highest confidence, it is derived not guessed). (2) Otherwise fall back to semantic RETRIEVAL (the ranker: reranker/embeddings/lexical). Returns a human line: the call template + how it was resolved + the name's grammatical gloss. 1 examples run
oDoc = StzSelfDocQ("stzList")
? oDoc.HowTo("remove duplicates")
? oDoc.HasMethod("DuplicatesRemoved")
#--> Q([...]).RemoveDuplicates() -- composed by grammar (remove duplicates)
#--> 1library testno extensionMethodForIntent
The resolved method NAME only (DATA), grammar-first then retrieval.no extension

