You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(affordance): usage guidance for shortcuts and per-command skills
Extend the affordance overlay (per-command --help guidance) beyond
generated service-API methods to +-prefixed shortcuts, and let a command
point at specific related skills.
- shortcuts render the same guidance block as methods, from `## +cmd`
entries in affordance/<domain>.md; the lookup coordinate is unified in
cmdmeta (SetAffordanceRef/AffordanceRef) so both share one path
- PrepareShortcutHelp composes onto the command's captured base, so a
shortcut's PostMount-authored Long (e.g. the docs "read the skill"
directive) is preserved, not clobbered
- a per-command `### Skills` section merges with the domain `> skill:`
default (deduped, domain first); an entry may be a bare skill name or a
name/relpath reference (lark-contact/references/x.md), validated against
the embedded skill tree and dropped when unresolved
- +-prefixed headings resolve verbatim (no space->dot folding)
- guide contact's +search-user / +get-user shortcuts, dropping the
+search-user Go tips now covered by the overlay's examples and lead
Tips precedence: a shortcut's overlay `### Tips` replace its Go Tips field.
Copy file name to clipboardExpand all lines: affordance/contact.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,42 @@
1
1
# contact
2
2
> skill: lark-contact
3
3
4
+
## +search-user
5
+
The primary user lookup for user identity: search by keyword or email, resolve known ids with --user-ids, or get yourself with --user-ids me — it does by-id reads too, so as a user you rarely need `+get-user`. Each match returns an open_id and p2p_chat_id to chain into follow-ups.
// --yes asserts the USER confirmed; the agent must not self-approve.
146
-
iflevel==cmdutil.RiskHighRiskWrite {
147
-
fmt.Fprintf(&b, "\n\nRisk: %s (requires explicit user confirmation to execute; the agent must NOT add --yes on its own — only pass --yes after the user has confirmed)", level)
// --yes asserts the USER confirmed; the agent must not self-approve.
227
+
iflevel==cmdutil.RiskHighRiskWrite {
228
+
fmt.Fprintf(b, "\n\nRisk: %s (requires explicit user confirmation to execute; the agent must NOT add --yes on its own — only pass --yes after the user has confirmed)", level)
229
+
} else {
230
+
fmt.Fprintf(b, "\n\nRisk: %s", level)
231
+
}
232
+
}
233
+
234
+
// writeRelatedSkills appends the "Related skills" block for the entries that
235
+
// exist in skillFS. Nothing is written when skillFS is nil or no entry resolves,
236
+
// so help never prints a `skills read` pointer that cannot be opened.
0 commit comments