-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(affordance): per-command usage guidance as per-domain markdown #1565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Affordance | ||
|
|
||
| Per-command usage guidance for the CLI, authored as one markdown file per domain | ||
| (`<service>.md`). It is surfaced in `lark-cli <command> --help` and in the | ||
| `schema` output, and read directly at runtime (lazy, cached) — there is no build | ||
| step. Maintain these files alongside `skills/` and `shortcuts/`. | ||
|
|
||
| ## Format | ||
|
|
||
| A small, fixed markdown subset; each file describes one domain: | ||
|
|
||
| # <domain> optional `> skill: <name>` applies to every command below | ||
| ## <command> the command as typed, minus `lark-cli <domain>` | ||
| <lead paragraph> when to use this command | ||
| ### Avoid when when not to use it / which command to use instead | ||
| ### Prerequisites what you must have first (e.g. an id, and where it comes from) | ||
| ### Tips gotchas and constraints | ||
| ### Examples **description** lines, each followed by a fenced command | ||
| ### <other heading> a custom section; flows through verbatim | ||
|
|
||
| Reference another command with `[[command]]` — it renders as `command` in help. | ||
| Under `Avoid when` it means "use that one instead"; under `Prerequisites` | ||
| ("… from [[command]]") it means "get the input there first". | ||
|
|
||
| ## Example | ||
|
|
||
| ## messages get | ||
| Fetch the full content of a single message by id. | ||
|
|
||
| ### Avoid when | ||
| - Reading several at once → use [[messages batch_get]] | ||
|
|
||
| ### Prerequisites | ||
| - message_id from [[messages list]] | ||
|
|
||
| ### Examples | ||
|
|
||
| **Fetch one message** | ||
| ```bash | ||
| lark-cli mail user_mailbox.messages get --message-id "<id>" | ||
| ``` | ||
|
|
||
| ## Notes | ||
|
|
||
| - Write plain prose; the only convention is wrapping command references in `[[ ]]`. | ||
| - Keep it concise and high-signal — don't restate field/flag names, id types, or | ||
| anything the schema and flags already show; the agent infers the rest. | ||
| - Command-form headings resolve to method ids via the registry, so plural resource | ||
| names (`messages`) map to the singular method id (`message`) automatically. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # contact | ||
| > skill: lark-contact | ||
|
|
||
| ## user_profiles batch_query | ||
| Bulk-fetch personal status and signature for user ids you already have. | ||
|
|
||
| ### Avoid when | ||
| - Need more than status/signature (name, dept, email), or don't have the open_id yet → use [[+search-user]] | ||
|
|
||
| ### Tips | ||
| - Off by default — set include_personal_status / include_description to true under query_option | ||
| - ids in user_ids must match --user-id-type (default open_id) | ||
|
|
||
| ### Examples | ||
|
|
||
| **Bulk-query status and signature** | ||
| ```bash | ||
| lark-cli contact user_profiles batch_query --data '{"user_ids":["ou_3a8b****6a7b"],"query_option":{"include_personal_status":true,"include_description":true}}' | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.