Feat/v0.13.0 (#270)

* feat(release): add release-manager feature flag (default off)

* feat(release): change classification + semver-bump derivation

* feat(release): readiness audit (changelog/version-ref/docs/migration/gate)

* feat(release): release-manager engine proposes a gated release

* feat(release): fail-closed release executor (bump, gate, publish)

* feat(release): CEO approve/reject release-proposal surface

* docs(release): document the gated release manager

* feat(memory): add org-memory feature flags (default off)

* feat(memory): add playbooks table + status enum + migration

* feat(memory): playbook service with auditor curation transitions

* feat(memory): playbooks RAG index plugin

* feat(memory): index a playbook into RAG on approval

* feat(memory): distill a high-signal lesson at task completion

* feat(memory): keep private journal reflections out of the shared RAG corpus

* feat(memory): draft_playbook verb + auditor curation verbs

* fix(ci): resolve mypy tests/ errors blocking the gate (UUID casts, annotations)

* feat(memory): auto-inject similar lessons/playbooks into the briefing

* feat(memory): auditor playbook review queue (api + panel)

* docs(memory): document the org-memory loop + playbook verbs

* fix(provisioning): idempotent pitch provisioning (reuse product/project by slug on re-approval)

* fix(memory): add chunks_playbooks to the chunk schema + isolate release route tests

- Migration 030's CHUNK_TABLES was missing chunks_playbooks, breaking the
  IndexType<->migration parity guard once the PLAYBOOKS index landed. The
  upgrade is ALTER ... IF EXISTS so adding it is safe on any DB shape.
- The release-route fixture's approve/reject paths call db.commit() (real
  behavior), so a held proposal outlived the per-test rollback and leaked
  into engine tests that read the global list_open_release_proposals().
  Tear down source=release_manager rows after each test.
- Make the gather_snapshot real-repo smoke version-agnostic (semver match)
  so it stops pinning the literal repo version.

* chore(release): 0.13.0

* ++

---------

Co-authored-by: Renn F <rennf93@users.noreply.github.com>
This commit is contained in:
Renzo F
2026-06-26 01:43:08 +02:00
committed by GitHub
co-authored by Renn F
parent 153723406e
commit 5612375cba
87 changed files with 5032 additions and 91 deletions
@@ -36,6 +36,7 @@ from roboco.services.gateway.evidence_builder import (
build_context_briefing,
build_evidence_for_task,
build_task_handoff,
shape_memory_query,
)
from roboco.services.gateway.merge_chain import resolve_parent_branch
from roboco.services.gateway.remediation import (
@@ -832,6 +833,11 @@ class Choreographer:
company_goals=await repo.company_goals(),
)
briefing = build_context_briefing(inputs)
memory = await self._institutional_memory(agent_id, task)
if memory:
# "What the company already knows about work like this" — distilled
# lessons + approved playbooks, pushed so the agent never has to ask.
briefing = {**briefing, "institutional_memory": memory}
if include_ac_coverage and task_id is not None:
coverage = await self.task.parent_ac_coverage(task_id)
if coverage:
@@ -848,6 +854,35 @@ class Choreographer:
}
return briefing
async def _institutional_memory(
self, agent_id: UUID, task: Any | None
) -> list[dict[str, Any]]:
"""Org-memory keystone: top-K relevant past lessons/playbooks for this
claim, role-shaped and relevance-floored. Empty unless
``org_memory_enabled`` and a task is in hand (nothing to query on
otherwise). Best-effort never breaks the briefing."""
from roboco.config import settings as _settings
if not _settings.org_memory_enabled or task is None:
return []
agent = await self.task.agent_for(agent_id)
role = str(agent.role) if agent is not None else ""
title = str(getattr(task, "title", "") or "")
raw_type = getattr(task, "task_type", None)
if raw_type is None:
task_type = ""
elif hasattr(raw_type, "value"):
task_type = str(raw_type.value)
else:
task_type = str(raw_type)
query = shape_memory_query(role, title, task_type)
memory: list[dict[str, Any]] = await self._deps.evidence_repo.similar_memory(
query=query,
top_k=_settings.org_memory_top_k,
min_score=_settings.org_memory_min_score,
)
return memory
# PM coordinator roles plan + delegate many roots in parallel; the actual
# work then runs in the delegated children/cells, not in the PM's own hands.
# So the single-active-task concurrency invariants (already_active / paused)