feat: add event-driven triggers and success criteria to plugin builder
- Success Criteria section defines measurable quality gates - Continuity section explains event-driven wake modes - Each generation tracks which criteria passed/failed - Improvements triggered by failures, not fixed timers
This commit is contained in:
@@ -22,12 +22,49 @@ description: >
|
|||||||
- output_dir: string — Where to write the plugin (default: "plugins/platforms/zulip")
|
- output_dir: string — Where to write the plugin (default: "plugins/platforms/zulip")
|
||||||
- generation_goal: string — What to improve this generation (default: "fix bugs and improve reliability")
|
- generation_goal: string — What to improve this generation (default: "fix bugs and improve reliability")
|
||||||
|
|
||||||
|
## Continuity
|
||||||
|
|
||||||
|
The improvement cycle is **event-driven**, not just cron-based:
|
||||||
|
|
||||||
|
- **On check failure**: If any Success Criteria fails, wake immediately to fix
|
||||||
|
- **On user request**: `prose run build-zulip-plugin` — explicit upgrade
|
||||||
|
- **On new pattern**: If another plugin or agent reports a better pattern, wake to assimilate
|
||||||
|
- **Retrospective**: Every 24 hours if no other trigger fired — scan for subtle degradation
|
||||||
|
- **On first deploy**: Always run Generation 1 when no plugin exists yet
|
||||||
|
|
||||||
|
## Success Criteria (What Makes a Plugin "Good")
|
||||||
|
|
||||||
|
The plugin is considered GOOD when ALL of these pass:
|
||||||
|
|
||||||
|
### Connectivity
|
||||||
|
- plugin.connected == true — Establishes and maintains Zulip event queue
|
||||||
|
- plugin.reconnect_on_failure == true — Reconnects after queue expiry
|
||||||
|
- plugin.recovers_from_network_loss == true — Handles temporary network drops
|
||||||
|
|
||||||
|
### Message Flow
|
||||||
|
- dm_response_time_ms < 10000 — DMs get a response within 10 seconds
|
||||||
|
- stream_mention_detection == true — @mentions in streams are detected and routed
|
||||||
|
- all_bots_detection == true — @all-bots mentions are detected
|
||||||
|
- echo_loop_prevention == true — Never replies to its own messages
|
||||||
|
|
||||||
|
### Code Quality
|
||||||
|
- syntax_check == "pass" — All Python files are valid
|
||||||
|
- has_register_function == true — Exposes `register(ctx)` entry point
|
||||||
|
- plugin_yaml_valid == true — plugin.yaml parses correctly
|
||||||
|
- follows_base_adapter_pattern == true — Extends BasePlatformAdapter
|
||||||
|
|
||||||
|
### Reliability
|
||||||
|
- graceful_disconnect == true — shutdown doesn't crash
|
||||||
|
- handles_malformed_messages == true — Bad JSON doesn't kill the poll loop
|
||||||
|
- typing_indicators_work == true — Sends typing notifications
|
||||||
|
|
||||||
## Remembers
|
## Remembers
|
||||||
|
|
||||||
Each generation stores:
|
Each generation stores:
|
||||||
- What worked well (success patterns)
|
- What worked well (success patterns)
|
||||||
- What broke (failure modes)
|
- What broke (failure modes)
|
||||||
- What the user complained about (pain points)
|
- What the user complained about (pain points)
|
||||||
|
- Which Success Criteria passed and failed
|
||||||
|
|
||||||
## Generation Rules
|
## Generation Rules
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user