affordance

package
v1.0.61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 8 Imported by: 0

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

func SetSource(fsys fs.FS)

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL