generated from coulomb/repo-seed
Add Makefile targets to install and verify phase-memory with warden.
install-all uses uv tool install --with-editable for sibling phase-memory. check-memory and verify-memory confirm warden can load experiential memory.
This commit is contained in:
@@ -180,8 +180,8 @@ Episodes are recorded automatically unless `WARDEN_MEMORY=0`.
|
||||
**Worker:** `warden worker run --brain llm` skips OpenRouter when stabilized
|
||||
routing memory matches. See `wiki/OpsWardenMemory.md`.
|
||||
|
||||
Requires `phase-memory` on `PYTHONPATH` or installed; contract in
|
||||
`phase-memory/docs/ops-warden-memory-contract.md`.
|
||||
Install bundled memory: `make install-all` then `make check-memory` from
|
||||
`~/ops-warden`. Contract: `phase-memory/docs/ops-warden-memory-contract.md`.
|
||||
|
||||
---
|
||||
|
||||
|
||||
49
Makefile
Normal file
49
Makefile
Normal file
@@ -0,0 +1,49 @@
|
||||
# ops-warden development and install targets
|
||||
ROOT := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||
PHASE_MEMORY_REPO ?= $(abspath $(ROOT)/../phase-memory)
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
.PHONY: help sync install install-warden install-memory install-all check-memory verify-memory test lint
|
||||
|
||||
help:
|
||||
@echo "ops-warden make targets"
|
||||
@echo ""
|
||||
@echo " make sync # uv sync (dev dependencies)"
|
||||
@echo " make install # install warden CLI (SSH only, no phase-memory)"
|
||||
@echo " make install-memory # reinstall warden with editable phase-memory"
|
||||
@echo " make install-all # sync + warden + phase-memory (recommended)"
|
||||
@echo " make check-memory # fail unless phase-memory is importable by warden"
|
||||
@echo " make verify-memory # check-memory + warden memory status"
|
||||
@echo " make test # unit tests"
|
||||
@echo " make lint # ruff check"
|
||||
@echo ""
|
||||
@echo "Override phase-memory path: make install-all PHASE_MEMORY_REPO=/path/to/phase-memory"
|
||||
|
||||
sync:
|
||||
uv sync
|
||||
|
||||
install-warden:
|
||||
uv tool install . --force
|
||||
|
||||
install-memory:
|
||||
@test -d "$(PHASE_MEMORY_REPO)" || (echo "ERROR: phase-memory not found at $(PHASE_MEMORY_REPO). Clone it or set PHASE_MEMORY_REPO."; exit 1)
|
||||
@test -f "$(PHASE_MEMORY_REPO)/pyproject.toml" || (echo "ERROR: $(PHASE_MEMORY_REPO) is not a phase-memory checkout."; exit 1)
|
||||
uv tool install . --with-editable "$(PHASE_MEMORY_REPO)" --force
|
||||
|
||||
install: install-warden
|
||||
|
||||
install-all: sync install-memory
|
||||
|
||||
check-memory:
|
||||
@warden memory status --json >/dev/null 2>&1 || (echo "ERROR: phase-memory is not available to warden. Run: make install-memory"; exit 1)
|
||||
@echo "phase-memory: ok (warden memory status succeeded)"
|
||||
|
||||
verify-memory: check-memory
|
||||
@warden memory status
|
||||
|
||||
test:
|
||||
PYTHONPATH=src:$(PHASE_MEMORY_REPO)/src uv run pytest
|
||||
|
||||
lint:
|
||||
uv run ruff check .
|
||||
27
README.md
27
README.md
@@ -11,9 +11,24 @@ Latest gap analysis: `history/2026-06-17-post-wp0007-reassessment.md`.
|
||||
|
||||
## Install
|
||||
|
||||
**Recommended** (warden + experiential memory for route/worker/agent sessions):
|
||||
|
||||
```bash
|
||||
make install-all
|
||||
make verify-memory
|
||||
```
|
||||
|
||||
SSH-only install (no phase-memory):
|
||||
|
||||
```bash
|
||||
make install
|
||||
```
|
||||
|
||||
Manual equivalent:
|
||||
|
||||
```bash
|
||||
uv sync
|
||||
uv tool install .
|
||||
uv tool install . --with-editable ../phase-memory --force
|
||||
```
|
||||
|
||||
Or run without installing:
|
||||
@@ -22,6 +37,10 @@ Or run without installing:
|
||||
uv run warden --help
|
||||
```
|
||||
|
||||
phase-memory must be a sibling checkout at `../phase-memory` by default, or set
|
||||
`PHASE_MEMORY_REPO` when running make. Opt out of memory at runtime with
|
||||
`WARDEN_MEMORY=0`.
|
||||
|
||||
## Quick start (local backend)
|
||||
|
||||
```bash
|
||||
@@ -58,10 +77,10 @@ Full role and examples: `wiki/AccessRouting.md`.
|
||||
## Development
|
||||
|
||||
```bash
|
||||
uv sync
|
||||
uv run pytest # unit tests (integration excluded)
|
||||
make install-all
|
||||
make test
|
||||
make lint
|
||||
uv run pytest -m integration # requires ssh-keygen in PATH
|
||||
uv run ruff check .
|
||||
```
|
||||
|
||||
## Key paths
|
||||
|
||||
@@ -7,7 +7,8 @@ from typing import Any, Mapping, Optional
|
||||
|
||||
_PHASE_MEMORY_ERROR = (
|
||||
"phase-memory is required for warden memory commands. "
|
||||
"Install with: pip install phase-memory (or set PYTHONPATH to phase-memory/src)."
|
||||
"From ~/ops-warden run: make install-memory (or make install-all). "
|
||||
"Dev fallback: PYTHONPATH=../phase-memory/src"
|
||||
)
|
||||
|
||||
# In-process cache: implicit activation is default; no separate `warden memory activate`
|
||||
|
||||
Reference in New Issue
Block a user