Use this skill to implement a rigorous human-agent collaboration loop. This is the "Human-in-the-Right-Loop" (HITRL) method, designed to eliminate "blind box" agent outcomes by forcing plan approval and result verification.
Scope: This skill orchestrates remote agent workflows using the
draftCLI. All persistence is through Draft pages (via the canonicaldraft-clidependency). It does not write to local disk or agent memory.
Trigger this skill when:
Do NOT trigger this skill when:
draft-cli).draft ... --runtime v2.draft-cli.Before doing anything, establish a stable Draft connection:
bash
# 1. Start the daemon in headless runtime v2
draft start-server
# 2. Confirm the session is READY before proceeding
draft status --json
If draft status does not show a healthy v2 headless session, follow the draft-cli recovery pattern:
DAEMON_OFFLINE → re-run draft start-serverdraft status --json shows a healthy headless v2 sessionBefore executing any code or changes:
Create Journal: Create a new Draft page titled <Task Name> - Task Journal.
bash
draft page create "<Task Name> - Task Journal" --json
Submit Plan: Author a detailed Task Journal using the mandatory template. Append it to the Journal. bash
cat << 'EOF' | draft page append <id> --json
# 📋 Task: [Title]
## Context
[Detailed background and motivation]
## Problem / Goal
[Specific issue being solved or feature being added]
## Acceptance Criteria (Outcome-Focused)
[Current state analysis, relevant files, suggested approach, technical considerations]
[Test strategy, scenarios to test, existing tests to reference] EOF
3. **Confirm Before Publishing**: Before publishing, explicitly confirm with the user: "I am about to publish the Task Journal for external review. Please confirm."
4. **Handoff**: On confirmation, publish the page and ask for approval.
bash
```bash
draft page publish <id> --invite-code "${GLOBAL_INVITE_CODE:-innosage}" --json
Handoff Phrase: "I have initialized the Task Journal with the plan and requirements: [URL]. Please review the context and acceptance criteria. Once you are ready for me to proceed, please reply with APPROVED or LGTM here in the chat."
Once approved:
Verify Approval: Confirm the user has provided approval in the chat.
Execute: Perform the tasks outlined in the plan.
Log Evidence: For every significant action, append a concise, non-sensitive log entry to the Journal under a # 📜 Execution Log section. Do NOT include raw command output, file contents, or credentials.
bash
cat << 'EOF' | draft page append <id> --json
### [Timestamp] Action: [Description]
## Phase 3: Verify (Result & Sign-off)
Once the execution is complete:
1. **Submit Results**: Append a `# ✅ Final Results` summary to the Journal. Include links to artifacts (e.g., PR URL, Draft page URL). Do not include raw file dumps.
2. **Confirm Before Publishing**: Explicitly confirm with the user before re-publishing.
3. **Handoff**: On confirmation, re-publish the page.
bash
```bash
draft page publish <id> --invite-code "${GLOBAL_INVITE_CODE:-innosage}" --json
Handoff Phrase: "I have completed the task. Please verify the results in the Task Journal: [URL]. If satisfied, reply with DONE or ✅ here in the chat."
After sign-off, append a final summary to the existing Task Journal page. This keeps all persistence within Draft — no local filesystem writes.
bash
cat << 'EOF' | draft page append <id> --json
# 🗂 Task Complete — Summary
- **Outcome**: [Brief description of what was achieved]
- **Key Decisions**: [Any notable trade-offs or design choices]
- **Artifacts**: [Links to PR, relevant files, or external references]
EOF
The Draft page itself (with its page ID and URL) is the durable record. No additional writes to
TASK_LOG.md,knowledge/, or other filesystem locations are required or expected.
If the user provides feedback or requests changes after Phase 3:
# 📋 Iteration [N]: Addressing Feedback.--mode workspace.TASK_LOG.md, no knowledge/ writes).