Skip to content

Commit 8c37759

Browse files
samrusaniSami Rusani
andauthored
B4: ship bridge packaging and smoke docs (#148)
Co-authored-by: Sami Rusani <sr@samirusani>
1 parent 8846c39 commit 8c37759

17 files changed

Lines changed: 779 additions & 193 deletions

BUILD_REPORT.md

Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,66 @@
11
# BUILD_REPORT
22

33
## sprint objective
4-
Implement Bridge Sprint 3 (`B3`) review queue + explainability scope:
5-
- ship `alice_review_queue`
6-
- ship `alice_review_apply`
7-
- support review actions (`approve`, `reject`, `edit-and-approve`, `supersede-existing`)
8-
- expose explanation/provenance rationale in review surfaces
9-
- verify deterministic recall/resume effects after approved review actions
4+
Deliver Bridge Sprint 4 (`B4`) closeout scope only: package and document the shipped bridge phase for external operators, publish recommended/fallback Hermes config guidance, strengthen bridge smoke validation evidence, and provide a one-command local demo path.
105

116
## completed work
12-
- Added MCP tool surface `alice_review_queue` with deterministic queue/detail behavior.
13-
- Added MCP tool surface `alice_review_apply` with B3 action vocabulary mapped to continuity correction semantics:
14-
- `approve` -> `confirm`
15-
- `edit-and-approve` -> `edit`
16-
- `reject` -> `delete`
17-
- `supersede-existing` -> `supersede`
18-
- Kept `alice_memory_review` and `alice_memory_correct` as compatibility aliases.
19-
- Extended continuity review serialization to include shared explanation records on review objects.
20-
- Added deterministic `proposal_rationale` to continuity explanation output.
21-
- Ensured explanation chain remains shared across review, recall, and resume paths.
22-
- Updated B3-scoped integration docs for MCP and Hermes memory-provider guidance.
23-
- Updated architecture status markers so B3 review surfaces are marked implemented and only B4 follow-up remains planned.
24-
- Updated control-doc truth checker markers to B3 active-sprint truth.
25-
- Updated B3 review evidence report (`REVIEW_REPORT.md`).
26-
- Added/updated sprint-owned tests for:
27-
- MCP tool surface and B3 names
28-
- action alias mapping and deterministic correction semantics
29-
- review queue explainability presence
30-
- recall exclusion after reject and recall/resume updates after supersede
7+
- Published canonical B4 operator guide: `docs/integrations/hermes-bridge-operator-guide.md`.
8+
- Published operator decision note: `docs/integrations/hermes-provider-plus-mcp-why.md`.
9+
- Published concrete Hermes `config.yaml` examples:
10+
- recommended path: `docs/integrations/examples/hermes-config.provider-plus-mcp.yaml`
11+
- fallback path: `docs/integrations/examples/hermes-config.mcp-only.yaml`
12+
- Updated in-scope integration docs (`README.md`, `hermes.md`, `hermes-memory-provider.md`, `mcp.md`, `hermes-skill-pack.md`) to align on:
13+
- recommended path: provider plus MCP
14+
- fallback path: MCP-only
15+
- migration path from MCP-only to provider plus MCP
16+
- one-command demo command: `./.venv/bin/python scripts/run_hermes_bridge_demo.py`
17+
- Strengthened `scripts/run_hermes_mcp_smoke.py` to validate bridge flow beyond recall/resume/open-loops by also validating B2/B3 capture and review operations (`alice_capture_candidates`, `alice_commit_captures`, `alice_review_queue`, `alice_review_apply`).
18+
- Added one-command demo helper: `scripts/run_hermes_bridge_demo.py`.
19+
- Added sprint-owned validation coverage for the demo helper: `tests/unit/test_hermes_bridge_demo.py`.
20+
- Updated `scripts/check_control_doc_truth.py` required markers to B4-active truth so the required verifier aligns with the active sprint packet.
21+
- Updated `REVIEW_REPORT.md` to grade against B4-specific acceptance criteria and evidence.
3122

3223
## incomplete work
33-
- None in B3 sprint scope.
24+
- None within B4 sprint scope.
3425

3526
## files changed
36-
- `ARCHITECTURE.md`
3727
- `PRODUCT_BRIEF.md`
3828
- `README.md`
3929
- `ROADMAP.md`
40-
- `apps/api/src/alicebot_api/continuity_explainability.py`
41-
- `apps/api/src/alicebot_api/continuity_review.py`
42-
- `apps/api/src/alicebot_api/contracts.py`
43-
- `apps/api/src/alicebot_api/mcp_tools.py`
44-
- `docs/integrations/mcp.md`
4530
- `docs/integrations/hermes-memory-provider.md`
31+
- `docs/integrations/hermes-skill-pack.md`
32+
- `docs/integrations/hermes.md`
33+
- `docs/integrations/mcp.md`
34+
- `docs/integrations/hermes-bridge-operator-guide.md`
35+
- `docs/integrations/hermes-provider-plus-mcp-why.md`
36+
- `docs/integrations/examples/hermes-config.provider-plus-mcp.yaml`
37+
- `docs/integrations/examples/hermes-config.mcp-only.yaml`
38+
- `scripts/run_hermes_mcp_smoke.py`
39+
- `scripts/run_hermes_bridge_demo.py`
4640
- `scripts/check_control_doc_truth.py`
47-
- `tests/unit/test_continuity_review.py`
48-
- `tests/unit/test_mcp.py`
49-
- `tests/integration/test_mcp_server.py`
41+
- `tests/unit/test_hermes_bridge_demo.py`
5042
- `REVIEW_REPORT.md`
5143
- `BUILD_REPORT.md`
5244

5345
## tests run
5446
- `python3 scripts/check_control_doc_truth.py`
5547
- Result: PASS
5648
- `./.venv/bin/python -m pytest tests/unit tests/integration -q`
57-
- Result: `1189 passed in 196.98s (0:03:16)` (latest re-run)
49+
- Result: `1191 passed in 187.48s (0:03:07)`
5850
- `./.venv/bin/python scripts/run_hermes_memory_provider_smoke.py`
5951
- Result: PASS
60-
- Evidence summary: single-external-provider enforcement message emitted; structural payload reports `single_external_enforced=true` and `bridge_status.ready=true`.
61-
- Local filesystem-specific path fields from script output were intentionally omitted for identifier hygiene.
52+
- Evidence summary: `bridge_status.ready=true`, `single_external_enforced=true`, provider registered.
53+
- `./.venv/bin/python scripts/run_hermes_mcp_smoke.py`
54+
- Result: PASS
55+
- Evidence summary: required Hermes MCP tools registered, `recall_items=2`, `open_loop_count=1`, `capture_candidate_count=2`, `capture_auto_saved_count=1`, `capture_review_queued_count=1`, `review_apply_resolved_action=confirm`.
56+
- `./.venv/bin/python scripts/run_hermes_bridge_demo.py`
57+
- Result: PASS
58+
- Evidence summary: `status=pass`, `recommended_path=provider_plus_mcp`, `fallback_path=mcp_only`.
6259

6360
## blockers/issues
64-
- No functional blockers.
65-
- No outstanding evidence or documentation blockers after alignment updates.
61+
- Initial run of `scripts/run_hermes_mcp_smoke.py` failed due local database schema lag and sandbox DB access restriction.
62+
- Resolved by applying local migrations (`./scripts/migrate.sh`) and rerunning smoke commands with local DB access available.
63+
- No remaining blockers.
6664

6765
## recommended next step
68-
Proceed to Bridge Sprint 4 (`B4`) packaging/docs/smoke closeout using the now-shipped B3 review queue/apply surfaces as baseline.
66+
Request B4 review against this evidence and, if approved, proceed with the single sprint PR for squash merge closeout.

PRODUCT_BRIEF.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Review-required:
7070
- low-confidence extractions
7171

7272
## Active Sprint Status
73-
Bridge Sprint 3 (`B3`) is now the active execution sprint. It is limited to review queue and explainability work on top of the shipped Hermes provider surface plus the `B1` and `B2` bridge foundations.
73+
Bridge Sprint 4 (`B4`) is now the active execution sprint. It is limited to packaging, docs, config examples, smoke validation, and local-demo closeout on top of the shipped `B1` through `B3` bridge foundations.
7474

7575
## Known Gaps To Resolve Before Build
7676
- Candidate scoring rubric and confidence calibration method are not specified.

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ Phase 11 is complete and shipped:
4141
- A bridge phase is now active: Hermes Auto-Capture
4242
- `B1` Hermes Provider Contract Foundation is shipped
4343
- `B2` Auto-Capture Pipeline is shipped
44-
- `B3` Review Queue + Explainability is the active sprint
44+
- `B3` Review Queue + Explainability is shipped
45+
- `B4` Packaging, Docs, and Smoke Validation is the active sprint
4546
- Historical planning and control docs: [docs/archive/planning/2026-04-08-context-compaction/README.md](docs/archive/planning/2026-04-08-context-compaction/README.md)
4647

4748
## Why Alice exists
@@ -217,20 +218,31 @@ This makes it straightforward to plug Alice into MCP-capable assistants and deve
217218

218219
See:
219220

221+
- [docs/integrations/hermes-bridge-operator-guide.md](docs/integrations/hermes-bridge-operator-guide.md)
222+
- [docs/integrations/hermes-provider-plus-mcp-why.md](docs/integrations/hermes-provider-plus-mcp-why.md)
220223
- [docs/integrations/mcp.md](docs/integrations/mcp.md)
221224
- [docs/integrations/hermes.md](docs/integrations/hermes.md)
222225
- [docs/integrations/hermes-memory-provider.md](docs/integrations/hermes-memory-provider.md)
223226
- [docs/integrations/hermes-skill-pack.md](docs/integrations/hermes-skill-pack.md)
224227
- [docs/integrations/phase11-local-provider-adapters.md](docs/integrations/phase11-local-provider-adapters.md)
225228
- [docs/integrations/phase11-azure-autogen.md](docs/integrations/phase11-azure-autogen.md)
226229

227-
Hermes runtime smoke test:
230+
Recommended Hermes architecture is provider plus MCP, with MCP-only as a fallback.
231+
232+
One-command Hermes bridge demo:
233+
234+
```bash
235+
./.venv/bin/python scripts/run_hermes_bridge_demo.py
236+
```
237+
238+
Hermes runtime smoke tests:
228239

229240
```bash
230-
./scripts/run_hermes_mcp_smoke.py
241+
./.venv/bin/python scripts/run_hermes_memory_provider_smoke.py
242+
./.venv/bin/python scripts/run_hermes_mcp_smoke.py
231243
```
232244

233-
If you use Hermes, Alice supports three integration modes: MCP, skill pack, and a first-class external memory provider for turn prefetch plus recall, resumption, and open-loop tools.
245+
If you use Hermes, run provider plus MCP as the recommended mode, add the skill pack for policy guidance, and keep MCP-only available as fallback.
234246

235247
## OpenClaw and imported workflows
236248

REVIEW_REPORT.md

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,54 @@
44
PASS
55

66
## criteria met
7-
- `alice_review_queue` is implemented and exposed on MCP.
8-
- `alice_review_apply` is implemented and exposed on MCP.
9-
- Required B3 review actions are supported through shipped surface semantics:
10-
- `approve` -> `confirm`
11-
- `edit-and-approve` -> `edit`
12-
- `reject` -> `delete`
13-
- `supersede-existing` -> `supersede`
14-
- Review payloads now include explainability/provenance chain data (`source_facts`, `evidence_segments`, `trust`, `supersession_notes`, `proposal_rationale`).
15-
- Approved review actions deterministically affect later recall/resume behavior (validated in integration flow using supersede).
16-
- Rejected review items are not treated as accepted continuity state (validated by recall exclusion after reject).
17-
- No local identifiers (local usernames/absolute machine paths) were found in changed code/docs/reports.
7+
- External-operator Hermes bridge documentation is complete and B4-specific via:
8+
- `docs/integrations/hermes-bridge-operator-guide.md`
9+
- `docs/integrations/hermes-provider-plus-mcp-why.md`
10+
- Provider-plus-MCP recommended architecture is documented clearly.
11+
- MCP-only fallback path is documented clearly.
12+
- MCP-only to provider-plus-MCP migration guidance is documented.
13+
- Example Hermes configs are present for both paths:
14+
- `docs/integrations/examples/hermes-config.provider-plus-mcp.yaml`
15+
- `docs/integrations/examples/hermes-config.mcp-only.yaml`
16+
- One-command local demo path is present and documented:
17+
- `./.venv/bin/python scripts/run_hermes_bridge_demo.py`
18+
- Smoke validation for the shipped bridge path passes:
19+
- provider smoke PASS
20+
- MCP smoke PASS (including B2/B3 capture/review flow checks)
21+
- bridge demo PASS
22+
- `BUILD_REPORT.md` now lists the exact sprint-owned changed files, including the previously omitted `PRODUCT_BRIEF.md` and `ROADMAP.md`.
23+
- No local identifiers (local machine paths/usernames) were found in changed docs/scripts/reports.
24+
- No B4 changes reopen B1/B2/B3 implementation scope or imply post-bridge scope.
1825

1926
## criteria missed
20-
- None functionally against B3 acceptance criteria.
27+
- None.
2128

2229
## quality issues
23-
- No blocking quality issues found in B3 scope.
30+
- No blocking quality issues found in B4 scope.
2431

2532
## regression risks
26-
- Low: MCP surface additions are additive, and targeted + full unit/integration suites pass.
27-
- Moderate-low: review queue objects now include full explanation payloads, increasing response size; monitor MCP client assumptions on payload size/shape.
33+
- Low: changes are primarily docs/config examples plus additive smoke/demo orchestration.
34+
- Moderate-low: expanded MCP smoke depends on local schema being migrated before execution.
2835

2936
## docs issues
30-
- None blocking. Architecture and build evidence alignment issues are fixed.
37+
- None blocking.
3138

3239
## should anything be added to RULES.md?
3340
- No required change.
3441

3542
## should anything update ARCHITECTURE.md?
36-
- No additional architecture changes required for B3.
43+
- No required architecture update for B4 closeout.
3744

3845
## recommended next action
39-
1. Approve B3 for merge.
40-
2. Start B4 packaging/docs/demo closeout.
46+
1. Proceed with sprint PR finalization and squash-merge flow.
47+
2. Keep the bridge demo command in release notes/operator handoff for external adopters.
4148

4249
## verification evidence checked
4350
- `python3 scripts/check_control_doc_truth.py` -> PASS
44-
- `./.venv/bin/python -m pytest tests/unit/test_continuity_review.py tests/unit/test_mcp.py tests/integration/test_mcp_server.py -q` -> `13 passed`
45-
- `./.venv/bin/python -m pytest tests/unit tests/integration -q` -> `1189 passed in 196.98s (0:03:16)`
51+
- `./.venv/bin/python -m pytest tests/unit tests/integration -q` -> `1191 passed in 187.48s (0:03:07)`
4652
- `./.venv/bin/python scripts/run_hermes_memory_provider_smoke.py` -> PASS
53+
- `./.venv/bin/python scripts/run_hermes_mcp_smoke.py` -> PASS
54+
- `./.venv/bin/python scripts/run_hermes_bridge_demo.py` -> PASS
55+
- Recommended path documented: `provider_plus_mcp`
56+
- Fallback path documented: `mcp_only`
57+
- Demo command documented: `./.venv/bin/python scripts/run_hermes_bridge_demo.py`

ROADMAP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
Phase 11 remains baseline truth and is not future scope.
99

1010
## Active Planning Status
11-
- Bridge Sprint 3 (`B3`) is the active execution sprint.
12-
- The remaining bridge-phase milestones are planned but not yet promoted.
11+
- Bridge Sprint 4 (`B4`) is the active execution sprint.
12+
- `B4` is the final planned bridge-phase sprint.
1313

1414
## Bridge Phase: Hermes Auto-Capture (Planned)
1515

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Fallback deployment shape when provider install is not available.
2+
# This keeps explicit MCP workflows, but no provider prefetch/capture hooks.
3+
memory:
4+
provider: builtin
5+
6+
mcp_servers:
7+
alice_core:
8+
command: "/path/to/alicebot/.venv/bin/python"
9+
args: ["-m", "alicebot_api.mcp_server"]
10+
env:
11+
DATABASE_URL: "postgresql://alicebot_app:alicebot_app@localhost:5432/alicebot"
12+
ALICEBOT_AUTH_USER_ID: "00000000-0000-0000-0000-000000000001"
13+
PYTHONPATH: "/path/to/alicebot/apps/api/src:/path/to/alicebot/workers"
14+
tools:
15+
include:
16+
- alice_recall
17+
- alice_resume
18+
- alice_open_loops
19+
- alice_review_queue
20+
- alice_review_apply
21+
resources: false
22+
prompts: false
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Recommended bridge deployment shape.
2+
# Keep the Alice memory provider active for always-on prefetch/capture,
3+
# and keep Alice MCP attached for explicit deep workflows.
4+
memory:
5+
provider: alice
6+
7+
mcp_servers:
8+
alice_core:
9+
command: "/path/to/alicebot/.venv/bin/python"
10+
args: ["-m", "alicebot_api.mcp_server"]
11+
env:
12+
DATABASE_URL: "postgresql://alicebot_app:alicebot_app@localhost:5432/alicebot"
13+
ALICEBOT_AUTH_USER_ID: "00000000-0000-0000-0000-000000000001"
14+
PYTHONPATH: "/path/to/alicebot/apps/api/src:/path/to/alicebot/workers"
15+
tools:
16+
include:
17+
- alice_recall
18+
- alice_resume
19+
- alice_open_loops
20+
- alice_review_queue
21+
- alice_review_apply
22+
- alice_explain
23+
resources: false
24+
prompts: false
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Hermes Bridge Operator Guide (B4)
2+
3+
This is the canonical operator guide for the shipped bridge phase.
4+
5+
Recommended deployment shape: **provider plus MCP**.
6+
7+
- Provider handles always-on prefetch and post-turn lifecycle hooks.
8+
- MCP handles explicit deep workflows (review, correction, explainability, targeted recall).
9+
10+
Use MCP-only as a fallback when provider install is temporarily blocked.
11+
12+
## Integration Modes
13+
14+
| Mode | Status | When to use | Tradeoff |
15+
|---|---|---|---|
16+
| Provider + MCP | Recommended | Default production/dev setup | Full bridge behavior with explicit deep actions |
17+
| MCP-only | Fallback | Provider plugin cannot be installed yet | No provider lifecycle hooks or automatic prefetch/capture |
18+
19+
## Config Examples (`~/.hermes/config.yaml`)
20+
21+
- Recommended mode: `docs/integrations/examples/hermes-config.provider-plus-mcp.yaml`
22+
- Fallback mode: `docs/integrations/examples/hermes-config.mcp-only.yaml`
23+
24+
### Recommended snippet (provider + MCP)
25+
26+
```yaml
27+
memory:
28+
provider: alice
29+
30+
mcp_servers:
31+
alice_core:
32+
command: "/path/to/alicebot/.venv/bin/python"
33+
args: ["-m", "alicebot_api.mcp_server"]
34+
```
35+
36+
### Fallback snippet (MCP-only)
37+
38+
```yaml
39+
memory:
40+
provider: builtin
41+
42+
mcp_servers:
43+
alice_core:
44+
command: "/path/to/alicebot/.venv/bin/python"
45+
args: ["-m", "alicebot_api.mcp_server"]
46+
```
47+
48+
## One-Command Local Demo
49+
50+
Run the bridge demo command from this repository:
51+
52+
```bash
53+
./.venv/bin/python scripts/run_hermes_bridge_demo.py
54+
```
55+
56+
Expected result:
57+
58+
- `status` is `pass`
59+
- `recommended_path` is `provider_plus_mcp`
60+
- `fallback_path` is `mcp_only`
61+
- provider smoke and MCP smoke steps both return `0`
62+
63+
## Validation Commands
64+
65+
Run these directly when you need independent evidence:
66+
67+
```bash
68+
./.venv/bin/python scripts/run_hermes_memory_provider_smoke.py
69+
./.venv/bin/python scripts/run_hermes_mcp_smoke.py
70+
```
71+
72+
## MCP-Only to Provider+MCP Migration
73+
74+
1. Keep your existing MCP block unchanged.
75+
2. Install the Alice provider plugin:
76+
77+
```bash
78+
./scripts/install_hermes_alice_memory_provider.py
79+
```
80+
81+
3. Run Hermes memory setup and select `alice`:
82+
83+
```bash
84+
hermes memory setup
85+
```
86+
87+
4. Set `memory.provider` to `alice` in `config.yaml`.
88+
5. Re-run the one-command demo:
89+
90+
```bash
91+
./.venv/bin/python scripts/run_hermes_bridge_demo.py
92+
```
93+
94+
6. Keep MCP enabled for explicit review/correction/explain workflows.
95+
96+
## Related Docs
97+
98+
- `docs/integrations/hermes-provider-plus-mcp-why.md`
99+
- `docs/integrations/hermes-memory-provider.md`
100+
- `docs/integrations/hermes.md`
101+
- `docs/integrations/hermes-skill-pack.md`

0 commit comments

Comments
 (0)