From 92f533dcfff1f258e20094ae53e7090aadb48c09 Mon Sep 17 00:00:00 2001 From: CleverAgents Build Agent Date: Thu, 9 Apr 2026 00:11:57 +0000 Subject: [PATCH] fix: update remaining session state references in other agents - project-bootstrapper.md: Update to use announcement issues - system-watchdog.md: Begin migration to tracking system (partial) Note: The critical issue in product-builder.md has been resolved. Some agents still need complete session state reference cleanup but have automation tracking systems already in place. --- .opencode/agents/project-bootstrapper.md | 2 +- .opencode/agents/system-watchdog.md | 43 +++++++++++++++--------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/.opencode/agents/project-bootstrapper.md b/.opencode/agents/project-bootstrapper.md index 14ef9d89f..dcc5b3980 100644 --- a/.opencode/agents/project-bootstrapper.md +++ b/.opencode/agents/project-bootstrapper.md @@ -234,7 +234,7 @@ Create the following directories (with `.gitkeep` files to ensure they are track e. Forgejo labels (via API) f. Forgejo milestones (via API) g. Branch protection (via API) -4. After all setup, post a summary comment on the session state issue (if an issue index is provided) +4. After all setup, create a project bootstrap completion announcement issue with summary ## Commit Strategy diff --git a/.opencode/agents/system-watchdog.md b/.opencode/agents/system-watchdog.md index 6cf7c3c65..683bc3d0f 100644 --- a/.opencode/agents/system-watchdog.md +++ b/.opencode/agents/system-watchdog.md @@ -1828,15 +1828,18 @@ function audit_deep_session_introspection(): line += f"workers={data.get('children', '?')}" summary_lines.append(line) - post comment on session state issue: - "[WATCHDOG] Deep introspection — cycle : - Session health overview: - - Findings this pass: + # Create system health tracking issue + health_body="[WATCHDOG] Deep introspection — cycle $cycle: - --- - **Automated by CleverAgents Bot** - Supervisor: System Watchdog | Agent: system-watchdog" +Session health overview: +$(printf '%s\n' "${summary_lines[@]}") + +--- +**Automated by CleverAgents Bot** +Supervisor: System Health | Agent: system-watchdog" + + cleanup_previous_system_watchdog_tracking + create_system_watchdog_tracking_issue $cycle "$health_body" return findings ``` @@ -2210,14 +2213,22 @@ def invoke_subagent(agent_type, description, params): # An agent used the FORBIDDEN force_merge flag # Create a Priority/CI-Blocker issue AND alert product-builder create_bug_issue(finding) - post comment on session state issue: - f"[WATCHDOG ALERT] forbidden_api_flag: - supervisor_name: {finding.get('supervisor_name', 'unknown')} - session_id: {finding.session_id} - type: {finding.type} - detail: {finding.detail} - evidence: {finding.evidence[:200]} - severity: CRITICAL + # Create critical watchdog alert + alert_body=f"[WATCHDOG ALERT] forbidden_api_flag: + +- supervisor_name: {finding.get('supervisor_name', 'unknown')} +- session_id: {finding.session_id} +- violation: Agent used forbidden force_merge flag +- action: Created Priority/CI-Blocker issue + +--- +**Automated by CleverAgents Bot** +Supervisor: System Health | Agent: system-watchdog" + + create_system_watchdog_announcement_issue \ + f"CRITICAL: {finding.get('supervisor_name', 'unknown')} used forbidden API" \ + "Priority/Critical" \ + "$alert_body" action_taken: created_bug_issue action_required: relaunch_supervisor