Skip to content

chore(template): add 4 evolution crons — ecosystem / plugins / template / channels - #87

Merged
HongmingWang-Rabbit merged 1 commit into
mainfrom
chore/template-evolution-crons
Apr 15, 2026
Merged

chore(template): add 4 evolution crons — ecosystem / plugins / template / channels#87
HongmingWang-Rabbit merged 1 commit into
mainfrom
chore/template-evolution-crons

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Summary

Adds 4 new schedules to molecule-dev/org.yaml so the team actively EVOLVES the four levers CEO named (templates, plugins, channels, watchlist), not just runs defensive audits.

Motivation

Today's crons are all REVIEW:

  • Hourly Security audit (Security Auditor)
  • Hourly UI/UX audit (UIUX Designer)
  • 12h Code quality audit (QA Engineer)

Nothing was actively driving evolution. CEO 2026-04-15: "current crons does not include keep evolving with new plugins, template, channels". Combined with today's incident #85 (scheduler died for 10+ hours, no one noticed because nobody was watching template fitness), it's clear the team-runs-24/7 goal needs both halves of the loop.

Changes — 4 new schedules

Workspace Schedule Cadence Output
Research Lead Daily ecosystem watch 0 8 * * * 1-3 entries to docs/ecosystem-watch.md per day, committed + PR'd
Technical Researcher Weekly plugin curation 0 9 * * 1 1-3 plugin-proposal GH issues per week with concrete integration sketch
Dev Lead Daily template fitness audit 30 8 * * * Catches stale prompts, dead schedules (#85 class), missing plugins/channels
DevOps Engineer Weekly channel expansion survey 0 10 * * 1 1-2 channel-proposal GH issues per week (Slack/email/etc gaps)

All four end with structured audit_summary routing (category / severity / issues / top_recommendation) so PM fans out via the platform-level category_routing from #75. Categories used:

  • research → audit_summary from ecosystem-watch
  • plugins → from plugin curation
  • template → from template fitness
  • channels → from channel survey

The template's existing category_routing block already maps these slots, so dispatch is wired end-to-end.

Side cleanup

Drops three stale "# UNION with defaults (#71)" comments from the Research children — redundant after the union semantics are documented at the defaults block.

Why template-level, not platform-level

Schedule definitions per-role are inherently template-specific (different orgs have different roles, different cadences). The platform already provides:

This PR is just consuming those primitives from the molecule-dev template. Other org templates can model their own evolution loop the same way.

Test plan

  • YAML valid (python -c "import yaml; yaml.safe_load(...)").
  • 7 total schedules now defined (was 3, added 4).
  • After merge + re-import: scheduler picks up the new schedules; first daily fires (Research / Dev Lead) at 08:00 and 08:30 UTC; weekly Monday fires (Technical Researcher / DevOps) on next Monday at 09:00 / 10:00 UTC.
  • First ecosystem-watch entry PR opens automatically by Research Lead within 24h.
  • First template-fitness audit catches at least one drift/improvement issue.

Related

🤖 Generated with Claude Code

…te / channels

Today's crons are all REVIEW (Security audit, UIUX audit, QA tests). Nothing
actively pushes the team to EVOLVE the four levers CEO named: templates,
plugins, channels, watchlist. The team-runs-24/7 goal needs both — defensive
reviews AND offensive evolution.

Adds 4 new schedules:

1. Research Lead — Daily ecosystem watch (0 8 * * *)
   Survey github.com/trending + HN + AI-blogs for new agent-infra projects
   from the last 24h. Add 1-3 entries to docs/ecosystem-watch.md per day,
   commit to chore/eco-watch-YYYY-MM-DD branch + push + PR. Re-enables
   the watchlist pipeline that was paused earlier today.

2. Technical Researcher — Weekly plugin curation (0 9 * * 1, Mondays)
   Inventory plugins/ + builtin_tools/ + recent landings. Identify gaps
   (builtin not exposed as plugin; role missing extras; rarely-used plugin
   in defaults). Survey upstream (claude.ai cookbook, MCP servers,
   anthropic/openai/langchain blogs). File 1-3 plugin proposals per week
   as GH issues with concrete integration sketches.

3. Dev Lead — Daily template fitness audit (30 8 * * *)
   Health-check the template itself: stale system prompts, schedules not
   firing (catches the #85 scheduler-died failure mode), roles missing
   plugins they should have, missing crons, channel gaps. File issues for
   any drift. Designed to catch the silent-stall pattern from today's
   incident.

4. DevOps Engineer — Weekly channel expansion survey (0 10 * * 1, Mondays)
   PM is the only role with a channel today (Telegram). Survey what
   channel infra the platform supports + what role-channel pairings would
   actually help (Security→email-on-critical, DevOps→Slack-on-CI-break,
   etc). File channel-proposal issues.

All four crons end with the structured audit_summary routing per #51/#75
(category, severity, issues, top_recommendation) so they integrate with
the platform-level category_routing PM uses to fan out work. The template's
existing category_routing block already maps research / plugins / template /
channels — these new crons consume exactly those slots.

Also drops three stale "# UNION with defaults (#71)" comments left from
the cleanup PR — those plugins lists are now self-documenting after #71.

Aligns with north-star goal: team should run 24/7 AND keep getting better
across templates / plugins / channels / watchlist. This PR closes the gap
where the "review" half of the loop was running but the "evolve" half had
no active driver.
@HongmingWang-Rabbit
HongmingWang-Rabbit merged commit 12ef17f into main Apr 15, 2026
7 checks passed
@HongmingWang-Rabbit
HongmingWang-Rabbit deleted the chore/template-evolution-crons branch April 16, 2026 12:30
molecule-ai Bot pushed a commit that referenced this pull request Apr 21, 2026
chore(template): add 4 evolution crons — ecosystem / plugins / template / channels
HongmingWang-Rabbit pushed a commit that referenced this pull request Apr 27, 2026
…on gemini-cli image rebuild)

DRAFT — do NOT merge until gemini-cli template image rebuilds with
its local cli_executor.py copy (template PR #9 just merged at
07:59 UTC; image build kicks off now).

Final adapter-specific deletion from molecule-runtime, completing #87
for the priority adapters (claude-code via PR #2156, plus gemini-cli
via this PR + template #9).

Deletes:
  - workspace/cli_executor.py (461 LOC) — CLIAgentExecutor + the
    RUNTIME_PRESETS dict for codex / ollama / gemini-cli. The file
    moved to molecule-ai-workspace-template-gemini-cli (PR #9, merged).
  - workspace/tests/test_agent_base_urls.py — only consumer of
    CLIAgentExecutor in the test suite. Tests for the executor
    behavior live in the template repo now.

Updates:
  - workspace/tests/test_executor_helpers.py — docstring refresh:
    executor_helpers.py is the runtime-agnostic shared helpers; the
    executor classes themselves live in template repos post-#87.

Codex / ollama presets disappear naturally with the file. They never
had template repos, so no production path could invoke them anyway —
this is dead-code removal as a side effect of the move.

Verified-safe-to-delete:
  - heartbeat.py: doesn't import cli_executor
  - claude_sdk_executor.py: deleted by PR #2156 (in flight)
  - preflight.py: only references runtime names by string; no import
  - main.py: doesn't import cli_executor (uses adapter discovery via
    ADAPTER_MODULE; the template's adapter constructs the executor)
  - Only test_agent_base_urls.py + test_executor_helpers.py docstring
    referenced cli_executor

Verification:
  - 1249/1249 workspace pytest pass (was 1251; -2 = test_agent_base_urls.py
    cases — exact match)
  - No live import of cli_executor anywhere in molecule-core after deletion
    (grep verified)

Sequencing:
  1. ✅ Template PR #9 (gemini-cli local copy) — MERGED
  2. ⏳ Template image rebuild — running
  3. THIS PR — wait until image is published, then mark ready-for-review

Closes #87 for the priority adapters: workspace/ is now adapter-
agnostic except for adapter discovery (ADAPTER_MODULE) + the
runtime_wedge primitive.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
HongmingWang-Rabbit pushed a commit that referenced this pull request Apr 27, 2026
… docstrings

Comprehensive sweep follow-up to the MCP server path fix. Audited every
/app/ reference in the runtime source against the live claude-code
template image and confirmed the actual /app/ contents post-#87 are
ONLY: __init__.py, adapter.py, claude_sdk_executor.py, requirements.txt
— every other workspace module ships in the wheel under
site-packages/molecule_runtime/. Two more leaks found:

1. executor_helpers.py:_A2A_INSTRUCTIONS_CLI — inter-agent system prompt
   for non-MCP runtimes (Ollama, custom) had 5 lines telling the model
   `python3 /app/a2a_cli.py X`. Models copy these examples verbatim, so
   every CLI-runtime delegation would fail at the shell layer (no such
   file). Replaced with `python3 -m molecule_runtime.a2a_cli` form,
   which works regardless of where the wheel is installed.

2. molecule_ai_status.py docstring — usage examples invoked
   `python3 /app/molecule_ai_status.py` and claimed a
   `molecule-monorepo-status` shell alias. Both broken in current
   templates: the file's at site-packages, and `which
   molecule-monorepo-status` errors (the legacy symlink only existed
   in the dev-only workspace/Dockerfile base image, not in the
   standalone template Dockerfiles that ship to production).
   Updated docstring + the __main__ usage banner + the stderr error
   prefix to use the same `python3 -m molecule_runtime.X` form.

Plugins audited and clean: WORKSPACE_PLUGINS_DIR=/configs/plugins,
SHARED_PLUGINS_DIR=$PLUGINS_DIR fallback /plugins. No /app/
assumptions.

Regression test: `test_a2a_cli_instructions_use_module_invocation_not_legacy_app_path`
asserts the legacy /app/a2a_cli.py path can't drift back into the CLI
system prompt and that the canonical module form is present.

The legacy workspace/Dockerfile + workspace/entrypoint.sh + workspace/scripts/
still contain /app/-shaped paths but are dev-only base-image scaffolding
(per workspace/build-all.sh's own header comment) — not shipped to the
standalone template images. Out of scope here; can be cleaned up in a
separate dead-code pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
HongmingWang-Rabbit pushed a commit that referenced this pull request Apr 27, 2026
…claim

Same root cause as the workspace/molecule_ai_status.py docstring fix
in this PR: this doc claimed `molecule-monorepo-status` was a usable
shell alias and `from molecule_ai_status import set_status` was a
usable Python import. Both worked under the pre-#87 monolithic-template
layout (where workspace/Dockerfile created the symlink and COPY'd the
modules into /app/) but neither works in current standalone template
images that install the runtime as a wheel:

- `which molecule-monorepo-status` errors — only `a2a-db` and
  `molecule-runtime` are registered console scripts.
- `from molecule_ai_status` raises ImportError — modules are under the
  `molecule_runtime` package now.

Switched both examples to the canonical `python3 -m
molecule_runtime.molecule_ai_status` form (CLI) and `from
molecule_runtime.molecule_ai_status import set_status` (Python). Same
form the runtime ships in its own usage banner, so anyone discovering
this doc gets a runnable example.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant