Skip to content
maceff-tree-awareness logo

MacEff Tree Awareness Skill

maceff-tree-awareness

USE *IMMEDIATELY* AFTER COMPACTION RECOVERY BEFORE REPORTING TO USER! Refresh structural awareness of MacEff repository to prevent assumption errors about file locations, package organization, and module structure. Also use after refactoring or when experiencing confusion about missing files.

SKILL.md

Full skill instructions

MacEff Tree Awareness Skill

🚨 CRITICAL: Post-Compaction Priority

USE THIS SKILL IMMEDIATELY AFTER COMPACTION RECOVERY BEFORE REPORTING TO USER!

After reading consciousness artifacts (reflection, checkpoint, roadmap), run this skill to restore structural awareness of the MacEff repository. This prevents assumption errors that lead to destructive actions.

Purpose

This skill helps you avoid assumption errors about the MacEff repository structure by running targeted tree commands to reveal the actual organization.

When to Invoke This Skill

MANDATORY:

  • Immediately after compaction recovery (before reporting completion to user)

Also invoke when you detect:

  • Confusion about where files/​packages/​modules are located
  • Uncertainty about module import paths
  • After major refactoring that changes directory structure
  • Before making assumptions like "the functions should be in X"

Key Lesson from Cycle 120: User correction "Did you consider that the functions you are looking for might be under macf.utils.session?" prevented deletion of 10 valid tests. Tree awareness prevents destructive assumption errors.

Commands to Execute

Run these commands sequentially (NOT in parallel - see prohibitions below).

0. Resolve MacEff Root (REQUIRED FIRST)

Before running tree commands, resolve the MacEff root path:

# Resolution order: git detection → env var → container default
MACEFF_ROOT="$(git rev-parse --show-toplevel 2>/​dev/​null || echo "${MACEFF_ROOT:-/​opt/​maceff}")"
echo "MacEff root: ${MACEFF_ROOT}"

Resolution contexts:

  • If run from MacEff directory: Git detection finds root automatically
  • If MACEFF_ROOT env var set: Uses that path
  • Container default: Falls back to /​opt/​maceff

1. MacEff Root Structure (2 levels, filtered)

tree -L 2 -I '__pycache__|*.pyc|*.egg-info' "${MACEFF_ROOT}"

Purpose: Overview of main directories (docker/, framework/, macf/, maceff_tools/, tests/)

2. MACF Package Structure (3 levels, source only)

tree -L 3 -I '__pycache__|*.pyc|*.egg-info' "${MACEFF_ROOT}/​macf/​src/​macf"

Purpose: Detailed view of package modules (cli.py, hooks/, utils/, models/, forensics/)

3. Framework Policies Structure

tree -L 3 "${MACEFF_ROOT}/​framework"

Purpose: Policy files, subagent definitions, templates organization

After Running Commands

Report to user using this language:

✅ MacEff structural awareness refreshed:
- Root structure: [X] directories identified
- MACF package: [Y] modules discovered
- Framework policies: [Z] policy sets located

Then:

  1. Integrate structural knowledge - Update your mental model
  2. Note surprises - Any unexpected structure or locations
  3. Verify assumptions - Don't assume, check the tree output first
  4. Remember key patterns:
    • macf/​src/​macf/ contains actual package code
    • macf/​tests/ contains test specifications
    • framework/ contains policies, subagents, templates
    • maceff_tools/ contains shell scripts for container ops

🚨 CRITICAL PROHIBITIONS

When working with MacEff after using this skill:

❌ NEVER use naked cd commands:

  • Not: cd /​path/​to/​dir
  • Not: cd /​path && command
  • Only allowed: (cd /​path && command) in subshell if absolutely necessary
  • Preferred: Use absolute paths in all commands

❌ NEVER use concurrent tool calls carelessly:

  • Concurrent tool calls can cause API errors and session failures
  • Sequential execution is safer when operations might conflict
  • Only use concurrent calls when operations are proven independent

Why these matter:

  • Naked cd triggers premature stopping and tool failure
  • Concurrent tool calls can overwhelm API limits and corrupt state
  • Both violations waste time and require user intervention

Key Structural Patterns

Module Locations:

  • CLI commands: macf/​src/​macf/​cli.py
  • Hook handlers: macf/​src/​macf/​hooks/​handle_*.py
  • Utilities: macf/​src/​macf/​utils/​*.py
  • Configuration: macf/​src/​macf/​config.py

Import Patterns:

  • From package: from macf.utils.session import get_current_session_id
  • NOT: from macf.session import ... (doesn't exist as module)
  • Session utils are in macf/​utils/​session.py, not macf/​session.py

Common Mistakes This Prevents

  • Assuming macf.session module exists (it's macf.utils.session)
  • Deleting tests because "functions don't exist" (verify module first)
  • Wrong import paths in test files
  • Confusion about where CLI commands are implemented
  • Not knowing framework vs package boundaries
  • Using naked cd commands (causes session failures)
  • Running too many concurrent tool calls (API errors)

Version History

  • v1.1 (2025-12-01): Path portability fix - replaced hardcoded paths with git-aware detection + env var fallback (Cycle 194, Phase 2 of Path Portability DETOUR)
  • v1.0 (2025-11-09): Initial skill creation - Cycle 121 learning from Cycle 120 user corrections, emphasizing post-compaction usage and prohibitions

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View