Complete Phase Workflow #
# Pseudocode — agent execution loop
# 1. Get context
context = call("dmsi_context", {})
# 2. List tasks
tasks = call("dmsi_task_list", {"status": "pending"})
# 3. Work on tasks
for task in tasks:
call("dmsi_task_update", {"task_id": task.id, "status": "in_progress"})
# ... do work ...
call("dmsi_heartbeat", {"message": f"Completed {task.title}"})
call("dmsi_task_complete", {"task_id": task.id, "notes": "Implementation complete"})
# 4. Commit changes
call("dmsi_commit", {"message": "[dev] T001: Implement feature X"})
# 5. Complete phase
call("dmsi_phase_complete", {
"summary": "Implemented all required tasks. Tests pass.",
"outcome": "success",
"output_files": ["src/Feature.java"]
})
QA Phase with Issues Routing #
issues = []
# Found a bug
issues.append({
"category": "DEV",
"severity": "blocking",
"description": "NullPointerException in FeatureService.process() when input is empty"
})
# Found a UI problem
issues.append({
"category": "UI",
"severity": "warning",
"description": "Button text truncated on small screens"
})
# Complete with issues — routing determined by highest priority category
call("dmsi_phase_complete", {
"summary": "QA complete. Found 1 blocking DEV issue and 1 UI warning.",
"issues": issues
})
# Routes to DEV (highest priority with issues)
Requesting Human Approval #
# Agent needs human sign-off before deploying
call("dmsi_approval_request", {
"message": "Ready to deploy to production. All tests pass. Awaiting sign-off.",
"phase_id": "phase-deploy-001"
})
# Phase pauses here until approved in the UI
For architecture details, see the Developer Manual.
