Skip to content

[WIP] Plan TraceDecay V2 brain rewrite#421

Draft
ScriptedAlchemy wants to merge 13 commits into
masterfrom
codex/tracedecay-total-redesign-plan
Draft

[WIP] Plan TraceDecay V2 brain rewrite#421
ScriptedAlchemy wants to merge 13 commits into
masterfrom
codex/tracedecay-total-redesign-plan

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Jul 10, 2026

Copy link
Copy Markdown
Owner

WIP: plan only

This PR contains only the TraceDecay V2 total-rewrite design: one canonical master plan plus 27 linked subsystem/crate plans (28 documentation files). It deliberately contains no implementation.

Unified product and architecture

  • Rebuild TraceDecay as one coherent, profile-wide system across projects, repositories, worktrees, branches, threads, turns, agents, workflows, tools, artifacts, code, Git, facts, memories, tasks, plans, and time.
  • Make an immutable observation/event stream the write authority; derive versioned projections, graph/read models, search indexes, analytics, hints, and UI views through fenced, replayable projectors with checkpoints, dead letters, repair, and provenance.
  • Replace ambiguous project-only identity and split stores with canonical profile/project/repository/worktree/session/message/agent/task/artifact/code identities, explicit source bindings, variant safety, temporal validity, and protected consolidation/quarantine workflows.
  • Define crate ownership, dependency/release DAGs, anti-corruption boundaries, migration gates, deletion gates, and a shared presentation layer so the rewrite converges instead of recreating fragmented subsystems.

Product surfaces

  • Replace the project-only dashboard with an All / Brain workspace plus project lenses; interactive Git, code, thread, turn, agent, task, plan, memory, impact, and timeline graphs; reasoning/code/artifact lineage; Work/Resume task views; and a powerful temporal explorer.
  • Add replay/debug labs for search, LCM, facts/memory, hooks, hints, redaction, curation, automation, scheduling, and configuration with current-versus-historical policy comparisons and reproducible receipts.
  • Port and redesign the Hermes Kanban concept as a native TraceDecay task/plan graph—not an adapter—with multi-board/multi-project views, DAG dependencies, model/effort routing, executor/provider SPI, offers/admission, leases, capability grants, reservations, work packets, nearby-agent awareness, and duplicate/conflict prevention.
  • Make autonomous curation, memory/skill evolution, optional near-real-time model-assisted context scouting, compact suggestion envelopes, dynamic hint arbitration, and replay-measured precision first-class.

Search, APIs, CLI, and MCP

  • Redesign hybrid lexical/vector/graph/temporal retrieval, supersession-aware ranking, contextual anchors/retrieval IDs, cross-project scope, explainability, qrels/judgment workflows, and evaluation against real local sessions across repositories.
  • Publish one typed application contract through an official HTTP API, SDKs, CLI, MCP, dashboard, and executor integrations; eliminate surface-specific business logic and inconsistent output schemas.
  • Redesign MCP as a first-class protocol surface: generated task catalog, lifecycle/capability negotiation, tools/resources/templates/prompts/completion, structured content and resource links, subscriptions/list-change notifications, progress/cancellation, roots, sampling/elicitation policy, auth, stdio and Streamable HTTP transports, official Rust SDK integration, and host conformance suites.
  • Centralize typed view models and markdown/JSON renderers so CLI/MCP/API output, errors, pagination, missing-registry states, project labels, and machine-readable envelopes remain consistent.

Privacy and control plane

  • Add ingest-time, retrieval-time, export-time, and presentation-time secret detection/redaction with policy versions, sensitivity labels, grants, audit receipts, protected quarantine, and leak-regression tests.
  • Put all configuration—including redaction, retention, providers/models, hints, hooks, search, automation, executors, task routing, and sharing—in a versioned control plane available through UI, CLI, API, and MCP.
  • Preserve fully autonomous curation semantics; there is no generic preview/apply/rollback proposal queue. Inspection, policy controls, outcome history, recovery, and protected reversible domain operations remain explicit.

Accepted-base reconciliation

Evidence and privacy

  • Planning used TraceDecay LCM/session/message/fact/code/Git/analytics/diagnostic/automation surfaces, raw-provider fallbacks when supported tools failed, merged PR evidence, several independent subagent audits, and primary-source/web/arXiv research.
  • Private chronological exports remain outside Git under /fast/tracedecay-redesign-research (0700; files 0600): 34,344 discovered role-user records and a 9,980-record best-effort human-authored subset through 2026-07-10T20:26:39.847Z.
  • Retained sanitized-content SHA-256: broad edfe67d6baf9fd87faa9fd49c443a777bbb838c3eb36a79106c06f18a161baff; human 5afb40d25f3fc43b86d620b25daea94a0b4f33ffc4421b5bb20b6a550b8c3bcb.
  • No transcript, database, generated fixture, or secret-bearing research artifact is committed or indexed by this PR.
  • TraceDecay's own final CLI failures are retained as product evidence: contradictory daemon freshness/sync state, ANSI-heavy output under TERM=dumb/NO_COLOR, and Git commit_context aborting on an optional corrupt test-annotation store instead of returning partial Git context (FM-115–FM-117).

Validation

  • 28/28 intended plan files and no other changed paths.
  • Internal links/anchors valid; Markdown fences balanced; no placeholders or unresolved plan references.
  • Failure modes FM-001 through FM-117 are contiguous and unique.
  • 845 public contract declarations checked with zero incompatible duplicate definitions.
  • Corpus ordering, deduplication, identities, timestamps, retained-content hashes, and redacted-mirror equality validated.
  • git diff --check, direct plan secret scan, private-corpus secret scan, and origin/master..HEAD history scan pass with zero findings.

Draft/WIP remains intentional until the plan is reviewed as one flowing architecture.

@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2c51643

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy ScriptedAlchemy added the WIP Work in progress; do not merge label Jul 10, 2026
@ScriptedAlchemy ScriptedAlchemy force-pushed the codex/tracedecay-total-redesign-plan branch from e50f8f5 to 4f5ab66 Compare July 10, 2026 05:54
@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 986f25cca6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1946 to +1949
- Land accounting event/metric/SLO/savings contracts and generated descriptors (22F), denominator-safe ledgers/rollups/lag/data-quality/cap anchors (22G), then adoption, hint outcomes, SLO monitors, and recorded-baseline savings (22H), as specified by plan 26.
- [ ] Use plan 08's generated `SurfaceKind` everywhere; prove known/capped/partial/unknown denominators round-trip losslessly and replay/lab traffic cannot pollute live metrics.

#### PR 22A: Generated capability and tool catalog

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Schedule the catalog before generated-metadata consumers

When the Phase 3 ladder is followed literally, this schedules PR 22F–22H before PR 22A even though the 22F–22H checklist requires plan 08's generated SurfaceKind everywhere. PR 22A is the step that creates the generated capability/tool catalog and its surface/availability artifacts, so the accounting/adoption work either blocks or has to invent duplicate local surface metadata; move 22A ahead of the first generated-catalog consumer or split the dependent 22H work after it.

Useful? React with 👍 / 👎.

@ScriptedAlchemy ScriptedAlchemy force-pushed the codex/tracedecay-total-redesign-plan branch from 986f25c to 8596cf3 Compare July 10, 2026 07:55
ScriptedAlchemy and others added 13 commits July 10, 2026 21:39
Update all 21 V2 plan documents with latest revisions (+566/-188).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
docs/superpowers/plans/ blocked the V2 plan files from normal git adds
(everything so far was force-added). Keep other plan scratch ignored but
track tracedecay-v2/ and the master brain-rewrite plan normally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Integration-verifier pass over the 11-editor reconciliation: bad section
ref in plan 25, two stale tool-count stragglers (12, 14), two lab-heading
stragglers in the master plan, plan 25 crate wiring in 19's tree/DAG/SPI
owner, and plan 25 producer citations in 02/04.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Three-way verification pass after the rebase and external deepening
commits: reconcile remaining stale merge-state claims (#418 released,
#423/#424/#425/#407 merged at base 3567e31; #409 closed-not-merged),
enforce single canonical definitions (DiagnosticEnvelopeV1 -> plan 24,
SanitizationReceiptV1 -> plan 18, CursorPage -> plan 17), fix a stray
non-canonical error code in plan 01, and repair four tables broken by
unescaped pipes in inline code. Lab inventory, budgets, tool counts,
FM-001..103 contiguity, links after the docs/plans move, and PR-letter
namespace all verified clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ScriptedAlchemy ScriptedAlchemy force-pushed the codex/tracedecay-total-redesign-plan branch from a02202a to 2c51643 Compare July 10, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP Work in progress; do not merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant