Work

From cwinvestments/memstack · View interactive version

Work is an AI agent skill from the GitHub repository cwinvestments/memstack. Use when the user says 'plan', 'todo', 'copy plan', 'append plan', 'resume plan', 'priorities', or 'what's next'.

How to use this skill

Skill file

📋 Work: Plan Execution Engaged

Track tasks, manage plans, and survive CC compacts with three operating modes.

Activation

When this skill activates, output:

📋 Work: Plan execution engaged.

Then determine which mode to use based on the trigger.

Context Guard

| Context | Status |

|---------|--------|

| User says "copy plan", "append plan", "resume plan" | ACTIVE: use matching mode |

| User says "what's next", "todo", "priorities" | ACTIVE: quick query mode |

| User provides a task list or plan | ACTIVE: copy mode |

| General discussion about planning concepts | DORMANT: do not activate |

| User is executing a task (not managing the list) | DORMANT: do not activate |

Step 0: Silent Context Compilation (MANDATORY)

Before executing ANY mode, silently gather current state. Do NOT present findings. Do NOT ask questions. Just internalize:

  1. Read the project's STATE.md (if it exists): current task, blockers, next steps
  2. Read the project's CLAUDE.md (if it exists): conventions, architecture decisions
  3. Check recent diary:

```bash

python "${CLAUDE_PLUGIN_ROOT}/db/memstack-db.py" get-sessions <project> --limit 3

```

  1. Check git state:

```bash

git log --oneline -5

git diff --stat

```

This is silent. Synthesize an internal understanding of where the project stands. Then proceed to the triggered mode with full context. The user already knows their project state, don't waste their time repeating it back.

Mode 1: Copy Plan

Trigger: "copy plan" or when a new plan is provided

  1. Parse the entire plan into individual numbered tasks
  2. For each task, save to SQLite:

Write the payload to a file, then pipe it in with - as the argument. A payload on stdin is never seen by the shell's parser, so a redirection operator inside a task description cannot be read as one.

```bash

cat task.json | python "${CLAUDE_PLUGIN_ROOT}/db/memstack-db.py" add-plan-task -

```

task.json contains:

```json

{"project":"<name>","task_number":<n>,"description":"<task>","status":"pending"}

```

  1. Confirm with task count
  2. Also write a markdown copy to memory/projects/{project}-plan.md for human readability

Status values: pending, in_progress, completed, blocked

Mode 2: Append Plan (Update Tasks)

Trigger: "append plan" or when updating task statuses

  1. Read current plan from SQLite:

```bash

python "${CLAUDE_PLUGIN_ROOT}/db/memstack-db.py" get-plan <project>

```

  1. Update individual task statuses:

Same form, even though this payload is only metadata. One rule with no exceptions is easier to follow than a rule you have to judge.

```bash

cat task-update.json | python "${CLAUDE_PLUGIN_ROOT}/db/memstack-db.py" update-task -

```

task-update.json contains:

```json

{"project":"<name>","task_number":<n>,"status":"completed"}

```

  1. Add new tasks if needed via add-plan-task
  2. No size limits needed: SQLite handles scale

Mode 3: Resume Plan

Trigger: "resume plan", use after CC compact or new session

  1. Load plan from SQLite:

```bash

python "${CLAUDE_PLUGIN_ROOT}/db/memstack-db.py" get-plan <project>

```

  1. Parse the JSON output for task statuses
  2. Output a summary:

```

Plan: {project} ({done}/{total} complete)

Completed: [list]

In Progress: [list]

Pending: [list]

Blocked: [list with reasons]

Recommended next: {first pending task}

```

  1. Continue from the first incomplete task

Quick Commands

Inputs

Outputs

Example Usage

User: "resume plan for AdminStack"

📋 Work: Plan execution engaged.

Plan: AdminStack (5/9 complete)

[x] 1. Build CC Monitor page
[x] 2. Add setup guide
[x] 3. Fix API key validation
[x] 4. Add refresh feedback
[x] 5. Update guide with curl snippet
[ ] 6. Build cc-reporter.js Node script
[ ] 7. Add WebSocket real-time updates
[ ] 8. Session grouping by project
[!] 9. Mobile polish (blocked: waiting for design specs)

Recommended next: Task 6: Build cc-reporter.js

Level History

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.