R5 → R14: Memory → Autonomous Pipeline
Tier 2 Supersession Manual MEMORY.md (R5) evolving into LLM-powered autonomous extraction with secrets scanning and cross-session consolidation (R14).
Manual
ManualMemoryEntry
User says “remember X” or agent proposes at session end. Always pinned—never overwritten by autonomous extraction.
Extracted
ExtractedMemoryEntry
LLM reads session history, extracts decisions/constraints/workflows as candidate facts. Confidence score 0–1.
Consolidated
ConsolidatedMemoryEntry
Cross-session merge. Deduplicates, resolves contradictions (newest wins, pinned always wins). Tracks merge provenance.
CRITICAL-3
Memory Secrets Leakage
Prompt injection writes malicious instructions to persistent memory. Fix: hardcoded extraction prompt (not influenceable by session context), secrets regex scanning before disk write, reject entries that look like instructions/commands.
R15: Session Tree
Tier 4 Novel Sessions as tree, not linear. Fork, resume, cross-project. Export to HTML/JSONL with custom handlers.
R6: Verification Agent
Tier 2 Planned Adversarial verification subagent that independently checks non-trivial work. Parent cannot self-assign PASS.
API/Routes
Any change to **/api/**, **/routes/**
DB/Middleware
Any change to **/db/**, **/middleware/**
Signatures
Modified function signature or return type
>100 Lines
Any change touching more than 100 lines
Read All Changed
Read every modified file from parent’s file list
Run Tests
Execute project test command, include full stdout
Lint/Typecheck
Run lint and typecheck, include full stdout
3 Adversarial Checks
Must attempt ≥3 adversarial checks before PASS
R10: Token Budget Mode
Tier 3 Planned User specifies budget via +500k or --budget 500000. Display output tokens each turn. Auto-continue if agent stops early.
R9 & R11: MCP Integration & Autonomous Mode
Tier 3 Two independent capabilities shipping in Phase 6b.
R9
MCP Integration
Minimal viable: tools/list, tools/call, server instructions. Delta-enabled to avoid cache busting on late connects. Namespace prefix prevents collisions.
R11
Autonomous Mode
Sleep tool (60–3600s), cost guardrails ($10 default cap), terminal focus awareness, /stop-auto command. Explicit --autonomous opt-in required.
CRITICAL-4
MCP Untrusted Instructions
Project-level MCP config with arbitrary commands is code execution via repo cloning. Fix: user-level config only (~/.subq/settings.json), tag server instructions as untrusted, namespace tools, confirm on first use.
R20: Intelligent Commit Tool
Tier 4 Deprioritized Agentic git inspection, split commits, hunk-level staging, conventional format.
Agentic Inspection
git diff --stat overview, per-file diffs, hunk-level analysis for semantic understanding.
Split Commits
Unrelated changes → multiple atomic commits ordered by dependency. User confirms before executing.
Hunk-Level Staging
git add -p equivalent via tool interface. Stage specific hunks while leaving others unstaged.
Format Validation
Enforce conventional commit format. Detect filler words. Reject and suggest improvement.
Agent-Native Parity
17 of 20 planned capabilities lack agent-invocable equivalents. An agent cannot do what a user can do.
session_treeAgent has zero visibility into session history. Cannot inspect parent/child relationships or navigate branching conversations.
memory read/search/write/pinMemory is currently write-only passive injection. Agent cannot search, filter, or pin memories during execution.
harness meta-toolAgent cannot query its own token budget, remaining context, or configuration. Flies blind on resource constraints.
request_verificationAgent cannot explicitly request verification of its own work. Verification is external-only, never self-initiated.