Your Personal Workspace Scaffolding Package
Cupcake transforms a blank workspace into a fully-equipped development environment with automated learning consolidation, knowledge management, and intelligent agent support.
Cupcake is a workspace scaffolding system that provides:
- 📁 Organized Folder Structure - Projects, skills, learnings, and development work
- 🧠 Agent Memory System - Automated learning consolidation across chat sessions
- 📋 Atomic Rules - Consistent agent behavior (archive-don't-delete, checkbox discipline, economy)
- 📝 Template System - Quick project creation with built-in structure
- 🔧 Skills - Extensible capabilities following agentskills.io spec
- Zero-Context Ready - Any stateless AI agent can pick up where others left off
- Economy First - Combat context bloat through aggressive consolidation
- Knowledge Persistence - Important insights don't get lost between sessions
- Lightweight Process - Simple, repeatable, common-sense approach
# Copy the entire FAKEROOT contents to your workspace root
cp -r FAKEROOT/* /path/to/your/workspace/
cd /path/to/your/workspaceEdit USERS.md to add your basic info:
**Name:** Your Name
**Role:** Your Role (Developer, Designer, etc.)Optional: Edit agent/counter-register.md to adjust consolidation cadence if desired.
Create hooks in .cursor/hooks/ (if your IDE supports it):
on-agent-start.sh:
#!/bin/bash
python agent/scripts/counter-increment.pyon-agent-end.sh:
#!/bin/bash
python agent/scripts/counter-check.pyMake executable:
chmod +x .cursor/hooks/*.shIf your IDE doesn't support hooks, you can run consolidation manually:
# Check current counter and trigger actions
python agent/scripts/counter-check.py
# If actions are triggered, activate the agent-memory skill
# and tell it to run the specified actionCreate your first project:
# Copy the template
cp -r my-projects/template/YYYYMMDD-\[topic-name\] my-projects/20260418-my-first-project
# Edit the files
cd my-projects/20260418-my-first-project
# Update readme.md, use scratchpad.md for work, record learnings in learnings.mdmy-projects/ # All project work
template/ # Template for new projects (copy this)
YYYYMMDD-[topic]/ # Your dated project folders
readme.md # Project overview
scratchpad.md # Temporary working doc
learnings.md # Permanent project learnings
gleanings.md # Temporary gleanings (auto-created/deleted)
z_archive/ # Archived files
my-skills/ # Skill definitions (agentskills.io spec)
agent-memory/ # Learning consolidation skill
skill-creator/ # Skill creation helper
my-dev/ # Development workspace (optional)
my-learnings/ # Workspace-level learning consolidation
learnings-primary.md # Top 30 + bottom register
learning-categories/ # Categorized overflow
agent/ # Agent infrastructure
rules/ # Atomic rules (archive, checkbox, economy)
scripts/ # Counter scripts
hooks/ # Hook definitions
counter-register.md # Counter state + consolidation programs
AGENTS.md # Critical info for AI agents
USERS.md # Critical info about you
LEARNINGS.md # Workspace learnings overview
Every chat turn increments a counter. When certain milestones are hit, consolidation actions trigger:
| Counter | Action | What Happens |
|---|---|---|
| 5, 10, 15... | Glean | Extract learnings from recent conversation → gleanings.md |
| 15, 30, 45... | Consolidate | Merge gleanings into learnings files, delete gleanings |
| 50, 100, 150... | Review Critical | Identify patterns for USERS.md / AGENTS.md |
| 100, 200, 300... | Deep Consolidation | Aggressive pruning, reorganization, optimization |
my-learnings/learnings-primary.md has a top register limited to 30 items.
Why? Economy. Context is finite. The top 30 should be your most valuable learnings.
When it exceeds 30:
- Items are scored on value, criticality, complexity, breadth
- Lowest-scoring items move to bottom register
- Bottom register can overflow to category files
Work → Chat → Chat → Chat → Chat → Chat
↓
[Counter=5: Glean]
Create gleanings.md
↓
Work → Chat → Chat → Chat → Chat → Chat
↓
[Counter=10: Glean]
Append to gleanings.md
↓
Work → Chat → Chat → Chat → Chat → Chat
↓
[Counter=15: Consolidate]
Merge gleanings → learnings
Delete gleanings.md
↓
Repeat...
Never delete files. Always move to z_archive/ instead.
Good:
mv old-file.md z_archive/old-file.mdBad:
rm old-file.md- ✅ Checked = finished (reference only, don't modify)
- ☐ Unchecked = must resolve before moving on
Always resolve unchecked items before starting new work.
Prioritize brevity. Eliminate redundancy. Maintain focus.
Good:
Use SQLite over Postgres (simpler setup, sufficient scale)Bad:
After discussing the trade-offs, we decided that SQLite would be
better than Postgres because it's simpler to set up and should be
sufficient for our current scale...DATE=$(date +%Y%m%d)
PROJECT_NAME="my-new-project"
cp -r my-projects/template/YYYYMMDD-\[topic-name\] my-projects/${DATE}-${PROJECT_NAME}- Update
readme.md- Explain the project - Use
scratchpad.md- Task lists, analysis, working notes - Record in
learnings.md- Decisions, findings, patterns - Let agent-memory do the rest - Gleanings and consolidation happen automatically
Cupcake ships with two skills (following agentskills.io spec):
Handles all learning consolidation:
- Gleaning conversations for insights
- Consolidating gleanings into learnings
- Reviewing for critical information
- Deep consolidation and pruning
Activate when counter triggers an action.
Helps create new skills following Anthropic's specification.
Use when you want to add new capabilities to your workspace.
Edit agent/counter-register.md to change when actions trigger:
| Modulo | Period | Action | Description |
|--------|--------|--------|-------------|
| 10 | Every 10 chats | glean-chat | Change from 5 to 10 |Create new rule files in agent/rules/:
touch agent/rules/my-custom-rule.mdFollow the format of existing rules (clear, atomic, actionable).
Use the skill-creator skill or follow agentskills.io spec:
my-skills/my-new-skill/
SKILL.md
references/
scripts/
Check that hooks are set up correctly and scripts are executable:
ls -l agent/scripts/*.py # Should show -rwxr-xr-xCheck the counter value:
python agent/scripts/counter-check.pyShould show triggered actions when counter % 15 == 0.
Run deep consolidation manually:
# Activate agent-memory skill with action: deep-consolidationDuring deep consolidation, merge related categories. Use common sense.
Cupcake is designed around these principles:
Atomic Structure - Every piece (rules, skills, learnings) is self-contained
Adaptability - System adjusts to different project types and workflows
Economy - Aggressive about preventing context bloat
Usefulness - Only keep what's actionable or critical
Robustness - System survives interruptions, works with zero context
- Python 3.6+ (for counter scripts)
- IDE with hook support (optional, for automation)
- AI agent with skill support (for agent-memory)
[Specify your license here]
- Agent Skills spec: https://agentskills.io/
- Inspired by effective knowledge management and context economy principles
- Install Cupcake in your workspace
- Configure USERS.md with your info
- Create your first project from template
- Start working - let agent-memory handle the rest
Happy building! 🧁