feat(system): Compass devpulse personal layer scaffold (DPLAN-0125 Track I): triple-layer gitignore protection, compass_wrapper.py stub (query_top/ingest_learning/stats signatures), seedgo bypass entries. Design doc at devpulse/.trinity/night_shift_reports/compass_layer_design.md. Scaffold ready for future implementation session.

Co-Authored-By: @devpulse <devpulse@aipass>
This commit is contained in:
AIOSAI
2026-04-14 06:33:50 -07:00
co-authored by @devpulse
parent 3c5ac29fba
commit 2e41b75fe9
5 changed files with 125 additions and 4 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
{
"branch": "devpulse",
"feature_branch": "",
"started": "2026-04-14T13:14:01.042006+00:00",
"pid": 219648
"started": "2026-04-14T13:33:48.394474+00:00",
"pid": 233423
}
+1 -1
View File
@@ -2,7 +2,7 @@
> Auto-generated by `drone @prax status sync`. Do not edit manually.
**Last sync:** 2026-04-14 06:14
**Last sync:** 2026-04-14 06:33
**Summary:** 8 operational | 0 in-progress | 0 not started
---
+5 -1
View File
@@ -12,4 +12,8 @@ build/
*.log
*.tmp
*.swp
my-project
my-project
# Private Compass personal layer — never commit
.trinity/compass/
.trinity/compass/**
+10
View File
@@ -40,6 +40,16 @@
"standard": "cli",
"file": "apps/devpulse.py",
"reason": "Manager branch — not a CLI module. Entry point auto-generated by spawn template. --help is implemented via print_introspection()."
},
{
"standard": "encapsulation",
"file": "apps/modules/compass_wrapper.py",
"reason": "Scaffold/stub for private Compass personal layer. Inherits branch-level gap: devpulse has no apps/handlers/__init__.py security guard. Local handle_command() does enforce cross-branch caller rejection."
},
{
"standard": "json_structure",
"file": "apps/modules/compass_wrapper.py",
"reason": "Scaffold/stub. Devpulse branch has no apps/handlers/json/json_handler module (manager branch). Real implementation in a later session will wire logging through the devpulse json handler once it exists, or via ingest_log.jsonl directly."
}
],
"notes": {
@@ -0,0 +1,107 @@
# =================== AIPass ====================
# Name: compass_wrapper.py
# Description: Scaffold for devpulse private Compass personal layer
# Version: 0.1.0
# Created: 2026-04-14
# Modified: 2026-04-14
# =============================================
"""Devpulse -> Compass personal layer wrapper (SCAFFOLD / STUB).
This module is the intended entry point for devpulse's private Compass
personal layer. It is a scaffold only -- no logic is implemented yet.
Design doc:
src/aipass/devpulse/.trinity/night_shift_reports/compass_layer_design.md
Storage (gitignored, never committed):
src/aipass/devpulse/.trinity/compass/
devpulse_config.json -- collection identity / metadata
ingest_log.jsonl -- idempotency log for ingest attempts
.chroma/ -- future ChromaDB data directory
Intended interface:
- query_top(context, n) -> top-N relevant fragments
- ingest_learning(key, text, sid) -> write a new learning fragment
- stats() -> collection health / counts
No ``chromadb`` import is performed here on purpose: we don't want to
pull the dependency in until the real implementation lands. A future
session will replace the ``NotImplementedError`` bodies with actual
Compass engine calls (via subprocess or a direct import from the
Compass navigator package).
"""
from __future__ import annotations
from pathlib import Path
from aipass.prax import logger
from aipass.cli.apps.modules import console, err_console
MODULE_NAME = "compass_wrapper"
# =============================================================================
# PUBLIC INTERFACE (stub)
# =============================================================================
def query_top(context: str, n: int = 5) -> list[dict]:
"""Query the devpulse-compass layer for top-N fragments matching the context."""
raise NotImplementedError("compass_wrapper.query_top not yet implemented")
def ingest_learning(learning_key: str, learning_text: str, session_id: int) -> bool:
"""Ingest a new learning into the devpulse-compass layer."""
raise NotImplementedError("compass_wrapper.ingest_learning not yet implemented")
def stats() -> dict:
"""Return collection stats: fragment count, last ingest, schema version."""
raise NotImplementedError("compass_wrapper.stats not yet implemented")
# =============================================================================
# INTROSPECTION
# =============================================================================
def print_introspection() -> None:
"""Print module introspection -- scaffold status and intended interface."""
console.print("[bold cyan]compass_wrapper[/bold cyan] -- devpulse private Compass layer (SCAFFOLD)")
console.print(" status: stub / not implemented")
console.print(" storage: .trinity/compass/ (gitignored)")
console.print(" interface:")
console.print(" - query_top(context, n)")
console.print(" - ingest_learning(learning_key, learning_text, session_id)")
console.print(" - stats()")
console.print(" design: .trinity/night_shift_reports/compass_layer_design.md")
# =============================================================================
# HANDLER SECURITY GUARD
# =============================================================================
def handle_command(command: str, args: list) -> bool:
"""Entry point for drone routing. Guards against cross-branch imports misuse."""
caller = Path.cwd().name
if caller != "devpulse" and not any(
p.name == "devpulse" for p in Path.cwd().parents
):
logger.warning(
f"[COMPASS_WRAPPER] Cross-branch call from {caller} -- use ai_mail instead"
)
return False
if command != "compass":
return False
if not args or args[0] in ("--help", "-h", "help"):
print_introspection()
return True
# All subcommands are stubs until implementation lands.
err_console.print(
"[yellow]compass_wrapper is a scaffold -- no subcommands implemented yet.[/yellow]"
)
err_console.print("See design doc: .trinity/night_shift_reports/compass_layer_design.md")
return True