Goal: create a memory project without doing deep codebase analysis.
- User opens the desktop/web app or runs
zharwing-memory init. - User chooses
Project onlyfor a multi-repo product, orProject plus one repofor a simple single-repo setup. - App prepares a project creation preview.
- User confirms the project name, memory location, and optional pointer-file behavior.
- App creates an empty, safe memory workspace.
- If an initial repo was supplied, app optionally writes
.zharwing/memory.json. - If bootstrap files were requested, app optionally writes
AGENTS.md,CLAUDE.md, or another adapter file. - App redirects to Repositories so the user can link additional repos.
- User opens Import to preview and commit old memory or session folders.
- Optional assistant or external AI writes initial memory directly unless review mode is enabled.
- Risky, uncertain, or review-mode updates go to Memory Inbox.
No deep codebase scan happens during project creation.
- User creates one memory project for the product or program.
- User links each Git repo root with Write pointer file enabled. A monorepo is linked once at its root.
- Each repo receives
.zharwing/memory.jsonpointing to the same memory project. - User opens Codex in the repo currently being changed.
- Codex resolves the shared memory project from that repo's pointer and can use project-wide sessions, docs, search, and context.
- For another repo, user opens a separate Codex window or thread rooted there.
- Zharwing shares memory across those sessions, but does not broaden either Codex workspace's filesystem access.
- User selects a project from the project switcher at the top of the sidebar.
- User uses primary sidebar sections for Dashboard, Repos, Work, Library, Import, Search, Trash, and Settings.
- User uses section tabs for secondary pages:
- Work: Current Work, Sessions, Workstreams
- Library: Docs, Diagrams, Inbox, Graph, Context
- Settings: Project, Setup, Assistant, Backups
- Direct routes still work for every screen.
- User starts from repo folder.
- System resolves the current project.
- System reads the latest relevant previous session, including the last weekday session after weekends or gaps.
- System carries forward unfinished tasks, blockers, next steps, touched files, and important decisions.
- User runs
zharwing-memory start "task title"or the agent callsmemory.start_sessionto create today's project-scoped session. - Agent previews or loads a context bundle when prior context is useful; the user can inspect the same bundle in the UI.
- External AI receives project-scoped context through MCP, CLI, or clipboard/export without a normal per-request approval step.
- External AI does coding work.
- External AI saves checkpoints after meaningful progress.
- External AI closes the session with next steps.
- Durable updates are written directly by default. Review-mode or risky updates go to Memory Inbox.
- User opens Work -> Sessions and selects a session.
- Session remains available in history, search, and eligible context regardless of graph visibility.
- Include in graph is off for new, legacy, and imported sessions by default.
- User enables the flag only when the session is important enough for the durable project map.
- Graph adds the session node and its task, touched-file, repo, workstream, and document relationships.
- User can disable the flag later; Graph removes those session-derived nodes and relationships without deleting the session history.
- Agent calls
memory.get_startup_stateonce for the work round. - If project is resolved, server returns bounded active/latest/recent summaries and a startup revision.
- If project is unregistered, server recommends project creation.
- Agent asks the user to create or link the project through the UI or CLI.
- User completes project setup and restarts/retries from the linked repo.
- Agent extracts carry-forward work from compact summaries, searches when needed, and requests explicit session detail only when summaries are insufficient.
- Agent calls
memory.start_sessionfor today's work round by default. - Agent previews a context bundle only when compact state and targeted search are insufficient.
- Agent continues with the coding task.
- User opens project dashboard.
- Dashboard shows active/latest session, recent sessions, next steps, blockers, inbox count, graph count, and context safety.
- User clicks Resume Latest or chooses another project session.
- Optional assistant can write or draft a return-to-project summary.
- If review mode is enabled, the draft waits in Memory Inbox.
- User opens Context Preview.
- Context engine loads project-scoped sessions/docs.
- It selects canonical docs, active session, recent relevant sessions, pinned docs, and relevant diagrams.
- Scope and secret-safety checks exclude explicitly blocked items and redact detected secrets.
- UI shows included items, excluded items, reasons, token estimate, redactions, and safety state.
- User can inspect, copy, or export the result. MCP clients may consume the same eligible project context directly.
- External AI or assistant proposes an update when review mode is enabled or the update needs human judgment.
- Proposal is stored under
inbox/proposed-updates. - User opens Memory Inbox.
- User sees source session, source agent, target doc, patch, confidence, and reason.
- User accepts, edits and accepts, rejects, defers, marks duplicate, or marks stale.
- Canonical docs change after acceptance. When review mode is off, routine canonical docs can be written directly without entering this queue.
- User imports or creates Markdown docs.
- User sets type, status, visibility, topics, and related files/sessions.
- Mermaid diagrams live as editable Markdown.
- Diagrams can be linked to tasks, sessions, docs, decisions, and files.
- Graph projection derives nodes and edges from metadata.
- User opens Backups or runs
zharwing-memory backup. - App creates a local snapshot under
backups/snapshots. - Snapshot excludes previous backups to avoid recursive copies.
- User can move old snapshots to Trash.
- User can validate workspace integrity.
- User can rebuild the metadata index from Markdown source files.
- User deletes a project, linked repo entry, workstream, session, doc, inbox proposal, or backup.
- Critical deletes show a confirmation dialog.
- App always presents the owned confirmation; no persisted preference may bypass it.
- App moves the item to Trash instead of permanently deleting it.
- User opens Trash to restore the item, permanently delete one item, select multiple items, or empty all trash.
- Permanent delete cannot be undone.
- User checks assistant status.
- If disabled, core features still work.
- User can run deterministic local jobs:
- summarize session
- prepare return summary
- classify document
- Jobs can create direct memory updates or Memory Inbox proposals depending on project review mode.
- User reviews proposals only when the update was routed to the inbox.
Default scope is always the current project:
- session lists
- dashboard
- docs
- diagrams
- graph
- search
- context
- inbox
- assistant jobs
- trash
All-project behavior must be explicit.