Current Truth
As of the latest validated state, Luna has moved beyond Phase 7 readiness.
Current completed/emerging capabilities: - Phase 6 operationalization is materially complete: governed skills, bounded Discord session context, natural-language self-context retrieval, and governed memory are implemented. - The first governed live Tinker bridge now exists: Tinker proposes PatchArtifact v1, Lich gates approval, Kunkka applies deterministically, and Roshan validates results. All steps are bounded, artifact-backed, and approval-mediated. - This bridge supersedes the prior full-disable posture for live execution. Execution is now possible only inside explicit governance boundaries. - Direct mutation via Tinker remains available as a fallback but is no longer the preferred path.
Evolved Execution Substrate (Kunkka Integration):
- Kunkka (Patch Executor v1) is the primary deterministic anchored patch applier.
- Tinker operates in proposal-only mode when using the tinker_patch executor path.
- PatchArtifact v1 is the canonical structured mutation format.
- Kunkka enforces: allowed_write_paths, path safety, anchor validation, ambiguity rejection, no-op rejection, and deterministic before/after sha256 recording.
Core Philosophical Evolution: - Safety is achieved through governance + deterministic execution, not through command syntax or rigid prefixes. - The interaction model has transitioned from regex command routing toward governed conversational operations while preserving all Lich approval gates and bounded execution guarantees.
Current hard limits: - Broad, unrestricted, or autonomous execution outside governed flows remains disabled. - Arbitrary shell execution remains blocked. - Network access remains blocked. - Recursive autonomous loops remain blocked. - Broad filesystem mutation remains blocked. - Discord does not own execution semantics. - Approval governance routes exclusively through Lich (see LICH_INTEGRATION_DESIGN.md).
Current next priority: Move from tiny governed patch execution toward reviewed multi-operation and multi-file patch workflows, while preserving activation gates, permission grants, sandbox policies, rollback evidence, validation contracts, and artifact receipts.
Luna Master Roadmap
Current Strategic Position
Luna is transitioning from architecture construction into operational coherence.
The governance/control substrate is now mature enough to support future governed autonomy. Bounded, approval-mediated execution via the Tinker → Lich → Kunkka → Roshan flow is operational. Broad or unrestricted autonomous execution remains disabled.
Roadmap Status
| Phase | Name | Status |
|---|---|---|
| Phase 0 | Runtime foundation | Complete |
| Phase 1 | Standalone subsystem ecosystem | Complete |
| Phase 2 | Governed artifact control plane | Complete |
| Phase 3 | Local orchestration substrate | Complete |
| Phase 4 | Live integration boundary prep | Complete |
| Phase 5 | Live adapter readiness | Complete |
| Phase 6 | Operationalization layer | Mostly complete / active hardening |
| Phase 7 | First governed live Tinker bridge | Active / first bridge implemented |
| Phase 8 | Governed memory + retrieval | Active |
| Phase 9 | Retention/archive lifecycle | Active |
| Phase 10 | Proactive + scheduled operations | Future |
| Phase 11 | Personal knowledge ingestion | Future |
| Phase 12 | Autonomous-but-audited operation | Long-term (superseded direction; current emphasis is on governed conversational operations and deterministic execution) |
Evolved Roadmap Hierarchy (Governance-First)
The roadmap is reorganized around foundational layers before any autonomy considerations:
Foundational Layers (Current Priority): - Governance (Lich approval gating, governance_decisions.jsonl, approval-native UX) - Deterministic Execution (Kunkka Patch Executor, PatchArtifact v1, bounded Roshan execution) - Replayability & Inspectability (artifact persistence, sha256 recording, forensic replay) - Policy-Native Orchestration (path safety, allowed_write_paths, fail-closed behavior)
Interaction Evolution Layers: - Conversational Governance (proposal-native interaction, contextual continuation, approval-mediated workflows) - Intent Inference + Proposal Generation (moving away from rigid regex routing) - Async Operational Lifecycle (deferred execution, non-blocking long-running operations)
This structure ensures safety originates from governance and deterministic boundaries rather than command syntax.
Current State by Subsystem
luna-interop
Status: Mature governed control plane.
Capabilities: - append-only artifact bus - canonical schemas - graph and lineage inspection - governance readiness reporting - promotion records - executor trust artifacts - orchestration goals and work orders - validation contracts and validation results - escalation decisions - bridge manifests - adapter contracts - integration gates - Tinker live-adapter readiness - sandbox policy - runtime activation requests and decisions - rollback plans - simulated execution - forensic replay and reporting
Important constraint: Live execution is enabled only through tightly governed, sandboxed, artifact-backed Tinker bridge flows. Broad autonomous execution remains blocked.
Kunkka (Deterministic Patch Executor)
Status: Implemented and validated (app/patch_executor.py + 18 tests).
Core Role:
- Primary deterministic anchored mutation substrate for governed operations.
- Enforces PatchArtifact v1 format exclusively when using tinker_patch executor mode.
- Provides path safety, anchor validation, ambiguity/no-op rejection, before/after sha256, and backup creation.
Relationship to other components: - Tinker → proposes PatchArtifact JSON only (proposal mode). - Kunkka → validates and applies deterministically. - Roshan → performs post-apply validation. - Lich → gates approval before Kunkka execution.
This replaces direct Tinker mutation as the preferred path for structured, replayable changes.
discord-luna
Status: Thin transport layer with bounded session context manager implemented.
Current constraints: - Discord remains transport-thin - session memory is bounded and isolated - no long-term memory promotion from Discord turns - governed long-term memory logic belongs in luna-interop or luna-tools style modules, not transport code
luna-skills
Status: Governance-aware operational skill library is implemented.
Available operational skill coverage: - governance-review - deterministic-patch-planning - validation-discipline - artifact-chain-integrity - safe-local-execution - governed-research-intake - memory-promotion-review - retention-archive-management - repo-inspection - safe-refactor - test-expansion - documentation-synchronization - incident-review - executor-trust-calibration - retrieval-grounding
Phase 6 — Operationalization Layer
Phase 6 is mostly complete, with governed operational skills, bounded Discord session context, natural-language self-context retrieval, and governed memory implemented.
Purpose: Make Luna usable, coherent, and operationally grounded before enabling live autonomous execution.
Phase 6A — Governed Operational Skills
Status: Complete.
Goal: Populate luna-skills with reusable governance-aware operational skills.
Why it matters: Skills turn Luna's architecture principles into repeatable operating behavior.
Phase 6B — Discord Session Context Manager
Status: Complete.
Goal: Fix immediate context loss in Discord.
Requirements: - rolling session memory - channel/thread isolation - reset command - status command - bounded deterministic context window - no long-term memory promotion yet
Phase 6C — Core Runtime Context Tools
Status: Implemented (additive extension to context_retrieval.py).
Goal: Give Luna read-only awareness of runtime context via deterministic intent routing to fixed allowlisted sources.
Implemented capabilities (routed through existing retrieve_luna_context): - environment_status - runtime_identity - clock_tool - session_metadata - service_health_summary - context_source_status
Important principle: Awareness before authority. All retrieval remains request-scoped, bounded, read-only, fail-closed. No state mutation. Preserves retrieval_mutates_runtime = False.
Phase 6D — Operational Awareness Layer
Status: Implemented (additive extension).
Goal: Enable request-scoped awareness of service/container health, degraded vs healthy state, tool/retrieval availability, pending restart conditions, runtime limitations, and confidence/unknown-state indicators. Strictly read-only summarization into context; no monitoring, no daemons, no execution.
Capabilities added (Phase 6D complete): - service_health_summary - container_health_snapshot - repo_status_summary - update_status_summary - runtime_limitations_summary - context_source_status - operational_degraded_state_summary
Implemented as pure additive helpers in context_retrieval.py. All request-scoped, read-only, bounded, fail-closed, using only governed luna-tools paths. Natural language queries ("Are your services healthy?", "What maintenance do you need?", "Are you degraded?", "What context sources can you see?") now grounded in authoritative docs. No new execution paths. Roadmap state updated 2025.
Phase 6E — Task Continuity Layer
Status: Implemented (additive extension, Phase 6E complete).
Goal: Provide governed, request-scoped continuity across sessions so Luna can coherently answer what it is doing, what recently happened, what its capabilities/skills are, what checkpoint is current, what task is active — all without autonomy, mutation, or background execution.
Capabilities added: - current_task_summary, latest_checkpoint_summary - capabilities_summary, skills_summary - active_work_summary, recent_activity_summary (success vs degraded) - task_continuity_summary, retrieve_task_continuity - Deterministic "continuity" intent classification
All via fixed allowlisted sources only (current_task, checkpoint.md, luna_capabilities.md, luna_state.md). Bounded, fail-closed, fully compatible with existing retrieval and inject flows. Natural prompts now grounded. No new authority.
Intent detection strengthened with expanded self-state term groups and priority ordering so Luna-specific queries about time, tools, limitations, operational state, and recent activity reliably trigger governed context. Added runtime_clock_summary and recent_governed_activity_summary helpers.
Phase 6F (Structured Operational Inventories) introduces canonical governed maps (GOVERNED_TOOLS, GOVERNED_SKILLS, etc.) and deterministic renderers that produce structured, bounded inventory output instead of prose. All data remains read-only and sourced from allowlisted governed documents. Roadmap updated 2025.
Future Phases
Phase 7 — First Governed Live Tinker Bridge
Goal: Allow Tinker to consume governed work_order artifacts and emit local_execution_result and validation_result artifacts.
Constraints: - tiny first bridge - sandboxed - human-gated - no recursion - no broad mutation authority
Phase 8 — Governed Memory + Retrieval
Status: Active. Deterministic artifact-backed memory architecture is implemented in discord-luna under luna_core/governed_memory.py with CLI coverage in luna_core/memory_cli.py.
Goal: Build long-term contextual memory and retrieval.
Architecture: - artifacts are source of truth - pgvector is retrieval index only and optional/fail-closed - governance controls trust, review, and promotion - retrieval candidates cannot mutate runtime behavior or prompts directly
Implemented canonical artifacts: - working_memory_entry - semantic_memory_entry - retrieval_candidate - memory_review - memory_promotion - retrieval_session - context_assembly_report
Implemented deterministic commands: - ingest-memory - search-memory - assemble-context - review-memory - promote-memory - memory-health
Phase 8E — Governed Entity Cognition and Derived Memory Surfaces
Status: Proposed extension of Phase 8 trajectory.
Core Invariant: Structured artifacts, governed state, approval records, evidence bundles, and replayable execution artifacts remain authoritative. Markdown vaults, entity pages, backlinks, timelines, and generated summaries are derived cognitive surfaces unless explicitly promoted through governed approval flows.
Positioning: Luna as a governed operational cognition substrate with persistent semantic continuity. Inspired by transparent local-first memory patterns but implemented strictly as non-authoritative, regeneratable views on top of canonical governed artifacts. No pivot — pure extension.
PHASE A — Derived Memory Surface
- Markdown export layer (Obsidian-compatible vault generation)
- Backlink graph generation from canonical artifacts
- Entity page scaffolding (people, projects, decisions, incidents, capabilities)
- Operational timelines and generated summaries
- Read-only derived cognitive surface
- Fully reproducible/regeneratable from canonical artifacts
- Markdown is presentation, not authority
- Integration with existing
luna-interopartifact bus andluna-memory
PHASE B — Entity Cognition Layer
- Canonical entity types: people, systems, projects, decisions, incidents, capabilities
- Stable entity IDs with provenance
- Relationship edges and evidence/provenance links
- Temporal state evolution tracking
- Operational continuity records
- Entity-centric retrieval (additive to existing session-centric retrieval)
- Derived only — entities are projections of governed artifacts
PHASE C — Governed Semantic Maintenance
- Summarization proposals
- Graph consolidation proposals
- Memory promotion proposals
- Narrative synthesis proposals
- Conflict detection and semantic drift detection
- New artifact types:
semantic_delta,entity_revision,narrative_proposal,graph_consolidation - Approval-gated semantic updates via Lich governance engine
- Replayable cognition transforms (every transform produces new artifacts)
- No hidden background semantic mutation or direct entity graph writes
Semantic Provenance (required for all derived surfaces): - Why an entity summary changed - Which canonical artifacts contributed - Which messages/events influenced synthesis - Which model/executor generated interpretation - Confidence/uncertainty markers - Approval status - Prior semantic state → resulting semantic state - Replay/audit references
Phase 9 — Retention and Archive Lifecycle
Status: Active. Archive-first retention design and deterministic lifecycle artifacts are implemented.
Goal: Manage long-term storage safely.
Implemented artifacts: - retention_policy - archive_manifest - prune_recommendation - storage_health_report
Implemented deterministic commands: - archive-memory - memory-retention-report - memory-health
Policy: Archive-first, not delete-first.
Preserve by default: - governance artifacts - promotion records - rollback records - trust artifacts - incident records - evidence bundles
Phase 10 — Proactive + Scheduled Operations
Goal: Time-aware operations with governance.
Examples: - maintenance schedules - scheduled checks - reminder artifacts - backup freshness checks - recurring governance reviews - calendar bridge
Principle: Read-only clock first, governed scheduled action later.
Phase 11 — Personal Knowledge Ingestion
Goal: Import personal data sources into governed local artifacts.
Potential sources: - Notion - local files - PDFs - email exports - Google Drive exports - Airtable exports - CRM exports - browser bookmarks - archived web captures
Correct model: External source -> local snapshot -> canonical artifact -> retrieval index -> research artifact -> memory proposal -> governance.
Phase 12 — Autonomous-but-Audited Operation
Goal: Luna can perform bounded autonomous work under governance.
Requirements: - policy-gated execution - validation contracts - rollback paths - executor trust calibration - incident review - human override - forensic replay
Core Architectural Principles
Luna must remain: - deterministic-first - artifact-driven - governance-gated - replayable - inspectable - versioned - offline-safe by default - transport-neutral - fail-closed when uncertain
Anti-Goals
Do not introduce: - uncontrolled recursion - opaque agent loops - hidden prompt magic - unbounded mutation authority - direct memory mutation from retrieval - Discord-owned execution logic - live runtime coupling without governance gates - automatic deletion of forensic artifacts
Immediate Priority Order
- Populate luna-skills.
- Add Discord session context manager.
- Add read-only clock/time tool.
- Add retention/archive policy layer.
- Build first governed live Tinker bridge.
- Add retrieval grounding and pgvector indexing.
- Add governed Notion/local-file ingestion.
- Expand autonomous execution gradually.
Pending Codex Goals
Pending Goal 1 — Populate luna-skills
Create 15 operational skills using SKILL.md files.
Primary outcome: Luna gains reusable operational guidance without granting runtime authority.
Pending Goal 2 — Add Discord Session Context Manager
Add short-term session context to discord-luna.
Primary outcome: Luna can answer follow-ups and preserve conversational continuity within a session.
Strategic Summary
The governance/control substrate is complete enough to begin operationalization.
The next major challenge is not more abstraction.
The next challenge is making Luna: - context-aware - skill-guided - time-aware - locally capable - governed-live only when ready
Current Truth — Governed Operational Intelligence
Luna has advanced beyond static self-context retrieval into a governed operational intelligence substrate.
Recently implemented layers:
- Governed runtime registry
- Governed operational awareness
- Governed task continuity
- Governed action intelligence
- Governed multi-step plan state
- Governed workflow cognition
- Governed multi-workflow arbitration
- Governed coordination kernel
- Governed policy engine
- Governed simulation engine
- Branch comparison and safest-path selection
Current capability boundary:
Luna can reason about plans, workflows, policies, simulations, rollback readiness, validation requirements, governance cost, branch safety, and coordination bottlenecks. Luna still does not perform autonomous execution, hidden mutation, background loops, unrestricted shell actions, or automatic Tinker execution.
Current next frontier:
Phase 12 should focus on governed runtime perception and live observability: bounded Docker/container awareness, service telemetry, runtime health synthesis, topology drift detection, and simulation-vs-runtime divergence detection, without adding autonomous remediation.