Skip to content

Commit e908571

Browse files
docs: add OpenGrimoire clarification queue documentation and enhance existing files
Introduced `OPENGRIMOIRE_CLARIFICATION_BRIDGE.md` to document the integration of OpenGrimoire with OpenHarness for async agent-human interactions. Updated `AGENT_ENTRY.md` to reference this new documentation and clarify UUID usage. Enhanced `CHEATSHEET.md` with additional context for the `build_brain_map.py` script, indicating its minimal harness copy usage and alternative paths. Added a portfolio index reference in the GUI audit documentation for better navigation.
1 parent 1483ac0 commit e908571

5 files changed

Lines changed: 52 additions & 1 deletion

File tree

docs/AGENT_ENTRY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535

3636
---
3737

38+
## 3b. OpenGrimoire clarification queue (optional)
39+
40+
If you use **OpenGrimoire** (OpenAtlas) for async agent→human questions, stable UUIDs and handoff conventions live in **[`OPENGRIMOIRE_CLARIFICATION_BRIDGE.md`](./OPENGRIMOIRE_CLARIFICATION_BRIDGE.md)**. OpenHarness does not host this API; it is the join key between harness runs and Grimoire.
41+
3842
## 4. State on disk
3943

4044
**[`state/`](../state/)** — Schema and files agents and humans share: `handoff_latest.md`, `decision-log.md`, `continue_prompt.txt`, `daily/`, etc. Read **[`state/README.md`](../state/README.md)** for layout. After a handoff, load **handoff****preferences****rejection_log** as in CHEATSHEET **Memory load order**.

docs/CHEATSHEET.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Use this table for **action parity** with humans (same script, agent via `run_te
3838
| `copy_continue_prompt.ps1` / `copy_continue_prompt.sh` / `copy_continue_prompt.cmd` | Copy continue prompt to clipboard | `.\scripts\copy_continue_prompt.ps1` (Windows), `./scripts/copy_continue_prompt.sh`, or `scripts\copy_continue_prompt.cmd` |
3939
| `validate_handoff_scp.py` | Validate `handoff_latest` against SCP rules | `python scripts/validate_handoff_scp.py` |
4040
| `sanitize_input.py` | Sanitize handoff/state before commit | Usually via pre-commit; `python scripts/sanitize_input.py` |
41-
| `build_brain_map.py` | Build brain-map JSON from cursor state | `python scripts/build_brain_map.py` (set `CURSOR_STATE_DIR` / `CURSOR_STATE_DIRS` as in README) |
41+
| `build_brain_map.py` | Build brain-map JSON from cursor state (minimal harness copy) | `python scripts/build_brain_map.py` (set `CURSOR_STATE_DIR` / `CURSOR_STATE_DIRS` as in README). **OpenGrimoire / multi-root / vaults:** use sibling **MiscRepos** [`../../MiscRepos/.cursor/scripts/build_brain_map.py`](../../MiscRepos/.cursor/scripts/build_brain_map.py) instead. |
4242
| `verify_canonical_bundle.ps1` | Verify pinned bundle hashes | `.\scripts\verify_canonical_bundle.ps1` |
4343
| `update_canonical_bundle_hashes.ps1` | Regenerate `docs/canonical-bundle.sha256` after bundle edits | `.\scripts\update_canonical_bundle_hashes.ps1` |
4444
| `check_docs_portfolio_links.py` | Verify `docs/**/*.md` links to sibling `portfolio-harness` | `python scripts/check_docs_portfolio_links.py` |
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# OpenGrimoire clarification queue ↔ OpenHarness
2+
3+
**Purpose:** Correlate **async human answers** to **agent runs** using stable UUIDs from OpenGrimoire (OpenAtlas app).
4+
5+
## Stable identifier
6+
7+
When an agent creates a clarification request via `POST /api/clarification-requests`, the response includes `item.id` (UUID). Treat this as the canonical join key.
8+
9+
## Handoff convention
10+
11+
In `.cursor/state/handoff_latest.md` or session notes (reference only — not executable):
12+
13+
```text
14+
OPENGRIMOIRE_CLARIFICATION_ID=<uuid>
15+
OPENGRIMOIRE_BASE_URL=https://your-host (default local: http://localhost:3001)
16+
```
17+
18+
Poll until `item.status` is `answered` or `superseded`:
19+
20+
`GET /api/clarification-requests/<uuid>` with:
21+
22+
- **`x-clarification-queue-key`** when OpenGrimoire has **`CLARIFICATION_QUEUE_API_SECRET`** set (recommended for production harnesses that only poll clarification — smaller blast radius than the alignment key), or
23+
- **`x-alignment-context-key`** when using **`ALIGNMENT_CONTEXT_API_SECRET`** and no dedicated clarification secret (same key gates alignment + clarification).
24+
25+
## Optional script
26+
27+
If the OpenGrimoire repo is checked out, use:
28+
29+
`node scripts/poll-clarification.mjs <uuid>`
30+
31+
(from the OpenAtlas/OpenGrimoire repo root; set **`CLARIFICATION_QUEUE_API_SECRET`** in the environment for the script to send **`x-clarification-queue-key`**, else **`ALIGNMENT_CONTEXT_API_SECRET`** for **`x-alignment-context-key`** — see script header).
32+
33+
## Normative API doc
34+
35+
In your OpenGrimoire (OpenAtlas) clone: `docs/agent/CLARIFICATION_QUEUE_API.md`.
36+
37+
## Distinction
38+
39+
- **OpenHarness:** patterns, state schema, handoff — no clarification HTTP API.
40+
- **OpenGrimoire:** persistence and operator UI for the queue (`/admin/clarification-queue`).

docs/audit/gui-2026-03-26.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# GUI audit — OpenHarness
22

3+
**Portfolio index (sibling repo audits):** [MiscRepos `GUI_AUDIT_PORTFOLIO_INDEX.md`](../../MiscRepos/docs/audit/GUI_AUDIT_PORTFOLIO_INDEX.md).
4+
35
**Date:** 2026-03-26
46
**Mode:** Read-only audit
57

scripts/build_brain_map.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
"""
77
Build brain-map-graph.json from Harness state sources.
88
9+
**Portfolio / OpenGrimoire:** A richer sibling script lives at
10+
``MiscRepos/.cursor/scripts/build_brain_map.py`` (multi-root ``CURSOR_STATE_DIRS``,
11+
vault roots, SCP, default output to ``OpenAtlas/public/brain-map-graph.local.json``).
12+
Use this file only for minimal OpenHarness-only trees.
13+
914
Sources:
1015
- state/daily/YYYY-MM-DD.md (or .cursor/state/daily/)
1116
- state/handoff_latest.md

0 commit comments

Comments
 (0)