David Shapiro's ACE Framework

Table of content
David Shapiro's ACE Framework

David Shapiro is an AI researcher and content creator who focuses on cognitive architectures and autonomous agents. He has over 180,000 subscribers on his YouTube channel where he covers AI systems design, and published a peer-reviewed paper on the ACE framework through arXiv. His work on “heuristic imperatives” explores how to embed ethical constraints into AI systems.

The ACE (Autonomous Cognitive Entity) framework structures AI systems into distinct layers with clear responsibilities, similar to the OSI model for networking. Each layer handles specific cognitive functions, from low-level task execution to high-level values. See ACE Framework Guide for step-by-step implementation.

The Six Layers

LayerNameFunctionPersonal OS Example
6AspirationalMission, values, ethics“Help me be more productive”
5Global StrategyLong-term planningQuarterly goal tracking
4Agent ModelSelf-knowledge, capabilities“I can read files, search web, run code”
3Executive FunctionTask decomposition, prioritizationBreaking projects into tasks
2Cognitive ControlAttention, focus, switchingDeciding what to work on now
1Task ExecutionActually doing thingsWriting code, sending emails

Layer 6: Aspirational

Defines mission, values, and ethical boundaries:

# aspirational_layer.yaml
mission: |
  Assist the user in achieving their professional and personal goals
  while maintaining their autonomy and well-being.  

values:
  - User privacy: Never share personal data externally
  - Honesty: Acknowledge uncertainty and limitations
  - Autonomy: Suggest, don't decide without approval
  - Growth: Help user learn, not just execute

ethical_boundaries:
  - No actions that could harm user's reputation
  - No financial decisions without explicit approval
  - No communication on user's behalf without review

Layer 5: Global Strategy

Long-term planning and goal alignment:

# global_strategy.yaml
current_objectives:
  - Launch newsletter by Q2
  - Improve coding skills
  - Maintain work-life balance

strategic_context:
  career_stage: "mid-career transition to AI"
  constraints:
    - 40 hours/week maximum
    - Family commitments evenings
  resources:
    - Strong writing background
    - Basic Python knowledge

Layer 4: Agent Model

Self-awareness of capabilities and limitations:

# agent_model.yaml
capabilities:
  - Read and write files
  - Execute Python and shell commands
  - Search the web
  - Access calendar via API
  - Send notifications

limitations:
  - Cannot access email directly (security)
  - Limited to 100k token context
  - No real-time data older than training cutoff
  - Cannot make phone calls

current_state:
  active_projects: 3
  pending_tasks: 12
  last_user_interaction: "2026-01-21T10:30:00Z"

Layer 3: Executive Function

Task decomposition and planning:

# executive_function.py
def decompose_goal(goal: str, context: dict) -> list[Task]:
    """
    Break high-level goal into actionable tasks.
    """
    # Reference global strategy for priorities
    strategy = load_global_strategy()

    # Use LLM to decompose
    tasks = llm.generate(f"""
    Goal: {goal}
    User context: {context}
    Strategic priorities: {strategy['current_objectives']}

    Break this into 3-7 concrete tasks.
    Each task should be completable in under 2 hours.
    Order by dependency, then priority.
    """)

    return parse_tasks(tasks)

Example decomposition:

Goal: "Launch newsletter by Q2"

Tasks:
1. Choose newsletter platform (1hr)
2. Design email template (2hr)
3. Write 3 initial posts (6hr)
4. Set up landing page (2hr)
5. Create social promotion plan (1hr)
6. Schedule launch sequence (1hr)

Layer 2: Cognitive Control

Moment-to-moment attention and focus:

# cognitive_control.py
def select_next_action(available_tasks: list, context: dict) -> Task:
    """
    Decide what to focus on right now.
    """
    # Check for urgent items
    urgent = [t for t in available_tasks if t.is_urgent]
    if urgent:
        return prioritize_urgent(urgent)

    # Check energy/time context
    if context['time_available'] < 30:  # minutes
        return select_quick_win(available_tasks)

    if context['energy_level'] == 'low':
        return select_low_effort(available_tasks)

    # Default: highest priority task
    return max(available_tasks, key=lambda t: t.priority_score)

Layer 1: Task Execution

Actually performing actions:

# task_execution.py
def execute_task(task: Task) -> Result:
    """
    Execute a single atomic task.
    """
    # Select appropriate tool
    if task.type == 'write':
        return write_file(task.target, task.content)
    elif task.type == 'research':
        return web_search(task.query)
    elif task.type == 'code':
        return run_python(task.script)
    elif task.type == 'communicate':
        return draft_message(task.recipient, task.content)

    # Log execution for learning
    log_execution(task, result)

    return result

Implementing ACE in Claude Code

You don’t need a complex codebase. Start with config files:

.claude/
  ace/
    aspirational.md      # Layer 6: Mission and values
    strategy.md          # Layer 5: Goals and context
    capabilities.md      # Layer 4: What I can do
    workflows.md         # Layer 3: How to decompose tasks
    priorities.md        # Layer 2: Current focus

aspirational.md:

# Mission

Help [Your Name] build a sustainable creative business while
maintaining health and relationships.

## Core Values

1. **Sustainability over speed** - Avoid burnout
2. **Quality over quantity** - Better to ship less, well
3. **Learning over knowing** - Ask questions, challenge assumptions
4. **Privacy** - Never expose personal data

## Boundaries

- No social media posting without explicit approval
- No financial transactions
- No communication as me without review

strategy.md:

# Current Objectives (Q1 2026)

1. Launch AI writing course
2. Grow newsletter to 5,000 subscribers
3. Maintain 3x/week exercise routine

## Context

- Working 35 hours/week on business
- Learning curve on video production
- Strong existing audience (2,000 subscribers)

## Constraints

- Budget: $500/month for tools
- No team (solo operation)
- Evening family time is protected

Using ACE in Prompts

Daily Planning

Reference my ACE configuration in .claude/ace/

Today's context:
- Energy: High (good sleep)
- Time available: 4 hours focused
- Deadline pressure: Medium

What should I focus on today given my strategic objectives
and current task list?

Decomposing Goals

Reference my ACE configuration.

Goal: Create promotional video for course launch

Decompose this into tasks that:
1. Match my current capabilities (check capabilities.md)
2. Align with my values (check aspirational.md)
3. Fit within 2-hour blocks

Decision Making

Reference my ACE configuration.

I'm considering: Adding a community feature to my course

Evaluate this against:
1. Strategic objectives (does it help Q1 goals?)
2. Resource constraints (time/money budget)
3. Values alignment (sustainability, quality)

Recommend: proceed, defer, or decline?

The Autonomy Spectrum

Shapiro’s framework supports different autonomy levels:

LevelDescriptionExample
0Full human controlEvery action requires approval
1Suggest onlyAI proposes, human executes
2Execute with approvalAI drafts, human confirms
3Execute and reportAI acts, human reviews after
4Full autonomyAI handles category of tasks

Recommended: Levels 1-2 for important decisions, level 3 for routine tasks.

# autonomy_settings.yaml
task_categories:
  financial: 0      # Never autonomous
  communication: 2  # Draft, await approval
  research: 3       # Execute, report results
  file_organization: 4  # Full autonomy
  scheduling: 2     # Propose, confirm

Implementation Checklist

  1. Define mission and values — One page, 5-7 core values, hard boundaries
  2. Document Q1 objectives — Top 3 goals, constraints (time/money/skills)
  3. List current capabilities — What tools/APIs can you access?
  4. Create task templates — How do content, learning, research goals decompose?
  5. Set autonomy levels — For each task type, what approval is needed?

Store these in .claude/ace/ and reference them in your prompts.


Next: Matt Shumer’s HyperWrite Agents

Topics: agents workflow automation prompting