From 4f9ef2dd0e00ad9afe74c25123e4992516b4355e Mon Sep 17 00:00:00 2001 From: rabbitblood Date: Wed, 15 Apr 2026 22:49:10 -0700 Subject: [PATCH] feat(template): engineers pick up issues proactively (CEO 2026-04-16 directive) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CEO directive verbatim: *"devs should pick up issues and declare that its assigned to them, PM and leaders regularly check in. dont just rely on outside reviewer"*. Adds `idle_prompt` + `idle_interval_seconds: 600` to Frontend Engineer, Backend Engineer, and DevOps Engineer. Each engineer now polls open GH issues matching its specialty, claims unassigned ones via `gh issue edit --add-assignee @me`, leaves a public comment declaring the pickup, and commits memory to prevent double-pickup on the next tick. Previously engineers were reactive-only per the #159 orchestrator/worker split. The CEO is correcting that: devs should be a true self-organizing unit, not a work-queue that only advances when an outside reviewer dispatches. ## Per-role specialty filters | Role | Labels it claims | |---|---| | Frontend Engineer | canvas, a11y, ux, typescript, frontend, bug, security | | Backend Engineer | security, platform, go, database, bug | | DevOps Engineer | docker, ci, deployment, infra, devops, bug | Priority order within each role: security > bug > feature. ## Self-review gates Each engineer's idle_prompt includes the self-review chain: - Frontend: molecule-skill-code-review + molecule-skill-llm-judge - Backend: molecule-skill-code-review + molecule-security-scan + molecule-skill-llm-judge - DevOps: molecule-skill-code-review + molecule-freeze-scope + molecule-hitl for risky ops These plugins were wired into engineer roles by #280, #303, #310, #322 — the idle_prompt makes them the PRIMARY quality gate instead of a nice-to- have before PR. Matches the "team self-regulates, don't rely on outside reviewer" spirit. ## Hard rules (same shape as researcher idle_prompts from #216/#321) - Max 1 claim per tick (1 `gh issue edit --add-assignee` call) - Never take someone else's assigned issue - Under 90 seconds wall-clock for the claim + plan step - Don't double-pick: check `task-assigned:` memory first - No busy-work fabrication: write "-idle HH:MM — no work" if nothing matches ## What this does NOT change - Leaders' orchestrator pulses still dispatch (#159) — this is the TAIL pickup, not the primary dispatch path. Dev Lead still prioritizes via its own pulse. - PR merging still goes through reviewer per `feedback_never_merge_prs.md`. This directive is about the QUALITY GATE (team self-review, peer review via Dev Lead's pulse) not about bypassing merge approval. - Destructive/irreversible ops still need explicit human ack via molecule-hitl's @requires_approval decorator. ## Rollout plan - Ship template change (this PR) - After merge: rebuild workspace-template:claude-code, re-provision BE + FE + DevOps via apply_template=true, re-inject idle_prompt (platform doesn't auto-propagate org.yaml to live configs — tracked separately) - Measure: 24h of activity_logs. Should see `a2a_receive` events every 10 min per engineer, response bodies mentioning claim decisions or idle-clean states, and `gh issue edit` events showing up as assignees. ## Related - `feedback_devs_pick_up_issues_leaders_check_in.md` — memory saved last cycle - #159 orchestrator/worker split (leaders dispatch) - #216 / #321 researcher idle_prompts (same pattern applied to researchers) - `project_north_star_24_7.md` — team self-regulation is the north-star --- org-templates/molecule-dev/org.yaml | 124 ++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) diff --git a/org-templates/molecule-dev/org.yaml b/org-templates/molecule-dev/org.yaml index 289af4db..f6d12c46 100644 --- a/org-templates/molecule-dev/org.yaml +++ b/org-templates/molecule-dev/org.yaml @@ -546,6 +546,47 @@ workspaces: - /workspace/repo/canvas/src/store/canvas.ts (Zustand store patterns) 5. Use commit_memory to save the design system: zinc-900/950 bg, zinc-300/400 text, blue-500/600 accents 6. Wait for tasks from Dev Lead. + # Engineer idle-loop (CEO 2026-04-16: "devs pick up issues and + # declare assigned; leaders check in; don't rely on outside + # reviewer"). Shift engineers from reactive-only to proactive + # issue-claim. Dev Lead's orchestrator pulse still dispatches + # for priority work; this loop picks up the tail. + idle_interval_seconds: 600 + idle_prompt: | + You have no active task. Pick up UI/canvas work proactively. + Under 90 seconds: + + 1. Check dispatched/claimed first (don't double-pick): + - search_memory "task-assigned:frontend-engineer" — if you + already claimed an issue, resume that in your next turn. + - Check /tmp/delegation_results.jsonl for Dev Lead dispatches. + + 2. Poll open UI/canvas issues: + gh issue list --repo ${GITHUB_REPO} --state open \ + --json number,title,labels,assignees + Filter: assignees == [] AND labels intersect any of + {canvas, a11y, ux, typescript, frontend, bug, security}. + Priority: security > bug > feature. Pick the TOP match. + + 3. Claim it publicly: + - gh issue edit --add-assignee @me + - gh issue comment --body "Picking this up. Branch + fix/issue--. Plan: <1-line approach>." + - commit_memory "task-assigned:frontend-engineer:issue-" + + 4. Start work: + - Branch fix/issue-- + - Run npm test + npm run build before editing (per conventions) + - Apply changes. Keep zinc dark theme. 'use client' on hook files. + - Self-review via molecule-skill-code-review against your diff + - molecule-skill-llm-judge: does the change match the issue body? + - Open PR. Link issue. Route audit_summary to PM. + + 5. If no unassigned UI issues, write "fe-idle HH:MM — no work" + to memory and stop. DO NOT fabricate busy work. + + Hard rules: max 1 claim per tick, never grab someone else's + assigned issue, under 90s wall-clock for the claim+plan step. - name: Backend Engineer role: >- Owns the Go/Gin platform layer: REST handlers, WebSocket hub, @@ -580,6 +621,47 @@ workspaces: 4. Study the handler pattern: read /workspace/repo/platform/internal/handlers/workspace.go 5. Use commit_memory to save the API route table and key patterns 6. Wait for tasks from Dev Lead. + # Engineer idle-loop (CEO 2026-04-16 directive, see Frontend + # Engineer comment above for rationale). + idle_interval_seconds: 600 + idle_prompt: | + You have no active task. Pick up platform/Go work proactively. + Under 90 seconds: + + 1. Check dispatched/claimed first (don't double-pick): + - search_memory "task-assigned:backend-engineer" — resume + prior claim in your next turn if still open. + - Check /tmp/delegation_results.jsonl for Dev Lead dispatches. + + 2. Poll open platform/security issues: + gh issue list --repo ${GITHUB_REPO} --state open \ + --json number,title,labels,assignees + Filter: assignees == [] AND labels intersect any of + {security, platform, go, database, bug}. + Priority: security > bug > feature. Pick the TOP match. + + 3. Claim it publicly: + - gh issue edit --add-assignee @me + - gh issue comment --body "Picking this up. Branch + fix/issue--. Plan: <1-line approach>." + - commit_memory "task-assigned:backend-engineer:issue-" + + 4. Start work: + - Branch fix/issue-- + - Run platform/cmd tests + go vet before editing + - Apply changes. Parameterized queries only. No bypassed + auth middleware. Use @requires_approval from molecule-hitl + for anything touching migrations/runtime-config. + - Self-review via molecule-skill-code-review + - molecule-security-scan against your diff (CVE gate) + - molecule-skill-llm-judge: diff matches issue body? + - Open PR. Link issue. Route audit_summary to PM. + + 5. If no unassigned backend issues, write "be-idle HH:MM — no + work" to memory and stop. DO NOT fabricate busy work. + + Hard rules: max 1 claim per tick, never grab someone else's + assigned issue, under 90s wall-clock for the claim+plan. - name: DevOps Engineer role: >- Owns the container build pipeline: Dockerfiles for all six @@ -624,6 +706,48 @@ workspaces: 4. Read /workspace/repo/.github/workflows/ci.yml 5. Use commit_memory to save CI pipeline structure 6. Wait for tasks from Dev Lead. + # Engineer idle-loop (CEO 2026-04-16 directive, see Frontend + # Engineer comment for rationale). + idle_interval_seconds: 600 + idle_prompt: | + You have no active task. Pick up infra/CI work proactively. + Under 90 seconds: + + 1. Check dispatched/claimed first (don't double-pick): + - search_memory "task-assigned:devops-engineer" — resume + prior claim in your next turn if still open. + - Check /tmp/delegation_results.jsonl for Dev Lead dispatches. + + 2. Poll open infra/CI issues: + gh issue list --repo ${GITHUB_REPO} --state open \ + --json number,title,labels,assignees + Filter: assignees == [] AND labels intersect any of + {docker, ci, deployment, infra, devops, bug}. + Priority: security > bug > feature. Pick the TOP match. + + 3. Claim it publicly: + - gh issue edit --add-assignee @me + - gh issue comment --body "Picking this up. Branch + fix/issue--. Plan: <1-line approach>." + - commit_memory "task-assigned:devops-engineer:issue-" + + 4. Start work: + - Branch fix/issue-- + - For CI changes: test locally via `act` if available, or + open a draft PR and watch the self-hosted runner react. + - For Dockerfile changes: run `bash workspace-template/build-all.sh`. + - Use @requires_approval from molecule-hitl for fly deploys, + registry pushes, or destructive infra ops. + - molecule-freeze-scope: lock edits to infra/** during + high-risk migrations. + - Self-review via molecule-skill-code-review + - Open PR. Link issue. Route audit_summary to PM. + + 5. If no unassigned infra issues, write "devops-idle HH:MM — + no work" to memory and stop. DO NOT fabricate busy work. + + Hard rules: max 1 claim per tick, never grab someone else's + assigned issue, under 90s wall-clock. schedules: - name: Hourly channel expansion survey cron_expr: "47 * * * *"