Question formatting
This commit is contained in:
@@ -35,10 +35,14 @@ func (m *Manager) askTool(l *live) mcp.Tool {
|
||||
Description: "Ask the human a question through their inbox. Use this for every question; never ask in plain prose. " +
|
||||
"The human answers from their inbox without having read your transcript, so every question must stand on its own: " +
|
||||
"put the background they need in context. " +
|
||||
"Write the choices inline in context as Markdown list items, each with what it would concretely do: " +
|
||||
"Write the choices inline in context as Markdown list items: " +
|
||||
"`- ( ) choice` for pick-one choices (mark the one you recommend `- (*) choice`), or " +
|
||||
"`- [ ] choice` for pick-any choices (mark the ones you recommend `- [x] choice`). " +
|
||||
"The human picks them where they appear; there is no separate list of options. " +
|
||||
"Everything specific to one choice goes inside that choice, never in the text above the list: " +
|
||||
"its first line is a short name, and the lines indented beneath it say what it would concretely do, " +
|
||||
"its example, code, commands and trade-offs, so the human never has to match a paragraph above to an option below. " +
|
||||
"Text above the list covers only what all the choices share. " +
|
||||
"If blocking is true, end your turn after asking; " +
|
||||
"the answer arrives as your next message. If blocking is false, continue with work that doesn't depend on the answer. " +
|
||||
"One call is one decision, answered by picking from its own choices. When you have several decisions, such as a design with several choices, " +
|
||||
@@ -47,7 +51,7 @@ func (m *Manager) askTool(l *live) mcp.Tool {
|
||||
InputSchema: json.RawMessage(`{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"context": {"type": "string", "description": "Everything the human needs to answer well without reading your transcript: what you are working on, what you found, the relevant facts and data, and the choices. Several paragraphs is normal. Markdown is rendered. Each choice is a list item on its own line, at least two, all of one kind: '- ( ) Merge now: ships the fix today' / '- (*) Wait for review: ...' (pick one; exactly one (*) marks your recommendation), or '- [ ] Fix the tests' / '- [x] Update the docs' (pick any; [x] marks the ones you recommend). The choice's text is the whole line after the marker, and it comes back verbatim as the answer. Put long supporting detail (logs, full data, per-option analysis) in collapsed sections the human expands on demand: a line '<details><summary>Title</summary>', the Markdown content, then a line '</details>'."},
|
||||
"context": {"type": "string", "description": "Everything the human needs to answer well without reading your transcript: what you are working on, what you found, the relevant facts and data shared by all the choices, and then the choices. Markdown is rendered. Each choice is a list item, at least two, all of one kind: '- ( ) Merge now' / '- (*) Wait for review' (pick one; exactly one (*) marks your recommendation), or '- [ ] Fix the tests' / '- [x] Update the docs' (pick any; [x] marks the ones you recommend). The choice's first line, after the marker, is a short name that comes back verbatim as the answer. Everything about that one choice goes in lines indented two spaces beneath it, not in a paragraph above the list: what it would concretely do, its worked example, any code block, command or sub-list, and its trade-offs. For example:\n\n- ( ) Retry in the client\n Wraps ` + "`fetch` in `retry(3)`" + `; a 500 shows the spinner up to 6s longer.\n ` + "```" + `ts\n await retry(3, () => api.get(path));\n ` + "```" + `\n- (*) Queue on the server\n The request returns at once; the write lands within 1s.\n\nPut long supporting detail (logs, full data, per-option analysis) in collapsed sections the human expands on demand: a line '<details><summary>Title</summary>', the Markdown content, then a line '</details>'."},
|
||||
"question": {"type": "string", "description": "The question itself, in one or two sentences. Markdown is rendered."},
|
||||
"why_blocked": {"type": "string", "description": "What you can't do until this is answered, and why you can't decide it yourself."},
|
||||
"attachments": {"type": "array", "items": {
|
||||
|
||||
@@ -322,7 +322,7 @@ func (m *Manager) leadTools(l *live) []mcp.Tool {
|
||||
|
||||
tool("show",
|
||||
"Point the human's right pane at a task, or at a project with no task: tabs are the tabs to put first, in order (the rest follow), and tab is the one to select. "+
|
||||
"Tabs: transcript, changes, files, terminal (a shell in the task's worktree), preview (the dev servers the task's agent exposed with expose_port), inbox (the task's open items), reviews (the task's reviews by reviewer agents), project (the project's dashboard: its active tasks and its TODO.md items); with only project_id, only project shows anything. "+
|
||||
"Tabs: transcript, changes, files, terminal (a shell in the task's worktree), inbox (the task's open items), reviews (the task's reviews by reviewer agents), project (the project's dashboard: its active tasks and its TODO.md items); with only project_id, only project shows anything. "+
|
||||
"Omit both task_id and project_id to clear the pane. "+
|
||||
"If the pane already shows that task (or project) on that tab, only the tab order changes and you are told so, even while the human is working in the pane. "+
|
||||
"Otherwise refused while the human is working in the right pane, unless it is on the project tab or what it shows is finished (a merged or discarded task, or an inbox tab with nothing left). "+
|
||||
@@ -330,8 +330,8 @@ func (m *Manager) leadTools(l *live) []mcp.Tool {
|
||||
`{"type": "object", "properties": {
|
||||
"task_id": {"type": "string"},
|
||||
"project_id": {"type": "string", "description": "Ignored when task_id is given."},
|
||||
"tabs": {"type": "array", "items": {"type": "string", "enum": ["transcript", "changes", "files", "terminal", "preview", "inbox", "reviews", "project"]}},
|
||||
"tab": {"type": "string", "enum": ["transcript", "changes", "files", "terminal", "preview", "inbox", "reviews", "project"]}
|
||||
"tabs": {"type": "array", "items": {"type": "string", "enum": ["transcript", "changes", "files", "terminal", "inbox", "reviews", "project"]}},
|
||||
"tab": {"type": "string", "enum": ["transcript", "changes", "files", "terminal", "inbox", "reviews", "project"]}
|
||||
}, "required": ["tabs", "tab"]}`,
|
||||
func(ctx context.Context, user api.User, raw json.RawMessage) (string, error) {
|
||||
f := api.Focus{}
|
||||
|
||||
@@ -32,7 +32,7 @@ type exposePortArgs struct {
|
||||
func (m *Manager) exposePortTool(l *live) mcp.Tool {
|
||||
return mcp.Tool{
|
||||
Name: "expose_port",
|
||||
Description: "Show the human a server you are running, such as a dev server, in the task's Preview tab. " +
|
||||
Description: "Show the human a server you are running, such as a dev server, as a link above the task's tabs that opens it in a new window. " +
|
||||
"Start the server yourself first (in the background), listening on 127.0.0.1 (not 0.0.0.0 or localhost) on a port in this task's block. " +
|
||||
"byre then serves it over HTTPS on the same port of byre's host through tailscale serve, and returns the URL. " +
|
||||
"name labels it in the tab (\"web\", \"storybook\"); exposing a name or port again replaces the earlier one. " +
|
||||
@@ -40,7 +40,7 @@ func (m *Manager) exposePortTool(l *live) mcp.Tool {
|
||||
InputSchema: json.RawMessage(`{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {"type": "string", "description": "Short label, shown in the Preview tab."},
|
||||
"name": {"type": "string", "description": "Short label, shown as the link's text."},
|
||||
"port": {"type": "integer", "description": "The port the server listens on, at 127.0.0.1, within this task's block."}
|
||||
},
|
||||
"required": ["name", "port"]
|
||||
@@ -98,7 +98,7 @@ func (m *Manager) exposePort(ctx context.Context, l *live, raw json.RawMessage)
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Sprintf("Exposed %q: https://<byre's host>:%d/ proxies to %s, and the human sees it in the task's Preview tab.", name, args.Port, addr), nil
|
||||
return fmt.Sprintf("Exposed %q: https://<byre's host>:%d/ proxies to %s, and the human sees a link to it above the task's tabs.", name, args.Port, addr), nil
|
||||
}
|
||||
|
||||
func (m *Manager) Unexpose(ctx context.Context, taskID string) {
|
||||
|
||||
Reference in New Issue
Block a user