Documentation
¶
Overview ¶
Package affordance is the lazily-loaded store of usage guidance for service-API methods. The source of truth is one markdown file per service in the top-level affordance/ tree (see mdparse.go), injected via SetSource so domain owners maintain it next to skills/ and shortcuts/. A service is read and parsed at most once, on first access, so normal command execution never touches it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func For ¶
func For(service, methodID string) (json.RawMessage, bool)
For returns the raw affordance overlay for one method, loading the owning service on first access. ok is false when there is no entry (absent source, parse failure, or unknown method all collapse to "no guidance").
func SetSource ¶
SetSource installs the markdown guidance tree (the top-level affordance/ directory) as the source. Called once at startup before any lookup; clears the parse cache so re-sourcing (e.g. in tests) takes effect.
func SkillStatPath ¶ added in v1.0.67
SkillStatPath maps a `### Skills` entry to the path (relative to the skill tree) whose existence gates it: a bare skill name resolves to its SKILL.md, while an entry containing a slash is a name/relative-path reference (e.g. "lark-contact/references/lark-contact-search-user.md") and resolves to that path directly. Both render as `lark-cli skills read <entry>` — the slash form skills read already accepts — so a per-command entry can point at that command's own reference file, not just re-point the domain skill.
Types ¶
This section is empty.