# Engram Plus — Workflow Layer for Claude Code
> A structured behavioral workflow system that sits on top of [Engram](https://github.com/Gentleman-Programming/engram) and extends Claude Code with systematic rules, auto-triggers, and persistent memory protocols.
[](https://creativecommons.org/licenses/by-nc/4.0/)
---
## What is this?
Engram Plus is a **workflow layer** — a set of markdown files that Claude Code loads as behavioral rules, skill triggers, and memory protocols. It does not replace Engram; it extends it with:
- **Automatic skill invocation** (when to debug, verify, plan, save memory)
- **Model routing rules** (Opus / Sonnet / Haiku by task type)
- **Session lifecycle management** (start, work, close — with memory flush)
- **Multi-agent coordination** (SSOT, sub-agent dispatch, handoff protocol)
- **Local skills** (systematic-debugging, verification-before-completion, session-end, planning-with-files, experience-evolution)
---
## Architecture
```
engram-plus/workflow/
├── rules/ ← Layer 0: Always active (loaded every session)
├── docs/ ← Layer 1: On-demand reference
├── memory/ ← Layer 2: Hot data (updated each session)
├── skills/ ← Local invocable skills (SKILL.md format)
├── commands/ ← User-invocable slash commands
└── agents/ ← Specialized sub-agent definitions
```
### Three-Layer Loading Model
| Layer | Directory | When loaded |
|-------|-----------|-------------|
| **L0 — Rules** | `rules/` | Every session, always active |
| **L1 — Docs** | `docs/` | On-demand, when referenced |
| **L2 — Memory** | `memory/` | Hot data, updated each session |
---
## Layer 0 — Always Active Rules
| File | Purpose |
|------|---------|
| `rules/behaviors.md` | Model routing, debugging protocol, commits, quality control |
| `rules/skill-triggers.md` | When to invoke each skill automatically (P0 = mandatory) |
| `rules/memory-flush.md` | When to call mem_save, mem_session_summary, mem_context |
---
## Layer 1 — On-Demand Docs
| File | Purpose |
|------|---------|
| `docs/agents.md` | Agent assignment, sub-agent dispatch, SSOT multi-model contract |
| `docs/task-routing.md` | Detailed Opus/Sonnet/Haiku routing table |
| `docs/behaviors-extended.md` | Low-frequency rules, proactive association, plan review mode |
| `docs/content-safety.md` | Content security, context isolation, quality control |
| `docs/scaffolding-checkpoint.md` | Low-scaffolding checklist before starting a new project |
| `docs/PROJECT_CONTEXT_template.md` | Template for per-project PROJECT_CONTEXT.md |
---
## Layer 2 — Memory Files
| File | Purpose |
|------|---------|
| `memory/today.md` | Daily session log (format: `### SN (~HH:MM) [Project] Description`) |
| `memory/projects.md` | Cross-project status summary |
| `memory/goals.md` | Weekly / monthly / quarterly objectives |
| `memory/active-tasks.json` | Multi-session in-flight tasks |
---
## Local Skills
| Skill | Trigger | Mode |
|-------|---------|------|
| `systematic-debugging` | Bug or error found | Active |
| `verification-before-completion` | Before declaring "done" | Active |
| `session-end` | Exit signal detected | Active |
| `planning-with-files` | Task > 5 files or > 5 tool calls | Active |
| `experience-evolution` | Every session close | Observe-only |
---
## Requirements
- [Claude Code](https://claude.ai/claude-code) CLI
- [Engram](https://github.com/Gentleman-Programming/engram) plugin installed and running
- `gh` CLI (for GitHub operations referenced in some skills)
---
## Installation
1. Clone this repository:
```bash
git clone https://github.com/JantonioFC/engram-plus-workflow.git
cd engram-plus-workflow
```
2. Add a reference to the Layer 0 rules in your `~/.claude/CLAUDE.md`:
```markdown
## Workflow
Always load at session start:
- workflow/rules/behaviors.md
- workflow/rules/skill-triggers.md
- workflow/rules/memory-flush.md
```
3. Copy `docs/PROJECT_CONTEXT_template.md` to the root of each project as `PROJECT_CONTEXT.md`.
4. Reset the memory files to blank templates before first use (they contain placeholder data).
---
## Customization
The workflow is designed to be adapted. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidance on:
- Modifying skill triggers for your workflow
- Adding custom skills
- Adjusting model routing thresholds
- Integrating with your own memory system
---
## Attributions
Inspired by:
- **[Engram](https://github.com/Gentleman-Programming/engram)** by Alan Buscaglia (Gentleman Programming) — the persistent memory layer this workflow is built on top of.
- **[claude-code-workflow](https://github.com/runesleo/claude-code-workflow)** by runesleo — conceptual inspiration for the layered architecture.
---
## License
[Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)](LICENSE)
You may share and adapt this work for non-commercial purposes with attribution.
Commercial use is not permitted.