mirror of
https://github.com/shareAI-lab/analysis_claude_code.git
synced 2026-09-22 05:13:48 +08:00
feat: consolidate course into 21 lessons
This commit is contained in:
@@ -1,51 +1,60 @@
|
||||
{
|
||||
"version": "s15",
|
||||
"title": "Agent Teams: Runtime Lab",
|
||||
"description": "The first Agent Teams lab builds persistent teammate loops and file-backed mailboxes.",
|
||||
"title": "Agent Teams",
|
||||
"description": "The Lead proposes a team for a normal user request, waits for confirmation, then coordinates persistent teammates through runtime-delivered events.",
|
||||
"steps": [
|
||||
{
|
||||
"type": "user_message",
|
||||
"content": "Split this task: one agent checks tests, another reviews docs.",
|
||||
"annotation": "The request needs parallel work with separate responsibilities."
|
||||
"content": "Refactor the configuration loader and authentication flow, then update the tests.",
|
||||
"annotation": "The user describes the goal without designing a team."
|
||||
},
|
||||
{
|
||||
"type": "assistant_text",
|
||||
"content": "I'll spawn teammates with narrow roles and coordinate their updates through the message bus.",
|
||||
"annotation": "The lead keeps orchestration authority while delegating execution."
|
||||
"content": "These areas can be handled in parallel. I propose one teammate for configuration and authentication, and another for tests. Shall I start that team?",
|
||||
"annotation": "The Lead chooses a small team and makes the extra-agent decision visible."
|
||||
},
|
||||
{
|
||||
"type": "user_message",
|
||||
"content": "Yes, go ahead.",
|
||||
"annotation": "Teammates start only after explicit confirmation."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "spawn_teammate",
|
||||
"content": "{\"name\":\"test-runner\",\"role\":\"Run test commands and report failures.\"}",
|
||||
"annotation": "A teammate thread starts with its own simplified loop."
|
||||
"content": "{\"name\":\"backend\",\"role\":\"backend engineer\",\"prompt\":\"Refactor configuration and authentication while preserving interfaces.\"}",
|
||||
"annotation": "The first persistent teammate enters WORK with a focused assignment."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "send_message",
|
||||
"content": "{\"to\":\"test-runner\",\"message\":\"Run the focused test suite and summarize failures.\"}",
|
||||
"annotation": "The lead sends work through the file-backed mailbox."
|
||||
"toolName": "spawn_teammate",
|
||||
"content": "{\"name\":\"tests\",\"role\":\"test engineer\",\"prompt\":\"Update and run tests for the refactor.\"}",
|
||||
"annotation": "The second teammate gets an independent slice."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": ".mailboxes/test-runner.jsonl <- {from:\"lead\", message:\"Run the focused test suite\"}",
|
||||
"annotation": "MessageBus persists the handoff as JSONL."
|
||||
"content": "backend -> Lead: result(refactor complete) -> idle_notification",
|
||||
"annotation": "Result and idle state are separate events; the teammate remains available."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": ".mailboxes/lead.jsonl <- {from:\"test-runner\", message:\"Tests passed.\"}",
|
||||
"annotation": "The teammate replies without sharing the lead's whole conversation."
|
||||
"content": "tests -> Lead: result(test suite passed) -> idle_notification",
|
||||
"annotation": "The runtime observes mailbox writes and wakes the Lead without a polling tool."
|
||||
},
|
||||
{
|
||||
"type": "assistant_text",
|
||||
"content": "Both parts are complete. The interfaces were preserved and the updated tests pass.",
|
||||
"annotation": "The Lead combines teammate results into one user-facing answer."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "check_inbox",
|
||||
"content": "{\"agent\":\"lead\"}",
|
||||
"annotation": "The lead polls its own inbox for teammate updates."
|
||||
"toolName": "request_shutdown",
|
||||
"content": "{\"teammate\":\"backend\"}",
|
||||
"annotation": "A typed request with a request id closes the persistent teammate cleanly."
|
||||
},
|
||||
{
|
||||
"type": "tool_result",
|
||||
"toolName": "check_inbox",
|
||||
"content": "test-runner: Tests passed.",
|
||||
"annotation": "Mailbox messages re-enter the lead loop as tool results."
|
||||
"type": "system_event",
|
||||
"content": "shutdown_response(request_id=req_42, approve=true)",
|
||||
"annotation": "The matching response resolves the pending protocol request."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,45 +1,50 @@
|
||||
{
|
||||
"version": "s16",
|
||||
"title": "Agent Teams: Protocol Lab",
|
||||
"description": "The second Agent Teams lab adds typed requests, request ids, and response matching to the s15 runtime.",
|
||||
"title": "Autonomous Agents",
|
||||
"description": "Idle teammates discover ready tasks on a shared board and use an atomic claim before starting work.",
|
||||
"steps": [
|
||||
{
|
||||
"type": "user_message",
|
||||
"content": "Ask the reviewer agent for a plan before it edits anything.",
|
||||
"annotation": "The lead needs a structured plan request, not free-form chat."
|
||||
"content": "Update the API examples, then add tests that use the final examples.",
|
||||
"annotation": "The request contains two tasks with a clear dependency."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "request_plan",
|
||||
"content": "{\"to\":\"reviewer\",\"task\":\"Review the parser change before editing.\"}",
|
||||
"annotation": "The protocol records a pending request with a request_id."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "pending_requests[req_18] = {kind:\"plan\", to:\"reviewer\", status:\"pending\"}",
|
||||
"annotation": "ProtocolState keeps the request open until a matching response arrives."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "dispatch_message -> reviewer inbox: {type:\"plan_request\", request_id:\"req_18\"}",
|
||||
"annotation": "The message is typed so the teammate knows how to handle it."
|
||||
"toolName": "create_task",
|
||||
"content": "{\"subject\":\"Update API examples\"}",
|
||||
"annotation": "The Lead creates the first task in the shared graph."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "submit_plan",
|
||||
"content": "{\"request_id\":\"req_18\",\"plan\":[\"inspect parser\",\"run fixtures\",\"report risks\"]}",
|
||||
"annotation": "The teammate responds with the same request_id."
|
||||
"toolName": "create_task",
|
||||
"content": "{\"subject\":\"Add example tests\",\"blockedBy\":[\"task_examples\"]}",
|
||||
"annotation": "The second task cannot start until the examples are complete."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "match_response(req_18) -> status: ready_for_review",
|
||||
"annotation": "The lead can correlate the reply with the exact request."
|
||||
"content": "alice, bob: state=IDLE -> scan_unclaimed_tasks()",
|
||||
"annotation": "Existing IDLE teammates scan the board after waiting for messages."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "claim_next_task(alice) -> task_examples; task_lock commits owner=alice",
|
||||
"annotation": "The ownership check and pending-to-in_progress update are atomic."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "claim_next_task(bob) -> no ready task; remain IDLE",
|
||||
"annotation": "The test task is still blocked, so Bob does not start it early."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "review_plan",
|
||||
"content": "{\"request_id\":\"req_18\",\"approved\":true}",
|
||||
"annotation": "The lead explicitly approves the plan before work proceeds."
|
||||
"toolName": "complete_task",
|
||||
"content": "{\"task_id\":\"task_examples\"}",
|
||||
"annotation": "Completing the examples unblocks the dependent test task."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "claim_next_task(bob) -> task_tests; task_lock commits owner=bob",
|
||||
"annotation": "Bob claims the newly ready work without another direct assignment."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,46 +1,45 @@
|
||||
{
|
||||
"version": "s17",
|
||||
"title": "Autonomous Agents",
|
||||
"description": "Idle teammates can scan the task board, claim eligible work, and return to idle after completion.",
|
||||
"title": "Worktree Isolation",
|
||||
"description": "A task can be bound to an isolated git worktree so concurrent agents avoid stepping on each other.",
|
||||
"steps": [
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "teammate(worker-a): state=IDLE -> idle_poll()",
|
||||
"annotation": "Autonomy starts from an idle lifecycle tick, not a direct user command."
|
||||
"type": "user_message",
|
||||
"content": "Update the docs and parser in parallel without letting the changes interfere.",
|
||||
"annotation": "Concurrent edits need isolated working directories."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "list_tasks",
|
||||
"content": "{\"status\":\"open\"}",
|
||||
"annotation": "The idle agent scans the shared task board."
|
||||
"toolName": "create_worktree",
|
||||
"content": "{\"task_id\":\"task_docs\",\"name\":\"docs-fix\"}",
|
||||
"annotation": "The tool validates a safe worktree name before touching git."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "git worktree add .worktrees/docs-fix -b agent/docs-fix",
|
||||
"annotation": "A separate branch and checkout are created for that task."
|
||||
},
|
||||
{
|
||||
"type": "tool_result",
|
||||
"toolName": "list_tasks",
|
||||
"content": "[{\"id\":\"task_5\",\"status\":\"open\",\"owner\":null,\"title\":\"Update README\"}]",
|
||||
"annotation": "Only unclaimed work is eligible for autonomous pickup."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "claim_task",
|
||||
"content": "{\"id\":\"task_5\",\"owner\":\"worker-a\"}",
|
||||
"annotation": "The task manager enforces ownership before work begins."
|
||||
"toolName": "create_worktree",
|
||||
"content": "task_docs bound to .worktrees/docs-fix",
|
||||
"annotation": "The task record stores the assigned worktree path."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "worker-a: state=WORK task=task_5",
|
||||
"annotation": "The lifecycle moves from IDLE to WORK."
|
||||
"content": ".worktrees/events.jsonl <- {event:\"created\", task:\"task_docs\", worktree:\"docs-fix\"}",
|
||||
"annotation": "Lifecycle events are emitted as a side channel."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "complete_task",
|
||||
"content": "{\"id\":\"task_5\",\"result\":\"README updated with setup notes.\"}",
|
||||
"annotation": "Completion writes the result back to the shared board."
|
||||
"toolName": "keep_worktree",
|
||||
"content": "{\"task_id\":\"task_docs\",\"reason\":\"needs human review\"}",
|
||||
"annotation": "Closeout can preserve a worktree instead of deleting it immediately."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "worker-a: state=IDLE next_poll_in=5s",
|
||||
"annotation": "After finishing, the agent becomes available for more work."
|
||||
"type": "assistant_text",
|
||||
"content": "The docs task now has an isolated worktree and can be reviewed independently from parser changes.",
|
||||
"annotation": "The user sees the isolation boundary, not just a raw git command."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,45 +1,46 @@
|
||||
{
|
||||
"version": "s18",
|
||||
"title": "Worktree Isolation",
|
||||
"description": "A task can be bound to an isolated git worktree so concurrent agents avoid stepping on each other.",
|
||||
"title": "MCP Tools",
|
||||
"description": "The agent discovers external MCP tools and exposes them through a normalized tool namespace.",
|
||||
"steps": [
|
||||
{
|
||||
"type": "user_message",
|
||||
"content": "Let one teammate fix the docs while another changes the parser.",
|
||||
"annotation": "Concurrent edits need isolated working directories."
|
||||
"content": "Search the documentation for deployment guidance.",
|
||||
"annotation": "The user asks for a tool source outside the built-in set."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "create_worktree",
|
||||
"content": "{\"task_id\":\"task_docs\",\"name\":\"docs-fix\"}",
|
||||
"annotation": "The tool validates a safe worktree name before touching git."
|
||||
"toolName": "connect_mcp",
|
||||
"content": "{\"server\":\"docs\",\"command\":\"mock-docs-server\"}",
|
||||
"annotation": "The runtime creates an MCP client for the named server."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "git worktree add .worktrees/docs-fix -b agent/docs-fix",
|
||||
"annotation": "A separate branch and checkout are created for that task."
|
||||
"content": "normalize_mcp_name(\"docs\", \"search\") -> mcp__docs__search",
|
||||
"annotation": "External tools are namespaced to avoid collisions."
|
||||
},
|
||||
{
|
||||
"type": "tool_result",
|
||||
"toolName": "create_worktree",
|
||||
"content": "task_docs bound to .worktrees/docs-fix",
|
||||
"annotation": "The task record stores the assigned worktree path."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": ".worktrees/events.jsonl <- {event:\"created\", task:\"task_docs\", worktree:\"docs-fix\"}",
|
||||
"annotation": "Lifecycle events are emitted as a side channel."
|
||||
"toolName": "connect_mcp",
|
||||
"content": "Connected docs with tools: mcp__docs__search, mcp__docs__read",
|
||||
"annotation": "Tool discovery expands the active tool pool."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "keep_worktree",
|
||||
"content": "{\"task_id\":\"task_docs\",\"reason\":\"needs human review\"}",
|
||||
"annotation": "Closeout can preserve a worktree instead of deleting it immediately."
|
||||
"toolName": "mcp__docs__search",
|
||||
"content": "{\"query\":\"deployment\"}",
|
||||
"annotation": "The LLM can now call the discovered tool by its normalized name."
|
||||
},
|
||||
{
|
||||
"type": "tool_result",
|
||||
"toolName": "mcp__docs__search",
|
||||
"content": "[\"Deploy with npm run build\", \"Use environment variables for tokens\"]",
|
||||
"annotation": "The external result is appended like any other tool result."
|
||||
},
|
||||
{
|
||||
"type": "assistant_text",
|
||||
"content": "The docs task now has an isolated worktree and can be reviewed independently from parser changes.",
|
||||
"annotation": "The user sees the isolation boundary, not just a raw git command."
|
||||
"content": "The docs server says to build first and keep tokens in environment variables.",
|
||||
"annotation": "The agent summarizes external tool output for the user."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,46 +1,57 @@
|
||||
{
|
||||
"version": "s19",
|
||||
"title": "MCP Tools",
|
||||
"description": "The agent discovers external MCP tools and exposes them through a normalized tool namespace.",
|
||||
"title": "Comprehensive Agent",
|
||||
"description": "The final agent composes context assembly, tools, memory, teams, background work, cron, worktrees, and MCP.",
|
||||
"steps": [
|
||||
{
|
||||
"type": "user_message",
|
||||
"content": "Connect the docs server and search for deployment guidance.",
|
||||
"annotation": "The user asks for a tool source outside the built-in set."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "connect_mcp",
|
||||
"content": "{\"server\":\"docs\",\"command\":\"mock-docs-server\"}",
|
||||
"annotation": "The runtime creates an MCP client for the named server."
|
||||
"content": "Prepare this project for release. Check the code, update the docs, and report deployment readiness.",
|
||||
"annotation": "One ordinary request needs several earlier capabilities to work together."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "normalize_mcp_name(\"docs\", \"search\") -> mcp__docs__search",
|
||||
"annotation": "External tools are namespaced to avoid collisions."
|
||||
},
|
||||
{
|
||||
"type": "tool_result",
|
||||
"toolName": "connect_mcp",
|
||||
"content": "Connected docs with tools: mcp__docs__search, mcp__docs__read",
|
||||
"annotation": "Tool discovery expands the active tool pool."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "mcp__docs__search",
|
||||
"content": "{\"query\":\"deployment\"}",
|
||||
"annotation": "The LLM can now call the discovered tool by its normalized name."
|
||||
},
|
||||
{
|
||||
"type": "tool_result",
|
||||
"toolName": "mcp__docs__search",
|
||||
"content": "[\"Deploy with npm run build\", \"Use environment variables for tokens\"]",
|
||||
"annotation": "The external result is appended like any other tool result."
|
||||
"content": "assemble_prompt: memory + task graph + skills + available tools + policy",
|
||||
"annotation": "The runtime builds the prompt from layered sources of context."
|
||||
},
|
||||
{
|
||||
"type": "assistant_text",
|
||||
"content": "The docs server says to build first and keep tokens in environment variables.",
|
||||
"annotation": "The agent summarizes external tool output for the user."
|
||||
"content": "I'll inspect the task graph, delegate docs, start the slow scan in the background, and use the release checklist skill.",
|
||||
"annotation": "The model chooses multiple mechanisms while keeping one coherent plan."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "load_skill",
|
||||
"content": "{\"name\":\"release-check\"}",
|
||||
"annotation": "Skills contribute procedural context before execution."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "spawn_teammate",
|
||||
"content": "{\"name\":\"docs\",\"role\":\"Update release notes in its worktree.\"}",
|
||||
"annotation": "Team delegation handles a parallel slice of the release."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "bash",
|
||||
"content": "npm run lint && npm run test",
|
||||
"toolInput": "{\"background\":true}",
|
||||
"annotation": "Long-running validation goes through the background task path."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "connect_mcp",
|
||||
"content": "{\"server\":\"deploy\",\"command\":\"mock-deploy-server\"}",
|
||||
"annotation": "External capabilities are added only when needed."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "recover: background task done, teammate replied, MCP deploy status ready",
|
||||
"annotation": "The integrated runtime folds asynchronous results back into the loop."
|
||||
},
|
||||
{
|
||||
"type": "assistant_text",
|
||||
"content": "Release preparation is ready: checks passed, docs are updated in the teammate worktree, and deployment status is available.",
|
||||
"annotation": "The comprehensive agent returns a single user-facing outcome."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,57 +1,43 @@
|
||||
{
|
||||
"version": "s20",
|
||||
"title": "Comprehensive Agent",
|
||||
"description": "The final agent composes context assembly, tools, memory, teams, background work, cron, worktrees, and MCP.",
|
||||
"title": "Workflow Runtime",
|
||||
"description": "A fixed review pipeline runs in parallel, records a journal, and resumes completed agent calls from cache.",
|
||||
"steps": [
|
||||
{
|
||||
"type": "user_message",
|
||||
"content": "Plan a release: inspect tasks, run checks, delegate docs, and keep long scans in the background.",
|
||||
"annotation": "The final lesson combines many earlier capabilities in one request."
|
||||
"content": "Review this change across correctness, security, performance, and style.",
|
||||
"annotation": "The goal is open-ended, but the review procedure has a fixed shape."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "Workflow",
|
||||
"content": "{\"name\":\"review-changes\",\"phases\":[\"Review\",\"Verify\"]}",
|
||||
"annotation": "One tool call hands deterministic orchestration to the workflow runtime."
|
||||
},
|
||||
{
|
||||
"type": "tool_result",
|
||||
"content": "{\"status\":\"async_launched\",\"runId\":\"wf_review-changes_6779\"}",
|
||||
"annotation": "The product runtime returns a claim ticket while work continues in the background."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "assemble_prompt: memory + task graph + skills + available tools + policy",
|
||||
"annotation": "The runtime builds the prompt from layered sources of context."
|
||||
},
|
||||
{
|
||||
"type": "assistant_text",
|
||||
"content": "I'll inspect the task graph, delegate docs, start the slow scan in the background, and use the release checklist skill.",
|
||||
"annotation": "The model chooses multiple mechanisms while keeping one coherent plan."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "load_skill",
|
||||
"content": "{\"name\":\"release-check\"}",
|
||||
"annotation": "Skills contribute procedural context before execution."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "spawn_teammate",
|
||||
"content": "{\"name\":\"docs\",\"role\":\"Update release notes in its worktree.\"}",
|
||||
"annotation": "Team delegation handles a parallel slice of the release."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "bash",
|
||||
"content": "npm run lint && npm run test",
|
||||
"toolInput": "{\"background\":true}",
|
||||
"annotation": "Long-running validation goes through the background task path."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "connect_mcp",
|
||||
"content": "{\"server\":\"deploy\",\"command\":\"mock-deploy-server\"}",
|
||||
"annotation": "External capabilities are added only when needed."
|
||||
"content": "phase=Review -> pipeline([correctness, security, performance, style])",
|
||||
"annotation": "Each item advances independently through the scripted stages."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "recover: background task done, teammate replied, MCP deploy status ready",
|
||||
"annotation": "The integrated runtime folds asynchronous results back into the loop."
|
||||
"content": "phase=Verify -> adversarial checks run in parallel",
|
||||
"annotation": "Structured results cross a validation boundary before aggregation."
|
||||
},
|
||||
{
|
||||
"type": "assistant_text",
|
||||
"content": "Release preparation is ready: checks passed, docs are updated in the teammate worktree, and deployment status is available.",
|
||||
"annotation": "The comprehensive agent returns a single user-facing outcome."
|
||||
"type": "system_event",
|
||||
"content": "journal append -> task_notification(status=completed)",
|
||||
"annotation": "Every completed agent call is checkpointed before the final notification."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "resumeFromRunId -> unchanged calls status=cached",
|
||||
"annotation": "Semantic keys reuse completed work without depending on concurrency order."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,43 +1,37 @@
|
||||
{
|
||||
"version": "s21",
|
||||
"title": "Workflow Runtime",
|
||||
"description": "A fixed review pipeline runs in parallel, records a journal, and resumes completed agent calls from cache.",
|
||||
"title": "Goal Loop",
|
||||
"description": "A host-owned completion gate keeps the turn alive until trusted evidence satisfies the active goal.",
|
||||
"steps": [
|
||||
{
|
||||
"type": "user_message",
|
||||
"content": "Review this change across correctness, security, performance, and style.",
|
||||
"annotation": "The goal is open-ended, but the review procedure has a fixed shape."
|
||||
"content": "/goal until tests passed and deploy green",
|
||||
"annotation": "The command defines the condition but sits outside the evidence window."
|
||||
},
|
||||
{
|
||||
"type": "tool_call",
|
||||
"toolName": "Workflow",
|
||||
"content": "{\"name\":\"review-changes\",\"phases\":[\"Review\",\"Verify\"]}",
|
||||
"annotation": "One tool call hands deterministic orchestration to the workflow runtime."
|
||||
"type": "system_event",
|
||||
"content": "goal_started -> evidence window reset",
|
||||
"annotation": "The harness, not the working model, owns the completion gate."
|
||||
},
|
||||
{
|
||||
"type": "assistant_text",
|
||||
"content": "Tests passed and deployment is green.",
|
||||
"annotation": "Assistant prose is not trusted completion evidence."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "goal_evaluated satisfied=false -> continuation queued",
|
||||
"annotation": "An unmet condition pushes the loop into another bounded turn."
|
||||
},
|
||||
{
|
||||
"type": "tool_result",
|
||||
"content": "{\"status\":\"async_launched\",\"runId\":\"wf_review-changes_6779\"}",
|
||||
"annotation": "The product runtime returns a claim ticket while work continues in the background."
|
||||
"content": "<task_notification>tests passed; deploy green</task_notification>",
|
||||
"annotation": "Only an allowlisted host event can attach a trusted evidence origin."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "phase=Review -> pipeline([correctness, security, performance, style])",
|
||||
"annotation": "Each item advances independently through the scripted stages."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "phase=Verify -> adversarial checks run in parallel",
|
||||
"annotation": "Structured results cross a validation boundary before aggregation."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "journal append -> task_notification(status=completed)",
|
||||
"annotation": "Every completed agent call is checkpointed before the final notification."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "resumeFromRunId -> unchanged calls status=cached",
|
||||
"annotation": "Semantic keys reuse completed work without depending on concurrency order."
|
||||
"content": "goal_evaluated satisfied=true -> goal_completed",
|
||||
"annotation": "Trusted evidence closes the goal and releases the stop gate."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
{
|
||||
"version": "s22",
|
||||
"title": "Goal Loop",
|
||||
"description": "A host-owned completion gate keeps the turn alive until trusted evidence satisfies the active goal.",
|
||||
"steps": [
|
||||
{
|
||||
"type": "user_message",
|
||||
"content": "/goal until tests passed and deploy green",
|
||||
"annotation": "The command defines the condition but sits outside the evidence window."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "goal_started -> evidence window reset",
|
||||
"annotation": "The harness, not the working model, owns the completion gate."
|
||||
},
|
||||
{
|
||||
"type": "assistant_text",
|
||||
"content": "Tests passed and deployment is green.",
|
||||
"annotation": "Assistant prose is not trusted completion evidence."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "goal_evaluated satisfied=false -> continuation queued",
|
||||
"annotation": "An unmet condition pushes the loop into another bounded turn."
|
||||
},
|
||||
{
|
||||
"type": "tool_result",
|
||||
"content": "<task_notification>tests passed; deploy green</task_notification>",
|
||||
"annotation": "Only an allowlisted host event can attach a trusted evidence origin."
|
||||
},
|
||||
{
|
||||
"type": "system_event",
|
||||
"content": "goal_evaluated satisfied=true -> goal_completed",
|
||||
"annotation": "Trusted evidence closes the goal and releases the stop gate."
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user