chore(template): audit crons require PM-routing + GH-issue filing; add UIUX schedule - #26
Conversation
…add UIUX schedule Addresses the gap surfaced by CEO 2026-04-13: audit agents (Security Auditor, QA Engineer, UIUX Designer) were running their crons successfully but findings stayed in agent memory and didn't consistently flow to GitHub issues or to developers with build ability. BE noticed Security findings once via a manual escalation; subsequent hourly audits accumulated 13 criticals (including an unauthenticated-plugin-install RCE) with no durable tracking. Changes: 1. Security Auditor schedule: replace 12h (7 6,18 * * *) with hourly (17 * * * *) to match what's actually running in the platform DB. Rewrite the prompt with the full body of the runtime cron — git diff scoping, gosec/bandit, manual checklist, live API DAST, secrets scan, open-PR review. 2. QA Engineer schedule: keep 12h cadence, tighten post-audit routing. 3. UIUX Designer: add a schedule (was previously runtime-only — see #24). Uses hourly cadence to match runtime. Accepts Playwright may be unavailable (see #23) and falls back to HTML analysis with the limitation noted in the deliverable. All three audit crons now end with an identical FINAL STEP — DELIVERABLE ROUTING block that makes the post-audit flow MANDATORY: a. File a GitHub issue for each CRITICAL / HIGH finding (dedupe first) b. delegate_task to PM with a structured summary listing issue numbers; PM decides which dev agent picks up which issue c. Even on clean cycles, send PM a one-line "clean on SHA X" so audits are observable d. Memory write becomes a secondary record, not the primary deliverable Rationale: findings need to flow into the issue tracker (durable, visible to CEO, part of the PR/issue review feedback loop already in place) and through PM (who owns cross-team orchestration). Memory-only output is invisible to everyone except the auditor itself. Related: - #23 — UIUX Designer container missing libglib/X11 for Playwright. This PR accepts the current limitation; #23 tracks the image fix. - #24 — template-vs-runtime schedule drift. This PR backfills the template; #24 tracks the platform-layer fix for preventing future drift. - 13 open criticals in Security Auditor memory are out of scope for this PR (that's team work once the routing is in place).
|
7-gate verification passed. Gate 1 (CI): 6/6 green. Verdict: merge. |
…ifacts Follow-up to root-cause analysis in #17 (see 2026-04-14 02:14 UTC comment). The Security Auditor's hourly DAST was creating test workspaces, secrets, and plugins to probe auth/validation logic — but only secrets and plugins had teardown in the prompt. Workspace-create probes leaked rows into `workspaces` with sequential IDs aaaaaaaa- bbbbbbbb- cccccccc- dddddddd-, each trapped in a restart loop on missing config.yaml. Four hourly runs, four leaked workspaces. Adds explicit step 4a: DAST TEARDOWN. Maintains three lists (workspaces, secrets, plugins) populated as probes run, and iterates them at the end with DELETE calls. Uses `|| true` so partial teardown failures don't break the audit, but every created artifact gets a cleanup attempt. Doesn't remove the cleanup the cron was already doing for secrets/plugins — just formalises the pattern so workspace-create (and any future probe surface) is covered by the same contract. Related: - #17 — rogue workspace restart loop (root cause was this) - #26 — audit cron routing (this PR sits alongside that structure)
… triggers, not FYIs Observed 2026-04-14 morning: audit crons (Security, UIUX, QA) were flowing messages into PM per the PR #26 contract, but PM stopped sub-delegating to Dev Lead ~10 hours ago. Meanwhile audits started opening PRs directly (bypassing Dev Lead), and Dev Lead / BE / FE / DevOps / QA sat idle for 17+ maintenance cycles despite PRs continuing to land. Root cause: PM's system prompt defined delegation behavior for "tasks from CEO" but didn't explicitly treat audit summaries as tasks. PM was reading "audit of SHA X, filed issue #N, top recommendation: fix Y" as a status report and committing it to memory without triggering the dispatch chain. Adds a dedicated "Audit Routing" section to PM's prompt that: - Treats every audit summary with open issue numbers as a dispatch trigger - Specifies routing by category (security→BE, ui→FE, infra→DevOps, qa→QA) - Requires parallel `delegate_task_async` when issues span categories - Makes clean-cycle acks the only no-op case This turns PM from a receptionist into a dispatcher — which was the original intent of the audit-routing contract in #26. Aligns with the north-star goal (keep the team running 24/7): dead idle windows when audits had live issue numbers is a defect in orchestration, not a quiet period.
…ting chore(template): audit crons require PM-routing + GH-issue filing; add UIUX schedule
…ifacts Follow-up to root-cause analysis in #17 (see 2026-04-14 02:14 UTC comment). The Security Auditor's hourly DAST was creating test workspaces, secrets, and plugins to probe auth/validation logic — but only secrets and plugins had teardown in the prompt. Workspace-create probes leaked rows into `workspaces` with sequential IDs aaaaaaaa- bbbbbbbb- cccccccc- dddddddd-, each trapped in a restart loop on missing config.yaml. Four hourly runs, four leaked workspaces. Adds explicit step 4a: DAST TEARDOWN. Maintains three lists (workspaces, secrets, plugins) populated as probes run, and iterates them at the end with DELETE calls. Uses `|| true` so partial teardown failures don't break the audit, but every created artifact gets a cleanup attempt. Doesn't remove the cleanup the cron was already doing for secrets/plugins — just formalises the pattern so workspace-create (and any future probe surface) is covered by the same contract. Related: - #17 — rogue workspace restart loop (root cause was this) - #26 — audit cron routing (this PR sits alongside that structure)
… triggers, not FYIs Observed 2026-04-14 morning: audit crons (Security, UIUX, QA) were flowing messages into PM per the PR #26 contract, but PM stopped sub-delegating to Dev Lead ~10 hours ago. Meanwhile audits started opening PRs directly (bypassing Dev Lead), and Dev Lead / BE / FE / DevOps / QA sat idle for 17+ maintenance cycles despite PRs continuing to land. Root cause: PM's system prompt defined delegation behavior for "tasks from CEO" but didn't explicitly treat audit summaries as tasks. PM was reading "audit of SHA X, filed issue #N, top recommendation: fix Y" as a status report and committing it to memory without triggering the dispatch chain. Adds a dedicated "Audit Routing" section to PM's prompt that: - Treats every audit summary with open issue numbers as a dispatch trigger - Specifies routing by category (security→BE, ui→FE, infra→DevOps, qa→QA) - Requires parallel `delegate_task_async` when issues span categories - Makes clean-cycle acks the only no-op case This turns PM from a receptionist into a dispatcher — which was the original intent of the audit-routing contract in #26. Aligns with the north-star goal (keep the team running 24/7): dead idle windows when audits had live issue numbers is a defect in orchestration, not a quiet period.
Both tutorials cited misattributed PRs and claimed shipped runtimes that didn't exist (RFC internal#730 finding): - google-adk-runtime.md: cited 'PR #550' (actually a MemoryTab test suite) + 'already first-class'. Rewritten to the REAL implementation — ADK engine-only (google-adk[mcp]==2.1.0, no [a2a]), Vertex AI via ADC (keyless), a2a-1.x bridge — with correct PR refs (template PR #1, core #2003, ci #26) + a landing-status banner. - gemini-cli-runtime.md: cited 'PR #379' (actually CI cleanup); no gemini-cli runtime exists in manifest/knownRuntimes. Added a correction banner pointing to the real google-adk runtime. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Audit agents (Security, QA, UIUX) were running their crons successfully but findings stayed trapped in agent memory — they didn't consistently flow into GitHub issues or reach developers with build ability. This PR rewrites the three audit cron prompts so the post-audit delivery is mandatory, structured, and routed through PM.
Motivation
Incident seen 2026-04-13 evening: Security Auditor had 13 open critical findings in its memory including an unauthenticated-plugin-install RCE (
plugins_registry/builtins.py:163-184). BE picked up a batch earlier in the day as a one-off escalation, then went idle while findings continued to accumulate silently. UIUX Designer was similarly stuck — screenshots unavailable due to missing container libs (#23), falling back to HTML analysis, but no one saw the output.Root cause: the cron prompts treated post-audit delegation as optional ("if you find issues, report to Dev Lead") and wrote to memory as the primary deliverable. Memory is invisible unless someone reads it.
Changes
Security Auditor — replace 12h schedule (
7 6,18 * * *) with hourly (17 * * * *) to match what's actually in the platform DB. Backfill the full hourly prompt into the template (see Runtime-added workspace_schedules drift from org-template — template is not source of truth #24 for the separate template-vs-runtime drift fix).QA Engineer — keep 12h cadence; tighten the post-audit routing.
UIUX Designer — add a schedule block (was previously runtime-only; see Runtime-added workspace_schedules drift from org-template — template is not source of truth #24). Uses hourly cadence. Accepts that Playwright may be unavailable (UIUX Designer workspace image missing X11/glib — Playwright screenshots fail in audit cron #23) and falls back to HTML analysis, explicitly noting the limitation in the PM deliverable.
Shared routing contract — all three audit crons now end with an identical
FINAL STEP — DELIVERABLE ROUTING (MANDATORY every cycle)block:gh issue createwith dedup against open issues. Capture issue numbers.delegate_taskto PM with a structured summary (timestamp/SHA, findings by severity, issue numbers, top recommendation). PM owns cross-team routing; audit agents don't DM Dev Lead directly.delegate_taskPM a one-line "clean on SHA X" so audits are observable instead of silent.Design rationale
Related issues
workspace_schedulesvs template). This PR backfills the template for the current audits; Runtime-added workspace_schedules drift from org-template — template is not source of truth #24 tracks preventing future drift.Test plan
python -c "import yaml; yaml.safe_load(open('org-templates/molecule-dev/org.yaml'))"— YAML valid.workspace_schedulestable should show Security Auditor on17 * * * *and UIUX Designer present with11 * * * *.GET /workspaces/<PM>/delegationsand/or new GH issues filed.🤖 Generated with Claude Code