← Back to Skills Marketplace
noquant

Focus Tree

by noquant · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
325
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install focus-tree
Description
Maintain persistent focus on active work with hierarchical task tracking. Prevents the agent from forgetting mid-project context, drifting between topics, or...
README (SKILL.md)

Focus Tree

Session content focus tree with checklist tracking. Extracts decisions, TODOs, constraints, and context into a single-root hierarchical structure for better conversation alignment and task management.

Core Principles

  1. Alignment — Maintain synchronized understanding between agent and user. The FOCUS.md serves as a shared source of truth that both parties can reference.

  2. Focus — Keep the agent anchored to the current task. Prevents drifting between topics or losing track after session compactions.

  3. Planning — Enable structured, step-by-step task execution. Break down complex work into manageable hierarchical sub-tasks with clear progress tracking.

When to Read FOCUS.md

  • Every session start (before responding to first message)
  • After every compaction (if context feels thin, read it)
  • When the user asks about current work ("what are we doing?", "where were we?")

When to Write/Update FOCUS.md

Agents update FOCUS.md directly using file tools when:

Trigger Action Example
user_request User says "start new project" Write new FOCUS.md with Focus Point and TODOs
task_complete User says "task done" Edit TODO line:
priority_shift User changes priorities Edit Focus Point line
new_project Starting new focused project Write new FOCUS.md, archive old if exists
heartbeat Heartbeat check reveals blockers Edit Status line, add Blockers section

Additional actions:

  • When work is DONE — append to FOCUS-LOG.md and clear/write new FOCUS.md
  • Before compaction memory flushes — ensure FOCUS.md reflects current state

Rules

  1. One focus at a time. If the user pivots, archive the old focus first.
  2. Keep it short. FOCUS.md should be \x3C50 lines. It's a resume point, not a journal.
  3. 📖 Context is sacred. Always update it before stopping work. Future-you reads this first.
  4. Don't duplicate memory files. FOCUS.md tracks what we're doing now. Daily memory files track what happened. Different jobs.
  5. Archive when done. Append completed focuses to FOCUS-LOG.md with completion date and outcome, then clear FOCUS.md.
  6. Read it, don't ask. If FOCUS.md exists, read it and resume. Don't ask "what were we working on?" when the answer is in the file.

File Roles

Focus Tree uses three distinct files for different purposes:

File Purpose When to Update
FOCUS.md Current work state — What we're doing NOW Every task change, status change, or context shift
FOCUS-LOG.md Completed work history — Archive of finished focuses Only when archiving a completed/blocked focus
MEMORY.md Long-term curated memory — Important insights, lessons, preferences Periodically distill from daily notes

Key principle: FOCUS.md tracks what we're doing now. Daily memory files track what happened. FOCUS-LOG tracks what we finished. Different jobs.

FOCUS.md Structure

Focus Tree uses a hierarchical tree structure. Here's the complete format:

# FOCUS.md - Current Focus

🎯 **Focus Point**: [Task Name]

**Started:** [Date]
**Status:** [active/paused/blocked]

📝 TODOs
☐ [Task 1]
☐ [Task 2]

📖 Context
[Current context/notes]
🚧 [Blocker if any]

Tree View

Hierarchical structure showing nesting levels:

🎯 Focus Point (Root)
├── 📌 Decisions
├── 📝 TODOs (max 2 levels)
│   ├── ✅ Level 1 task
│   │   ├── Level 2 sub-task (no icon)
│   │   └── Level 2 sub-task
│   └── ⏳ Level 1 task
├── ⚠️ Constraints
├── 🤖 Sub-Agents
└── 📖 Context
    └── 🚧 Blockers

Field Reference

Field Prefix Required Description
Focus Point 🎯 ✅ Yes Root task name
TODOs ☐/⏳/✅ ✅ Yes Task checklist
Context 📖 ✅ Yes Active state + blockers
Decisions 📌 ❌ No Key decisions made
Constraints ⚠️ ❌ No Limitations/requirements
Sub-Agents 🤖 ❌ No Spawned agents status
Started - ❌ No Start date
Status - ❌ No active/paused/blocked

Usage

Focus Tree operates on FOCUS.md and FOCUS-LOG.md directly.

Option 1: CLI Script (recommended)

node scripts/focus.mjs init "Project Name"    # Initialize
node scripts/focus.mjs add-todo "Task"        # Add task
node scripts/focus.mjs done 1                 # Mark done
node scripts/focus.mjs status active          # Update status
node scripts/focus.mjs archive "Outcome"      # Archive

Option 2: Direct File Operations

read /path/to/workspace/FOCUS.md
edit /path/to/workspace/FOCUS.md
  old: "☐ Incomplete task"
  new: "✅ Completed task"

Context Section Details

The 📖 Context section serves as the "Active State" — it's the resume point after compaction.

What to include:

  • What was the last thing done
  • What's the next action
  • Any blockers or waiting

Always update Context before stopping work. Future-you will read this first.

Content Parsing

When editing FOCUS.md, agents should use these section prefixes:

Section Prefix Example Placement
Decisions 📌 📌 Decided to use Node.js Optional section after TODOs
TODOs ☐/⏳/✅ ☐ Implement feature Required section
Constraints ⚠️ ⚠️ Must use TypeScript Optional section after TODOs
Blockers 🚧 🚧 Waiting for API key Inside 📖 Context section
Context 📖 📖 Current status... Required section (last)
Sub-Agents 🤖 🤖 label — task — status Optional section before Context

Display Format

  • TODOs Level 1: Icon prefix
    • = completed
    • = in progress
    • = pending
  • TODOs Level 2: Plain list, no icon prefix
  • Decisions: prefix 📌
  • Constraints: prefix ⚠️
  • Context: prefix 📖

FOCUS-LOG.md Format

Append-only log of completed focuses:

# Focus Log

## [Project Name] — COMPLETED YYYY-MM-DD
**Duration:** X hours/days
**Outcome:** One-line result

## [Project Name] — ARCHIVED YYYY-MM-DD
**Duration:** X hours/days
**Outcome:** Partial completion note
**Status:** incomplete

Integration with AGENTS.md

Add to your session-start routine, after reading SOUL.md and USER.md:

  • Read FOCUS.md if it exists → resume work or acknowledge status
  • If no FOCUS.md exists → check MEMORY.md for recent context
  • Proceed with current focus or start new

Integration with HEARTBEAT.md

Focus Tree provides dedicated heartbeat integration:

Heartbeat triggers:

  • Check current FOCUS.md status
  • Detect blockers → edit 📖 Context section, add 🚧 [blocker description]
  • Update Status line if needed

HEARTBEAT.md format:

# HEARTBEAT.md

Focus Tree Trigger-based Updates

## Trigger Conditions
1. **User request** — User explicitly says "start new task"
2. **Heartbeat check** — Check FOCUS.md status, update Blockers

## Execution Flow
1. Read FOCUS.md
2. Detect task status (if blocked, edit FOCUS.md to add Blockers)
3. Write/Edit FOCUS.md as needed

## No Auto-extraction
- Do not auto-extract tasks from conversation
- Only update on explicit trigger conditions
Usage Guidance
This skill appears to do what it says: read and update two files (FOCUS.md and FOCUS-LOG.md) to maintain a single active work focus. Before installing or enabling it: (1) ensure you have Node available if you want to run the bundled script; (2) back up any existing FOCUS.md/FOCUS-LOG.md in your workspace because the tool may overwrite them; (3) do not store secrets or sensitive credentials in FOCUS.md (the skill will read/write that file); and (4) verify the repository/source if provenance matters (the package is MIT-licensed and small, but the homepage is 'unknown' in the metadata). Otherwise there are no signs of hidden network calls, extra credential requests, or escalated privileges.
Capability Analysis
Type: OpenClaw Skill Name: focus-tree Version: 1.0.1 The focus-tree skill is a utility designed to help an AI agent maintain task context across sessions using local Markdown files (FOCUS.md and FOCUS-LOG.md). The core logic in scripts/focus.mjs is limited to basic file I/O and string manipulation for task tracking, with no network requests, sensitive data access, or suspicious execution patterns. The instructions in SKILL.md are consistent with the stated goal of hierarchical task management and do not contain malicious prompt-injection attempts.
Capability Assessment
Purpose & Capability
Name/description require a local file-based focus tracker; the package.json and scripts/focus.mjs implement exactly that. The declared required binary 'node' is appropriate and nothing else (binaries/env/config) is requested.
Instruction Scope
SKILL.md instructs the agent to read and update FOCUS.md and FOCUS-LOG.md at session boundaries and on triggers — this matches the script which reads/writes only those files in the current working directory. Note: the skill intentionally performs local filesystem reads/writes (it will create/overwrite FOCUS.md and append to FOCUS-LOG.md), so users should avoid storing secrets in those files and consider backing up any existing FOCUS.md before use.
Install Mechanism
No install spec; this is instruction-only plus a small Node script included in the bundle. There are no external downloads or package installs described, so nothing is written to disk beyond the script's normal file operations when run.
Credentials
No environment variables, credentials, or config paths are required. The script does not access unrelated services or secret-bearing env vars, so requested access is proportionate to the functionality.
Persistence & Privilege
always is false and the skill is user-invocable. The script persists data only to FOCUS.md and FOCUS-LOG.md in the current working directory; it does not modify system-wide settings or other skills' configs.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install focus-tree
  3. After installation, invoke the skill by name or use /focus-tree
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
**Changelog for focus-tree 1.0.1** - Major cleanup: Removed TypeScript build artifacts, distribution files, and all node_modules, slimming the repository. - Added a dedicated LICENSE file and a single entry-point script at scripts/focus.mjs. - Updated documentation to simplify usage: now encourages direct file editing or the use of the streamlined focus.mjs CLI script. - Clarified and unified process for FOCUS.md, FOCUS-LOG.md, and MEMORY.md roles. - Documentation is now shorter and more focused on plain, manual workflows.
v1.0.0
- Initial release of Focus Tree for persistent, hierarchical focus tracking and task management. - Tracks decisions, TODOs, constraints, blockers, and sub-agents in a single-root tree structure. - Prevents context loss after compaction and minimizes topic drift. - Offers clear session resume points and integrates with agent heartbeat/status routines. - Provides CLI scripts for tree update, retrieval, export, and alignment. - Supports triggered updates only—no automatic extraction from conversation.
Metadata
Slug focus-tree
Version 1.0.1
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 2
Frequently Asked Questions

What is Focus Tree?

Maintain persistent focus on active work with hierarchical task tracking. Prevents the agent from forgetting mid-project context, drifting between topics, or... It is an AI Agent Skill for Claude Code / OpenClaw, with 325 downloads so far.

How do I install Focus Tree?

Run "/install focus-tree" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Focus Tree free?

Yes, Focus Tree is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Focus Tree support?

Focus Tree is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Focus Tree?

It is built and maintained by noquant (@noquant); the current version is v1.0.1.

💬 Comments