Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -880,3 +880,18 @@ orchestrator owns correlation, non-persisted preview, explicit revalidated
apply, deterministic replay identity, and dependency-order calls into the
existing Decision-family services. The CLI remains a parsing and rendering
surface.

## Authority-Aware Planner Context

`PlannerContextService.prepare()` is a read-only application use case for one
planner assessment. It coordinates five narrow reader ports for verified
repository metadata, a fixed current-document inventory, caller-selected Brain
Knowledge UUIDs, a fixed review inventory, and caller-supplied bounded
historical or frozen-release evidence. The returned immutable package always
contains its seven authority-labelled categories and never allows supporting or
historical evidence to override a verified live checkout.

The use case has no CLI, persistence model, writer port, cache, source
registry, filesystem discovery, prompt execution, semantic retrieval, or Brain
write. Current-source reads verify the supplied repository checkpoint before
and after reading; a mismatch produces no `CURRENT` assertion.
408 changes: 408 additions & 0 deletions docs/product/prd-authority-aware-planner-context-package.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/neural_engine/application/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from neural_engine.application.knowledge_service import KnowledgeService
from neural_engine.application.neural_doctor_service import NeuralDoctorService
from neural_engine.application.observation_service import ObservationService
from neural_engine.application.planner_context_service import PlannerContextService
from neural_engine.application.playbook_evaluation_service import (
PlaybookEvaluationService,
)
Expand Down Expand Up @@ -71,6 +72,7 @@
LocalDevelopmentEvidenceSource,
)
from neural_engine.infrastructure.local_neural_doctor_probe import LocalNeuralDoctorProbe
from neural_engine.infrastructure.local_planner_context_readers import LocalPlannerContextReaders


class Container:
Expand Down Expand Up @@ -102,6 +104,11 @@ def development_evidence_service(self) -> DevelopmentEvidenceService:
scoped.experience_service(),
)

def planner_context_service(self) -> PlannerContextService:
"""Build the bounded read-only planner-context use case (no CLI exposure)."""
readers = LocalPlannerContextReaders(self._resolved_paths())
return PlannerContextService(readers, readers, readers, readers, readers)

def decision_action_service(self) -> DecisionActionService:
paths = self._resolved_paths()
return DecisionActionService(
Expand Down
Loading