Introduction¶
DeepSeek Harness (DSH) sessions are usually short-lived, whereas real-world software development projects evolve over the long term. Contextual information is often scattered across multiple conversations: the rationale behind architecture decisions, production-environment fixes, current development progress, and key file paths. The dsh-project-brain plugin aims to address this issue by turning fragmented context into a project-local, structured knowledge layer.
Plugin Overview¶
This is a plugin that provides DSH with persistent project intelligence and memory. It analyzes the current workspace, generates architecture reports, saves decisions and development history, and restores the correct context in future sessions. Unlike rescanning the repository for every conversation, the plugin stores structured knowledge inside the project and enriches it as the project evolves.
Core Features¶
- Project Awareness and Analysis: Automatically detects languages, frameworks, tools, entry points, manifests, README metadata, symbols, and imports. Generates architecture reports covering project purpose, architecture style, conceptual layers, component responsibilities, relationships, runtime flows, key files, reading order, and risks.
- Cross-Session Memory: Persists decisions, requirements, architecture notes, bugs, lessons, changes, TODOs, and timeline events. In new sessions, high-value memories and active TODOs are automatically restored through the DSH system prompt.
- Local Retrieval and Fallback: Local BM25 retrieval is the zero-config default. Architecture generation and memory retrieval have local fallback paths, so they can still work even when AI is unavailable.
- Backup and Recovery: Supports the
project_export,project_import, andproject_rollback_backuptools, allowing the project brain to be exported as a zip file and restored or rolled back to a previous version across different machines.
Installation and Configuration¶
- Environment Requirements: The plugin depends on a Node.js environment and requires version >= 22.19.0.
- Configuration Note: Changes to configuration items on the settings page will not take effect immediately if they are not saved.
Typical Usage¶
- Initial Analysis: In the first session where the project directory is opened, the plugin automatically scans and activates the project brain, generating an architecture report.
- Context Restoration: In a new DSH session, high-value memories and pending tasks are automatically injected, avoiding the need to re-explain project context.
- Backup and Migration: Use
project_exportto bundle the current project brain; on another machine, useproject_importto restore it, with support for automatically previewing the impact manifest and rolling back versions.
How It Works¶
The plugin operates through the following flow:
Active DSH Session
│ trusted live Session cwd
▼
Workspace scanner ───────► project facts and source evidence
│
├──► current DSH LLM ───► semantic architecture report
│ │ unavailable / timeout / invalid output
│ └────────────► local architecture fallback
│
├──► .project-brain/ ───► memory, TODOs, timeline, architecture
│
├──► context injector ──► next Session system prompt
│
└──► Connection RPC ────► Dashboard and TodoStri
Conclusion¶
By using local and persistent mechanisms, the plugin addresses the fragmentation problem in AI programming assistant sessions. Its default local BM25 retrieval mechanism lowers the barrier to use, while the dual fallback paths for architecture generation and memory retrieval ensure availability in certain network environments. Further details can be found in its GitHub repository.