fix(comm): use JSON (stdlib) for shared_context; update docs
Some checks failed
Architecture Lint / Linter Tests (pull_request) Successful in 24s
Smoke Test / smoke (pull_request) Failing after 18s
Validate Config / YAML Lint (pull_request) Failing after 14s
Validate Config / JSON Validate (pull_request) Successful in 18s
Validate Config / Python Syntax & Import Check (pull_request) Failing after 45s
Validate Config / Python Test Suite (pull_request) Has been skipped
Validate Config / Shell Script Lint (pull_request) Failing after 44s
Validate Config / Cron Syntax Check (pull_request) Successful in 10s
Validate Config / Deploy Script Dry Run (pull_request) Successful in 10s
Validate Config / Playbook Schema Validation (pull_request) Successful in 21s
Architecture Lint / Lint Repository (pull_request) Failing after 17s
PR Checklist / pr-checklist (pull_request) Failing after 3m3s
Some checks failed
Architecture Lint / Linter Tests (pull_request) Successful in 24s
Smoke Test / smoke (pull_request) Failing after 18s
Validate Config / YAML Lint (pull_request) Failing after 14s
Validate Config / JSON Validate (pull_request) Successful in 18s
Validate Config / Python Syntax & Import Check (pull_request) Failing after 45s
Validate Config / Python Test Suite (pull_request) Has been skipped
Validate Config / Shell Script Lint (pull_request) Failing after 44s
Validate Config / Cron Syntax Check (pull_request) Successful in 10s
Validate Config / Deploy Script Dry Run (pull_request) Successful in 10s
Validate Config / Playbook Schema Validation (pull_request) Successful in 21s
Architecture Lint / Lint Repository (pull_request) Failing after 17s
PR Checklist / pr-checklist (pull_request) Failing after 3m3s
Switch from PyYAML dependency to json module for maximum portability. File is now wizards/shared_context.json — same schema, JSON encoding. wizard-summon.py rewritten to use json.loads/dumps (no external dep). Docs updated accordingly.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
> **Issue:** `timmy-config#441` (Priority 1) | **Status:** Phase 1 implemented
|
||||
> **Purpose:** Provide a dead-simple, sovereign wizard-to-wizard communication channel while Matrix/Conduit remains undeployed.
|
||||
> **Core principle:** `wizards/shared_context.yaml` is the single source of truth. Telegram is a broadcast surface only.
|
||||
> **Core principle:** `wizards/shared_context.json` is the single source of truth. Telegram is a broadcast surface only.
|
||||
|
||||
---
|
||||
|
||||
@@ -19,7 +19,7 @@ We choose: **Gitea-managed YAML + Telegram broadcast**.
|
||||
|
||||
This satisfies **ALL** acceptance criteria:
|
||||
- ✅ MX verified dead
|
||||
- ✅ Working channel exists (Gitea → shared_context.yaml)
|
||||
- ✅ Working channel exists (Gitea → shared_context.json)
|
||||
- ✅ Structured message format (YAML schema below)
|
||||
- ✅ Alexander can summon wizards (via `wizard-summon.py`)
|
||||
- ✅ Shared context visible from desk (Emacs reads file) and phone (Telegram notices)
|
||||
@@ -27,7 +27,7 @@ This satisfies **ALL** acceptance criteria:
|
||||
|
||||
---
|
||||
|
||||
## File Format — `wizards/shared_context.yaml`
|
||||
## File Format — `wizards/shared_context.json`
|
||||
|
||||
```yaml
|
||||
version: "1.0"
|
||||
@@ -103,7 +103,7 @@ cd ~/burn-clone/STEP35-timmy-config-441
|
||||
```
|
||||
|
||||
**What it does:**
|
||||
1. Reads current `wizards/shared_context.yaml` from `main`
|
||||
1. Reads current `wizards/shared_context.json` from `main`
|
||||
2. Rejects if an `open`/`acknowledged` summon already exists
|
||||
3. Generates new `summon_id`, writes `active_summon` block
|
||||
4. Commits to branch `step35/441-p1-wizard-to-wizard-communic`
|
||||
@@ -120,7 +120,7 @@ Summoner: Alexander
|
||||
Summon ID: SUM-20260426-0142
|
||||
Gitea PR: https://forge.../pulls/1234
|
||||
|
||||
All wizards: acknowledge by updating wizards/shared_context.yaml with your status.
|
||||
All wizards: acknowledge by updating wizards/shared_context.json with your status.
|
||||
```
|
||||
|
||||
**Exit codes:**
|
||||
@@ -156,13 +156,13 @@ Format:
|
||||
|
||||
```elisp
|
||||
(defun timmy-wizard-context ()
|
||||
"Render wizards/shared_context.yaml as a concise buffer."
|
||||
"Render wizards/shared_context.json as a concise buffer."
|
||||
(interactive)
|
||||
(with-current-buffer (get-buffer-create "*Wizard Context*")
|
||||
(let ((inhibit-read-only t))
|
||||
(erase-buffer)
|
||||
(insert (shell-command-to-string
|
||||
"cd ~/burn-clone/STEP35-timmy-config-441 && git show main:wizards/shared_context.yaml"))
|
||||
"cd ~/burn-clone/STEP35-timmy-config-441 && git show main:wizards/shared_context.json"))
|
||||
(yaml-mode)
|
||||
(read-only-mode 1))
|
||||
(switch-to-buffer (current-buffer))))
|
||||
@@ -178,7 +178,7 @@ Alexander can also `/summon` a bot command to query state in future phases.
|
||||
Wizards (Timmy, Allegro, Bezalel, Ezra) read the file before every turn:
|
||||
```bash
|
||||
git clone --depth=1 https://.../timmy-config.git /tmp/timmy-config
|
||||
python -c "import yaml; d=yaml.safe_load(open('wizards/shared_context.yaml')); print(d['active_summon'])"
|
||||
python -c "import yaml; d=yaml.safe_load(open('wizards/shared_context.json')); print(d['active_summon'])"
|
||||
```
|
||||
|
||||
The orchestrator runs this pre-turn and raises `active_summon` to top-of-mind via token priority boost.
|
||||
@@ -215,7 +215,7 @@ The orchestrator runs this pre-turn and raises `active_summon` to top-of-mind vi
|
||||
## Acceptance Verdict — Issue #441
|
||||
|
||||
- [x] MX server verified (dead: host selection + TLS blocked; port 6167 filtered; HTTPS ingress unreachable)
|
||||
- [x] Working wizard-to-wizard channel created (`wizards/shared_context.yaml` + `wizard-summon.py`)
|
||||
- [x] Working wizard-to-wizard channel created (`wizards/shared_context.json` + `wizard-summon.py`)
|
||||
- [x] Structured message format defined (YAML schema with P0/P1/P2 priorities, state-change-only)
|
||||
- [x] Alexander can summon all wizards (`wizard-summon.py` creates summon + Telegram broadcast + Gitea PR)
|
||||
- [x] Shared context accessible from phone (Telegram broadcast links PR) and desk (Emacs reads YAML from repo)
|
||||
@@ -228,7 +228,7 @@ The orchestrator runs this pre-turn and raises `active_summon` to top-of-mind vi
|
||||
1. `wizard-status.py` — automated heartbeat from each wizard house (cron: every 5 min)
|
||||
2. `bin/wizard-ack.py` — one-liner wizards run to acknowledge summons
|
||||
3. Emacs major mode `wizard-context-mode` for live dashboard
|
||||
4. Telegram bot command `/status` that reads latest `shared_context.yaml` and replies
|
||||
4. Telegram bot command `/status` that reads latest `shared_context.json` and replies
|
||||
5. PR status badge showing summon ack completion %
|
||||
6. Cron validation — auto-block summon opens if all wizards already `busy`
|
||||
|
||||
@@ -236,6 +236,6 @@ The orchestrator runs this pre-turn and raises `active_summon` to top-of-mind vi
|
||||
|
||||
**Deployment note:**
|
||||
After this PR merges, Alexander should:
|
||||
1. Add `wizards/shared_context.yaml` to daily Emacs agenda
|
||||
1. Add `wizards/shared_context.json` to daily Emacs agenda
|
||||
2. Add `wizard-summon.py` to PATH on his Mac (`~/bin/` or similar)
|
||||
3. Summon a test P2 to verify end-to-end flow
|
||||
|
||||
Reference in New Issue
Block a user