refactor: enhance docstrings for clarity and consistency across multiple files
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
"""Board onboarding endpoints for user/agent collaboration."""
|
||||
# ruff: noqa: E501
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -201,16 +200,22 @@ async def start_onboarding(
|
||||
f"Board Name: {board.name}\n"
|
||||
"You are the main agent. Ask the user 6-10 focused questions total:\n"
|
||||
"- 3-6 questions to clarify the board goal.\n"
|
||||
"- 1 question to choose a unique name for the board lead agent (first-name style).\n"
|
||||
"- 2-4 questions to capture the user's preferences for how the board lead should work\n"
|
||||
"- 1 question to choose a unique name for the board lead agent "
|
||||
"(first-name style).\n"
|
||||
"- 2-4 questions to capture the user's preferences for how the board "
|
||||
"lead should work\n"
|
||||
" (communication style, autonomy, update cadence, and output formatting).\n"
|
||||
'- Always include a final question (and only once): "Anything else we should know?"\n'
|
||||
'- Always include a final question (and only once): "Anything else we '
|
||||
'should know?"\n'
|
||||
" (constraints, context, preferences). This MUST be the last question.\n"
|
||||
' Provide an option like "Yes (I\'ll type it)" so they can enter free-text.\n'
|
||||
" Do NOT ask for additional context on earlier questions.\n"
|
||||
" Only include a free-text option on earlier questions if a typed answer is necessary;\n"
|
||||
' when you do, make the option label include "I\'ll type it" (e.g., "Other (I\'ll type it)").\n'
|
||||
'- If the user sends an "Additional context" message later, incorporate it and resend status=complete\n'
|
||||
" Only include a free-text option on earlier questions if a typed "
|
||||
"answer is necessary;\n"
|
||||
' when you do, make the option label include "I\'ll type it" '
|
||||
'(e.g., "Other (I\'ll type it)").\n'
|
||||
'- If the user sends an "Additional context" message later, incorporate '
|
||||
"it and resend status=complete\n"
|
||||
" to update the draft (until the user confirms).\n"
|
||||
"Do NOT respond in OpenClaw chat.\n"
|
||||
"All onboarding responses MUST be sent to Mission Control via API.\n"
|
||||
@@ -222,24 +227,37 @@ async def start_onboarding(
|
||||
f'curl -s -X POST "{base_url}/api/v1/agent/boards/{board.id}/onboarding" '
|
||||
'-H "X-Agent-Token: $AUTH_TOKEN" '
|
||||
'-H "Content-Type: application/json" '
|
||||
'-d \'{"question":"...","options":[{"id":"1","label":"..."},{"id":"2","label":"..."}]}\'\n'
|
||||
'-d \'{"question":"...","options":[{"id":"1","label":"..."},'
|
||||
'{"id":"2","label":"..."}]}\'\n'
|
||||
"COMPLETION example (send JSON body exactly as shown):\n"
|
||||
f'curl -s -X POST "{base_url}/api/v1/agent/boards/{board.id}/onboarding" '
|
||||
'-H "X-Agent-Token: $AUTH_TOKEN" '
|
||||
'-H "Content-Type: application/json" '
|
||||
'-d \'{"status":"complete","board_type":"goal","objective":"...","success_metrics":{"metric":"...","target":"..."},"target_date":"YYYY-MM-DD","user_profile":{"preferred_name":"...","pronouns":"...","timezone":"...","notes":"...","context":"..."},"lead_agent":{"name":"Ava","identity_profile":{"role":"Board Lead","communication_style":"direct, concise, practical","emoji":":gear:"},"autonomy_level":"balanced","verbosity":"concise","output_format":"bullets","update_cadence":"daily","custom_instructions":"..."}}\'\n'
|
||||
'-d \'{"status":"complete","board_type":"goal","objective":"...",'
|
||||
'"success_metrics":{"metric":"...","target":"..."},'
|
||||
'"target_date":"YYYY-MM-DD",'
|
||||
'"user_profile":{"preferred_name":"...","pronouns":"...",'
|
||||
'"timezone":"...","notes":"...","context":"..."},'
|
||||
'"lead_agent":{"name":"Ava","identity_profile":{"role":"Board Lead",'
|
||||
'"communication_style":"direct, concise, practical","emoji":":gear:"},'
|
||||
'"autonomy_level":"balanced","verbosity":"concise",'
|
||||
'"output_format":"bullets","update_cadence":"daily",'
|
||||
'"custom_instructions":"..."}}\'\n'
|
||||
"ENUMS:\n"
|
||||
"- board_type: goal | general\n"
|
||||
"- lead_agent.autonomy_level: ask_first | balanced | autonomous\n"
|
||||
"- lead_agent.verbosity: concise | balanced | detailed\n"
|
||||
"- lead_agent.output_format: bullets | mixed | narrative\n"
|
||||
"- lead_agent.update_cadence: asap | hourly | daily | weekly\n"
|
||||
"QUESTION FORMAT (one question per response, no arrays, no markdown, no extra text):\n"
|
||||
"QUESTION FORMAT (one question per response, no arrays, no markdown, "
|
||||
"no extra text):\n"
|
||||
'{"question":"...","options":[{"id":"1","label":"..."},{"id":"2","label":"..."}]}\n'
|
||||
"Do NOT wrap questions in a list. Do NOT add commentary.\n"
|
||||
"When you have enough info, send one final response with status=complete.\n"
|
||||
"The completion payload must include board_type. If board_type=goal, include objective + success_metrics.\n"
|
||||
"Also include user_profile + lead_agent to configure the board lead's working style.\n"
|
||||
"The completion payload must include board_type. If board_type=goal, "
|
||||
"include objective + success_metrics.\n"
|
||||
"Also include user_profile + lead_agent to configure the board lead's "
|
||||
"working style.\n"
|
||||
)
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user