Skip to content
/

Dev Workspace

dev-workspace-dilberry · dilberryhoundog/dev-workspace · ★ 39 · last commit 2026-04-04

Git-branch-scoped context management system that isolates planning, research, history, and context per branch while providing automatic conversation capture with headless-Claude summarization.

Best whenSwitching git branches should switch your AI context; branch-scoped memory prevents context pollution between different work items.
Skip ifSharing context across unrelated work items (branches), Losing conversation history when sessions end
vs seeds
agent-os(Archetype 4 — structured markdown scaffold + commands that write the structure) but adds git-branch isolation (each bra…
Primitive shape 11 total
Commands 8 Hooks 3
00

Summary

Dev Workspace (dilberry) — Summary

Dev Workspace is a git-branch-scoped context management system for Claude Code that turns each feature branch into an isolated workspace with its own directory tree, conversation history, plans, research, tasks, and CLAUDE.md. The four pillars are: directory system (structured dev/workspace/ subtree), git branch management (each branch gets a fresh workspace, archives persist), slash commands (8 workspace commands for branch creation, discovery, merge preflight), and Ruby hooks (session_start injects tree + context, session_end captures and summarizes conversation transcripts, user_prompt_submit runs word-triggered behaviors). At 39 GitHub stars, it is a developer-centric workspace scaffold combining git isolation, context injection, and history capture into a coherent workflow.

differs_from_seeds: Closest to agent-os (Archetype 4 — markdown scaffold + commands that write the structure) but significantly more sophisticated: Dev Workspace adds git-branch isolation, Ruby-based hook system with the claude_hooks library, automated conversation capture with headless Claude summarization, and an archiving system that persists branch context after merge. Unlike ccmemory (global Neo4j graph), memory is file-based and branch-scoped, deliberately switching context when you switch branches.

01

Overview

Dev Workspace (dilberry) — Overview

Origin

Created by dilberryhoundog. No license specified. Shell-primary (Ruby hooks via claude_hooks gem). Active as of April 2026.

Philosophy

"Shape, store, build and reveal context generated by and used for Claude AI while working on a codebase."

"Changing branches, changes context. This makes our context very targeted and focused, which Claude responds to excellently."

The core insight: each git branch represents a distinct work context. When you switch branches, you should also switch to the relevant context — plans, research, conversation history, current goals. Dev Workspace implements this literally: each branch has its own dev/workspace/ directory, and switching branches means Claude sees a completely different workspace.

"This system doesn't touch: CLAUDE.md, agents, skills or mcp servers, you are free to use these tools as you wish."

The explicit positioning as non-invasive: it adds a structured workspace layer without overriding Claude Code primitives.

Conversation Capture Philosophy

"This is a premium context capture tool. Every conversation you have with claude can be parsed and recorded in your workspace."

The conversation history feature is distinctive: it creates rich, token-efficient history files by:

  • Filtering out tool output content (keeps file paths but not file contents)
  • Using headless Claude to rename and summarize each session file
  • Capturing thinking levels, conversation branches, and tool usage patterns

Git Management Philosophy

"Once in the flow, branches can come and go freely."

Workspaces are ephemeral per branch but archived permanently in dev/branches/. This gives both the fresh-slate feeling of a new branch and the permanence of accumulated context.

02

Architecture

Dev Workspace (dilberry) — Architecture

Distribution

Standalone repo — clone and configure. Ruby gem dependency (claude_hooks).

Directory Layout

.claude/
├── commands/
│   ├── workspace/
│   │   ├── new-workspace.md         # /workspace:new-workspace
│   │   ├── discover.md              # /workspace:discover
│   │   ├── health.md                # /workspace:health
│   │   ├── research-v2.md           # /workspace:research-v2
│   │   ├── research.md              # /workspace:research
│   │   ├── tree.md                  # /workspace:tree
│   │   └── workspace-PR.md          # /workspace:workspace-PR
│   └── project/                     # Project-level commands
├── rules/                           # Claude Code rules
├── settings.json                    # Permissions + hook registration
└── skills/                          # Claude Code skills

dev/
└── workspace/
    ├── context/          # Discovery output, tree views
    ├── filebox/          # Scratch files dump
    ├── history/          # Session transcripts (headless-summarized)
    ├── plans/            # Plan files with templates
    ├── prompts/          # Structured prompt templates
    ├── research/         # Research output
    ├── reviews/          # Code review output
    ├── tasks/            # Task lists
    ├── CLAUDE.md         # Branch-specific Claude context
    └── WORKSPACE.md      # Branch workspace configuration

Archive Structure

dev/branches/
└── {branch-name}/       # Archived workspace snapshots
    └── {timestamp}/     # Each archive is timestamped
        ├── context/
        ├── history/
        ├── plans/
        └── ...

Required Runtime

  • Claude Code
  • Ruby (for hooks via claude_hooks gem)
  • Git

Hook System

Uses the claude_hooks Ruby library which:

  • Provides single entry point per hook event
  • Intelligently combines multiple hooks
  • Outputs correct JSON for Claude Code
  • Produces comprehensive hook logs in ~/.claude/ directory
03

Components

Dev Workspace (dilberry) — Components

Commands (8, under workspace: namespace)

Name Purpose
/workspace:new-workspace Create new branch + fresh workspace; set purpose in CLAUDE.md
/workspace:discover Task() agents search codebase for discovery context; output to context/
/workspace:research Task() agents search web for research; output to research/
/workspace:research-v2 Updated research command variant
/workspace:health Check workspace status and consistency
/workspace:tree Build full directory tree view and save to context/tree.md
/workspace:workspace-PR (archive+merge workflow, details inferred)
README.md (workspace command documentation — not a command)

Note: merge-preflight and merge-branch commands mentioned in README may live in project/ namespace.

Hooks (3 events via Ruby claude_hooks library)

Event Behavior
session_start Run tree tool → build context/tree.md; inject workspace context (tree + CLAUDE.md + WORKSPACE.md) silently into session
session_end Extract transcript from .claude/ folder → save to history/; run headless Claude → rename + summarize file
user_prompt_submit Word-based trigger suite for advanced context building in session

Templates

Template Purpose
Product plan template Structured product planning document
Architecture plan template Architecture decision record
Discover prompt template Structured discovery prompts with XML experiment
Research prompt template Structured research prompts

Key Files

File Role
dev/workspace/CLAUDE.md Branch-specific context: purpose, discoveries, relevant files
dev/workspace/WORKSPACE.md Merge instructions: how to handle workspace on branch completion
dev/workspace/context/tree.md Auto-generated project tree (injected at session start)
dev/branches/{branch}/{timestamp}/ Archived workspace snapshots
05

Prompts

Dev Workspace (dilberry) — Prompts

Excerpt 1: new-workspace Command (from commands/workspace/new-workspace.md)

Prompting technique: Structured task-sequence with pre-loaded context injection and type inference

---
name: new-workspace
description: Create new branch with workspace folder and CLAUDE.md
allowed-tools: Bash(git status), Bash(git branch:*), Bash(git checkout:*), Bash(git fetch:*), Bash(git add:*), Bash(git commit:*), Write, Read, Edit
argument-hint: <branch purpose>
---

Create a new branch with a workspace environment for isolated work.

## Description
$ARGUMENTS

## Pre-loaded Context
!`git status`
!`git branch`

## Workflow
### Step 1: Validate Arguments
If no description, prompt: "What are you working on?"

### Step 2: Determine Branch Type
Analyze description and select prefix:
- `feature/` - New features, enhancements (default)
- `fix/` - Bug fixes, patches
- `docs/` - Documentation changes
- `chore/` - Maintenance, tooling, dependencies

### Step 3: Create Branch Name
Format: `{type}/{sanitized-description}`
Sanitization: Lowercase, spaces → hyphens, remove special chars, max ~40 chars

Excerpt 2: Session Start Context Injection (from README)

Prompting technique: Silent system-level context injection with structured information hierarchy

[Session starts — Claude silently receives:]

tree.md contents:
├── dev
│ ├── branches
│ └── workspace
│   ├── context
│   │ └── tree.md
│   ├── research
│   ├── reviews
│   ├── tasks
│   │ └── assistant
│   ├── CLAUDE.md      ← branch purpose and discoveries
│   ├── README.md
│   └── WORKSPACE.md   ← merge instructions

[CLAUDE.md contents — branch-specific context]
[WORKSPACE.md contents — merge and completion config]

The injection is silent (not shown in chat) but appears as a system message confirmation.

Excerpt 3: Conversation History Format (from README example)

Prompting technique: Token-efficient conversation capture with semantic signal markers

[SUMMARY]
Explored Fizzy's layout system and content injection patterns. Discovered minimal shell 
layout with named yield slots...

[✨ NEW CONVERSATION BRANCH]
[USER] 💭: none
as per our @CLAUDE.md, lets discuss how fizzy uses application.html...

[ASSISTANT]
Great topic! Let me explore how Fizzy uses `content_for`...

[READ TOOL]
File: ~/Projects/37signals/fizzy/app/views/layouts/application.html.erb
09

Uniqueness

Dev Workspace (dilberry) — Uniqueness

differs_from_seeds

Closest to agent-os (Archetype 4 — structured markdown scaffold that writes your context) but significantly more developed: Dev Workspace adds git-branch isolation (each branch = distinct workspace), Ruby claude_hooks library hooks (session_start/end/prompt), automated conversation capture with headless Claude summarization, and an archiving system that persists per-branch context permanently. Unlike ccmemory (global Neo4j for cross-session recall), this is explicitly branch-scoped — switching branches switches memory. Unlike planning-with-files (hook-enforced three-file discipline), this provides a full directory taxonomy (8 subdirs) and treats conversation history as a first-class artifact.

Key Innovations

  1. Branch-scoped memory — git branch switch = workspace switch; each branch has distinct CLAUDE.md, context, history, tasks
  2. Conversation capture with headless summarization — session_end saves transcript as token-efficient history file; headless Claude renames and summarizes
  3. Archive persistence — workspace snapshots in dev/branches/ survive branch deletion; archives commit to main for team access
  4. claude_hooks Ruby library — single entry point per hook event with logging, JSON handling, and error management built in
  5. Tree injection — auto-builds project directory tree at session start; gives Claude instant structural awareness without having to search

Observable Failure Modes

  1. Ruby dependency — requires Ruby and claude_hooks gem; barrier for non-Ruby developers
  2. No Windows support — Ruby hook scripts are Unix-specific
  3. Headless Claude cost — session_end spawns a headless Claude session for summarization; adds API cost per session
  4. History file quality — headless summarization quality depends on model; cheap models may produce poor summaries
  5. Branch proliferation — if developers never merge, archives grow indefinitely in dev/branches/
  6. No content in history — history files capture file paths but not contents; good for tokens, bad for deep context retrieval

Comparison to planning-with-files

Dimension Dev Workspace planning-with-files
Memory scope Branch Project
Files 8 directories 3 files
Hook events session_start, session_end, user_prompt_submit UserPromptSubmit, PreToolUse, PostToolUse, Stop, PreCompact
Language Ruby Shell + Python
History capture Yes (headless-summarized) No
Multi-platform Claude Code only 17+ IDEs
Tamper protection No SHA-256 attestation
04

Workflow

Dev Workspace (dilberry) — Workflow

Phases

Phase Trigger Artifact
1. New Branch /workspace:new-workspace <purpose> New git branch + fresh dev/workspace/ with CLAUDE.md populated
2. Session Start Session launch session_start hook → tree.md built → context injected silently
3. Discovery /workspace:discover Task() agents search codebase → context/ files
4. Research /workspace:research Task() agents search web → research/ files
5. Active Work Normal coding WORKSPACE.md guides Claude on branch goals
6. Session End /exit or /clear session_end hook → transcript → history/ → headless summarization
7. Archive /workspace:archive-workspace Snapshot of dev/workspace/dev/branches/{branch}/{ts}/
8. Merge /workspace:merge-preflight + /workspace:merge-branch Safety check → merge to main → workspace cleaned

Approval Gates

Gate Mechanism
Merge preflight /workspace:merge-preflight — progressively re-used until green light
Merge execution /workspace:merge-branch — separate command after preflight passes

Artifacts per Phase

Artifact Location
Branch-specific CLAUDE.md dev/workspace/CLAUDE.md
Project tree dev/workspace/context/tree.md
Conversation history dev/workspace/history/{date}-{name}.md
Plans dev/workspace/plans/
Research dev/workspace/research/
Archive snapshot dev/branches/{branch}/{timestamp}/

Branch Protection

The workspace system enforces:

  • No committing workspace files to main (branch protection)
  • No clearing workspace when pulling updates from main
  • Archives always commit successfully to main (cross-branch sharing)
06

Memory Context

Dev Workspace (dilberry) — Memory & Context

Memory Model

File-based, git-branch-scoped. Each git branch has its own workspace directory with:

File/Dir Memory Type Scope
dev/workspace/CLAUDE.md Episodic / branch intent + discoveries Branch
dev/workspace/context/tree.md Structural / codebase map Branch (rebuilt each session)
dev/workspace/history/ Episodic / conversation transcripts Branch
dev/workspace/plans/ Procedural / feature plans Branch
dev/workspace/research/ Factual / external research Branch
dev/workspace/tasks/ Procedural / task lists Branch
dev/branches/{name}/{ts}/ Archive / historical context Project (all branches)

Context Injection Mechanism

The session_start hook:

  1. Runs tree tool → writes context/tree.md
  2. Stitches together: tree.md + CLAUDE.md + WORKSPACE.md
  3. Injects silently into session as system context (not shown in chat)
  4. Logs injected content to ~/.claude/ for diagnostic reference

This gives Claude instant structural awareness of the codebase before the first prompt.

Persistence Scope

project — workspace files persist per branch. When branches merge, workspace files can be archived but are not written to main.

Branch-as-Memory-Boundary

The key innovation: git branch switches are also context switches. Each branch's CLAUDE.md contains only discoveries relevant to that branch's purpose. This prevents context pollution across different work items.

Conversation History Capture

The session_end hook produces token-efficient history files:

  • Content: file paths but not file contents (saves ~90% tokens)
  • Signals: thinking level used, conversation branches, tool usage type
  • Naming: headless Claude session assigns a contextual date-prefixed filename
  • Summary: headless Claude produces a searchable summary section

This allows future sessions to load historical context at fraction of full transcript cost.

Cross-Session Handoff

Yessession_start hook injects accumulated workspace context (tree + CLAUDE.md + WORKSPACE.md) at the start of every session on the same branch. The history files can also be explicitly loaded for deeper context.

Archive Persistence

dev/branches/ archives give permanent access to any branch's workspace context, even after the branch is deleted. Archives commit successfully to main, making them project-wide knowledge.

Compaction Handling

No explicit compaction handling — the workspace files survive compaction since they're on disk, but the hook system does not specifically address PreCompact events.

07

Orchestration

Dev Workspace (dilberry) — Orchestration

Multi-Agent: Yes (limited)

The /workspace:discover and /workspace:research commands explicitly use Claude Code's native Task() agent spawning for parallel web/codebase searches. However, this is not a general multi-agent orchestration framework — it is specific to the discovery and research commands.

Orchestration Pattern: parallel-fan-out

For discover/research commands: multiple Task() agents fan out to search different parts of the codebase or web simultaneously, then results are aggregated to context/ or research/ directories.

Isolation Mechanism: git-branch

Each branch gets a fresh workspace. The isolation is at the git branch level — not container or worktree. Multiple branches can coexist and each has its own complete workspace context.

Execution Mode: interactive-loop

Standard session-by-session development flow. No continuous daemon.

Multi-Model: No

No model routing. The headless Claude session for transcript summarization uses whatever model is configured.

Crash Recovery: partial

The session_end hook captures conversation history. If a session crashes before the hook fires, the history is not captured. No explicit crash recovery mechanism.

Auto-Validators: None

The /workspace:health command can check workspace consistency but is manual.

08

Ui Cli Surface

Dev Workspace (dilberry) — UI & CLI Surface

CLI Binary: No

Installed by cloning the repo and copying .claude/ to your project.

Slash Commands

8 commands under the workspace: namespace, plus project-level commands. See 03-components.md for full list.

Local UI: None

The workspace is plain markdown files and a directory structure. Browsed via any file explorer or IDE.

Hook Observability

The claude_hooks Ruby library produces detailed diagnostic logs in ~/.claude/ for each hook event. These logs capture:

  • Which hooks fired
  • What context was injected
  • Timing information

The injected context is confirmed in-chat via a system message: "context has been added."

Conversation History as UI

The dev/workspace/history/ directory with headless-summarized session files provides a navigable history UI in any markdown viewer. Files are date-prefixed and include:

  • Summary at top for quick scanning
  • Tool usage signals (READ TOOL, WRITE TOOL, etc.) without content
  • Conversation branch markers for easy navigation

Permissions Configuration

settings.json shows a detailed allow/deny/ask permission structure:

  • allow: git commands, rails commands, workspace skills
  • ask: git commit, git push, PR merge, rails db operations
  • deny: .env, credentials, schema files, key files

Related frameworks

same archetype · same primary tool · same memory type

MemPalace ★ 53k

Verbatim local-first AI memory with 96.6% R@5 retrieval on LongMemEval using zero API calls — structured into a palace hierarchy…

Beads (Yegge) ★ 24k

Dolt-powered distributed graph issue tracker where AI agents track tasks with hierarchical IDs and dependency edges, claim work…

deepagents (LangChain) ★ 23k

Opinionated Python agent harness on top of LangGraph with sub-agents, filesystem, memory, and context compaction bundled in

agentmemory ★ 18k

Persistent, searchable memory for AI coding agents that captures every tool interaction, compresses it via LLM, and injects…

Open Multi-Agent ★ 6.3k

Give a natural-language goal to a coordinator agent and get a dynamically decomposed, parallelized task DAG executed by…

Basic Memory ★ 3.1k

Gives AI agents a persistent, human-readable knowledge graph of project decisions, observations, and relations stored as plain…