docs: self-update contract — Gen 6 postconditions, status clarification, state persistence
PR Pipeline — Authorize → Validate → Review → Merge / auth (push) Successful in 7s
PR Pipeline — Authorize → Validate → Review → Merge / validate (push) Failing after 2s
PR Pipeline — Authorize → Validate → Review → Merge / lint (push) Has been skipped
PR Pipeline — Authorize → Validate → Review → Merge / ai-review (push) Has been skipped
PR Pipeline — Authorize → Validate → Review → Merge / gate (push) Has been skipped

- Added stream_subscription_check, dm_response_time_offline_verifiable, known_issues_tracked postconditions
- Added 'Status' section clarifying active for Hermes agents only (not retired with pi Zulip)
- Added 'State Persistence' section with KG node schema for build-zulip-plugin:state
- Execution step 4: always run offline tests (simulate_dm_latency, selftest)
- Execution step 5: update KG state node after each generation
This commit is contained in:
root
2026-07-07 07:18:45 +00:00
parent 41ef546d21
commit b1ef4cbe9b
+28 -3
View File
@@ -21,9 +21,11 @@ description: >
- connected == true — Establishes and maintains Zulip event queue
- reconnect_on_failure == true — Reconnects after queue expiry
- recovers_from_network_loss == true — Handles temporary network drops
- stream_subscription_check == true — Bot is subscribed to primary streams (Gen 5+)
*Message Flow*
- dm_response_time_ms < 10000 — DMs get a response within 10 seconds
- dm_response_time_offline_verifiable == true — simulate_dm_latency() passes without live Zulip (Gen 6+)
- 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
@@ -38,6 +40,14 @@ description: >
- 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
- known_issues_tracked == true — add_known_issue() persists problems across generations (Gen 6+)
## Status
**Active** — for Hermes agents only. This plugin is NOT retired. It remains in service
for any Hermes agent that connects to Zulip (Mumuni, Tanko, Koby, Koonimo). The pi
Zulip extension was decommissioned 2026-07-04 but this contract targets the Hermes
plugin system, which is unaffected.
## Parameters
@@ -90,13 +100,28 @@ Each generation stores:
## Execution
1. **Read state** — Check previous generations from knowledge graph
1. **Read state** — Check previous generations from knowledge graph node `build-zulip-plugin:state`
2. **Generate or improve** — Based on generation count:
- Generation 1: Scaffold full plugin from scratch
- Generation N: Read previous code, apply improvements
3. **Validate** — Syntax check, structure check, dependency check
4. **Log** — Save generation result to knowledge graph as [LEARN]
5. **Report**Output what was generated, what changed, what needs review
4. **Run offline tests** — Always run `simulate_dm_latency()` and selftest() if no live Zulip
5. **Log**Save generation result to knowledge graph as [LEARN] node. Update the
`build-zulip-plugin:state` node with current generation_count, plugin_version,
and known_issues.
6. **Report** — Output what was generated, what changed, what needs review
## State Persistence (Gen 6+)
All generation state is stored in a knowledge graph node titled `build-zulip-plugin:state`:
- `generation_count` — incremented on each verified run
- `plugin_version` — current version string
- `last_generation` — ISO timestamp of most recent run
- `known_issues` — array of unresolved issues carried forward
- `last_postcondition_results` — pass/fail map from most recent verification
Agents executing this contract MUST read this node on startup and update it after
validation. If the node does not exist, create it with generation_count=1.
## Example Output