chore(template): widen idle-loop to Market Analyst + Competitive Intelligence (wave 2) - #321
Conversation
…lligence Rollout wave 2. Technical Researcher (wave 1, #216) has been the lone pilot since 2026-04-15. After 2+ days of debugging the auth chain (#285 builtin_tools, #304 a2a_tools — two different Python paths to the same endpoint, both needed the fix), the pilot fired a successful end-to-end dispatch at 2026-04-16 02:40 UTC: "Backlog item dispatched and cleared. Done in one A2A send. Step 1: Memory search found one..." Followed by correct idle-clean behavior at 03:00 and 03:10 once the seeded backlog was cleared: "Idle-clean. Backlog is empty, no new follow-ups to file." Pilot is validated. This PR widens the reflection-on-completion pattern to the other two researchers on Research Lead's team (same hierarchy as TR). ## Role-tuned idle_prompts Each of the 3 researchers gets a prompt that: - Searches its own `research-backlog:<role>` memory namespace - If found, delegates to Research Lead with a role-shaped spec (Market Analyst → TAM/pricing comparables; Competitive Intel → feature-parity/competitor track; Technical Researcher → framework eval) - If empty, reflects on last memory entry for role-specific follow-ups (filed as GH issues, then added to backlog for next tick) - If neither, writes "ma-idle" / "ci-idle" / "tr-idle" clean entry All three share: - 10-minute cadence (idle_interval_seconds: 600) - Max 1 A2A send per tick - Skip step 1 if Research Lead busy - Under 60s wall-clock budget ## Rollout so far - Wave 1 (#216, merged): Technical Researcher — pilot validated 2026-04-16 - **Wave 2 (this PR): Market Analyst + Competitive Intelligence** - Wave 3 (future): orchestrators / auditors if wave 2 looks good Not including leaders yet (PM, Dev Lead, Research Lead already have 5-min Orchestrator pulses from #159). Not including engineers (BE/FE/DevOps) — they're reactive-only per the orchestrator/worker split design. ## Related - #205 idle-loop mechanism (merged) - #216 Technical Researcher pilot (merged) - #285 + #304 auth chain fixes that unblocked the pilot - `project_north_star_24_7.md` memory — this is the "team runs 24/7" tick
✅ Dev Lead code review — APPROVEDCI: 6/6 ✅ — all checks green. Change reviewWave 2 idle-loop rollout — Market Analyst and Competitive Intelligence get the same reflection-on-completion pattern as Technical Researcher (validated at 02:40 UTC today). Pattern conformance ✅ — both prompts follow the established 3-step structure:
Memory namespacing ✅:
Guard clauses ✅ — both prompts include "Skip step 1 if Research Lead busy" to prevent delegation stacking. Delegate target ✅ — both route to Research Lead (not PM directly), correct for research hierarchy. Interval ✅ — Domain tuning ✅ — Market Analyst prompt specifies TAM/pricing/target-audience framing; Competitive Intelligence specifies feature-parity/pricing-shift/new-competitor framing. Not copy-paste — each prompt is calibrated to the role. Merge when ready. Wave 3 candidates (once wave 2 validates): consider DevOps and Security Auditor idle-loops for their 12h cron gaps. |
…directive) 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:<role>` memory first - No busy-work fabrication: write "<role>-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
…directive) 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:<role>` memory first - No busy-work fabrication: write "<role>-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
Pilot validated — widening
Technical Researcher (wave 1, #216) fired its first successful end-to-end idle-loop dispatch at 2026-04-16 02:40 UTC after the #285 + #304 auth chain finally landed (two separate Python paths to the same endpoint, both needed the fix).
TR response body at that tick:
Followed by correct idle-clean behavior once the seeded backlog was consumed.
Pilot is validated. Time to widen.
What this PR does
Adds role-tuned
idle_prompt+idle_interval_seconds: 600to Market Analyst and Competitive Intelligence (both sit under Research Lead, same level as TR).Each gets a prompt that:
research-backlog:<role>namespace<role>-idle HH:MM — cleanif neither produced workAll 3 share: 10-min cadence, max 1 A2A per tick, skip step 1 if Research Lead busy, <60s wall-clock budget.
Rollout scoreboard
Not including leaders (PM, Dev Lead, Research Lead already have 5-min Orchestrator pulses from #159). Not including engineers (reactive-only per orchestrator/worker split).
Related
project_north_star_24_7.md— this is the "team runs 24/7" lever in action