Global Task Manager
Manages tasks in .claude/global-project/ with lightweight files + separate history. Auto-commits with jj on completion.
Handles task lifecycle, status tracking, and optional S3 sync.
Quick Reference
| User Says |
Action |
| "new task", "start work on..." |
Create task-XXX.md, ask title/priority |
| "mark done", "finished", "complete" |
status→done, jj commit, update history |
| "list tasks", "what's pending?" |
Show in_progress, then todo |
| "this week", "recent" |
Filter completed_at last 7 days |
| "cancel task X" |
status→cancelled, update history |
| "current task" |
Show in_progress tasks |
| "status report", "project status", "what's the state?" |
Generate status report (see Status Reporting) |
| "list projects", "show all projects" |
List all projects from S3 via s4ync list (requires S3 env vars) |
| Any work request (implement, fix, add, refactor...) |
Auto-create task silently before starting (see Auto Task Creation) |
File Structure
.claude/global-project/
├── project.md # Metadata (read references/schema.md for format)
├── project_history.md # Append-only log
├── task-001.md # Current state only
├── task-001-history.md # All changes (saves tokens)
└── ...
Statuses: backlog | todo | in_progress | done | cancelled
Priorities: low | medium | high | critical
Auto Task Creation
When the user makes a work request involving implementation, fixing, refactoring, or any significant change — automatically create a task before starting work, without asking for confirmation.
Trigger patterns
Any request containing verbs like: implement, fix, add, refactor, update, create, remove, migrate, optimize, write, build, integrate, change...
What to do
- Infer title from the user's request (concise, action-based: "Fix login bug", "Add CSV export", "Refactor auth module")
- Infer priority:
critical if "urgent"/"blocker", high if "fix"/"bug", medium otherwise
- Create
task-XXX.md with status: in_progress and started_at = now
- Create
task-XXX-history.md with created + status_change → in_progress entries
- Add
task_added | task-XXX to project_history.md
- Do not announce the task creation — proceed silently with the work
- When work is done, complete the task (see Completing Tasks)
Exceptions — do NOT auto-create a task when
- The request is a question, explanation, or analysis (no code change expected)
- A task for the same work already exists as
in_progress
- The user explicitly says "no task", "skip tracking", or similar
Workflow
First Use in Project
If .claude/global-project/ missing:
- Create
.claude/global-project/
- Create
project.md (read references/schema.md for full format):
shortname: kebab-case from directory name
git_repo: from .git/config if exists
jj_repo: true if .jj/ directory exists
- Create
project_history.md with created entry
Creating Tasks
- Read existing
task-*.md to get next sequential ID (task-001, task-002...)
- Create
task-XXX.md with frontmatter (see references/schema.md when creating files)
- Create
task-XXX-history.md with created entry
- Add
task_added | task-XXX to project_history.md
- If jj repo: run
jj new -m "task-XXX: {title}" when the task is completed (which is already there), not on creation
Optional: Create detailed files in .claude/global-project/task-XXX/:
overview.md: objectives, success criteria
approach.md: methodology
checklist.md: actionable steps
notes.md: insights during execution
Updating Tasks
- Edit
task-XXX.md frontmatter
- Append to
task-XXX-history.md: {timestamp} | {event} | {details}
- Events:
status_change, priority_change, note, title_change
- Update timestamps:
started_at: when → in_progress
completed_at: when → done or cancelled
Completing Tasks
When status → done or cancelled:
- Set
completed_at timestamp
- Update histories
- If
jj_repo: true: jj new -m "{task_title}"
- Add entry to
project_history.md
Listing Tasks
Read task-*.md files (ignore -history.md), filter by status/date.
Status Reporting
When asked for a project status or report:
- Read all
task-*.md frontmatter (skip -history.md files)
- Group by status:
in_progress, todo/backlog, done, cancelled
- For done tasks, check
completed_at — flag those within the last 7 days as "completed this week"
- Get versioning info using the Version Control procedure below
- Output a concise markdown report:
## Project Status — {project shortname}
**Branch**: {current branch/bookmark} | **Recent**: {latest commit summary}
**In progress** (N)
- task-XXX: title [priority]
**Completed this week** (N)
- task-XXX: title
**Backlog** (N tasks)
- If S3 env vars are present, sync the report alongside task files
Version Control
Use this procedure whenever version/commit information is needed (status reports, project init, etc.):
- Check for jj first: if
jj_repo: true in project.md or .jj/ directory exists:
- Current bookmark/branch:
jj log -r @ --no-pager -T 'if(bookmarks, bookmarks, "detached")'
- Recent changes:
jj log --no-pager -l 5 -T 'change_id.short() ++ " " ++ description.first_line() ++ "\n"'
- Fallback to git: if no jj, check for
.git/ directory:
- Current branch:
git branch --show-current
- Recent commits:
git log --oneline -5
- Neither: skip versioning info in output
Resolving s4ync Binary
Use this procedure whenever s4ync is needed:
- Check PATH:
which s4ync → use it if found
- Look for pre-built binary in plugin cache:
~/.claude/plugins/cache/arhuman-marketplace/global-project-manager/*/tools/s4ync/s4ync
Use Glob to find it; if found, use that path as S4YNC_BIN
- If binary not found, build from source:
- Find source dir via Glob:
~/.claude/plugins/cache/arhuman-marketplace/global-project-manager/*/tools/s4ync/
- Run
make build in that directory
- Use the resulting binary as
S4YNC_BIN
- If source not found either, inform the user that s4ync could not be found and suggest
make install in the plugin's tools/s4ync/ directory
Listing All Projects
When asked to list all projects (not just the current one):
If S3 env vars exist (MINIO_ENDPOINT, MINIO_ACCESS_KEY, MINIO_SECRET_KEY):
- Resolve
S4YNC_BIN using the procedure above
- Run
$S4YNC_BIN list
If no S3:
- S3 is the only cross-project registry; explain that
list projects requires S3 to be configured
S3 Sync (Optional)
If env vars exist (MINIO_ENDPOINT, MINIO_ACCESS_KEY, MINIO_SECRET_KEY):
- Resolve
S4YNC_BIN using the procedure above
- Sync to
s3://global_projects/{shortname}/
- Update
last_sync in project.md
Schema Details
Only read references/schema.md when creating new files. Contains field definitions, format examples, ID generation rules.
1---2name: global-project-manager3description: Task and project management in .claude/global-project/. Use when user ask for a new task.4---56# Global Task Manager78Manages tasks in `.claude/global-project/` with lightweight files + separate history. Auto-commits with jj on completion.9Handles task lifecycle, status tracking, and optional S3 sync.1011## Quick Reference1213| User Says | Action |14|-----------|--------|15| "new task", "start work on..." | Create task-XXX.md, ask title/priority |16| "mark done", "finished", "complete" | status→done, jj commit, update history |17| "list tasks", "what's pending?" | Show in_progress, then todo |18| "this week", "recent" | Filter completed_at last 7 days |19| "cancel task X" | status→cancelled, update history |20| "current task" | Show in_progress tasks |21| "status report", "project status", "what's the state?" | Generate status report (see Status Reporting) |22| "list projects", "show all projects" | List all projects from S3 via `s4ync list` (requires S3 env vars) |23| Any work request (implement, fix, add, refactor...) | Auto-create task silently before starting (see Auto Task Creation) |2425## File Structure2627```28.claude/global-project/29├── project.md # Metadata (read references/schema.md for format)30├── project_history.md # Append-only log31├── task-001.md # Current state only32├── task-001-history.md # All changes (saves tokens)33└── ...34```3536**Statuses**: `backlog` | `todo` | `in_progress` | `done` | `cancelled`37**Priorities**: `low` | `medium` | `high` | `critical`3839## Auto Task Creation4041When the user makes a work request involving implementation, fixing, refactoring, or any significant change — **automatically create a task before starting work**, without asking for confirmation.4243### Trigger patterns4445Any request containing verbs like: `implement`, `fix`, `add`, `refactor`, `update`, `create`, `remove`, `migrate`, `optimize`, `write`, `build`, `integrate`, `change`...4647### What to do48491. Infer title from the user's request (concise, action-based: "Fix login bug", "Add CSV export", "Refactor auth module")502. Infer priority: `critical` if "urgent"/"blocker", `high` if "fix"/"bug", `medium` otherwise513. Create `task-XXX.md` with `status: in_progress` and `started_at` = now524. Create `task-XXX-history.md` with `created` + `status_change → in_progress` entries535. Add `task_added | task-XXX` to `project_history.md`546. **Do not announce the task creation** — proceed silently with the work557. When work is done, complete the task (see Completing Tasks)5657### Exceptions — do NOT auto-create a task when5859- The request is a question, explanation, or analysis (no code change expected)60- A task for the same work already exists as `in_progress`61- The user explicitly says "no task", "skip tracking", or similar6263## Workflow6465### First Use in Project6667If `.claude/global-project/` missing:681. Create `.claude/global-project/`692. Create `project.md` (read `references/schema.md` for full format):70 - `shortname`: kebab-case from directory name71 - `git_repo`: from `.git/config` if exists72 - `jj_repo: true` if `.jj/` directory exists733. Create `project_history.md` with `created` entry7475### Creating Tasks76771. Read existing `task-*.md` to get next sequential ID (task-001, task-002...)782. Create `task-XXX.md` with frontmatter (see references/schema.md when creating files)793. Create `task-XXX-history.md` with `created` entry804. Add `task_added | task-XXX` to `project_history.md`815. If jj repo: run `jj new -m "task-XXX: {title}"` when the task is **completed** (which is already there), not on creation8283**Optional**: Create detailed files in `.claude/global-project/task-XXX/`:84- `overview.md`: objectives, success criteria85- `approach.md`: methodology86- `checklist.md`: actionable steps87- `notes.md`: insights during execution8889### Updating Tasks90911. Edit `task-XXX.md` frontmatter922. Append to `task-XXX-history.md`: `{timestamp} | {event} | {details}`93 - Events: `status_change`, `priority_change`, `note`, `title_change`943. Update timestamps:95 - `started_at`: when → `in_progress`96 - `completed_at`: when → `done` or `cancelled`9798### Completing Tasks99100When status → `done` or `cancelled`:1011. Set `completed_at` timestamp1022. Update histories1033. If `jj_repo: true`: `jj new -m "{task_title}"`1044. Add entry to `project_history.md`105106### Listing Tasks107108Read `task-*.md` files (ignore `-history.md`), filter by status/date.109110### Status Reporting111112When asked for a project status or report:1131. Read all `task-*.md` frontmatter (skip `-history.md` files)1142. Group by status: `in_progress`, `todo`/`backlog`, `done`, `cancelled`1153. For done tasks, check `completed_at` — flag those within the last 7 days as "completed this week"1164. Get versioning info using the Version Control procedure below1175. Output a concise markdown report:118 ```119 ## Project Status — {project shortname}120121 **Branch**: {current branch/bookmark} | **Recent**: {latest commit summary}122123 **In progress** (N)124 - task-XXX: title [priority]125126 **Completed this week** (N)127 - task-XXX: title128129 **Backlog** (N tasks)130 ```1316. If S3 env vars are present, sync the report alongside task files132133## Version Control134135Use this procedure whenever version/commit information is needed (status reports, project init, etc.):1361371. **Check for jj first**: if `jj_repo: true` in `project.md` or `.jj/` directory exists:138 - Current bookmark/branch: `jj log -r @ --no-pager -T 'if(bookmarks, bookmarks, "detached")'`139 - Recent changes: `jj log --no-pager -l 5 -T 'change_id.short() ++ " " ++ description.first_line() ++ "\n"'`1402. **Fallback to git**: if no jj, check for `.git/` directory:141 - Current branch: `git branch --show-current`142 - Recent commits: `git log --oneline -5`1433. **Neither**: skip versioning info in output144145## Resolving s4ync Binary146147Use this procedure whenever `s4ync` is needed:1481491. Check PATH: `which s4ync` → use it if found1502. Look for pre-built binary in plugin cache:151 ```152 ~/.claude/plugins/cache/arhuman-marketplace/global-project-manager/*/tools/s4ync/s4ync153 ```154 Use `Glob` to find it; if found, use that path as `S4YNC_BIN`1553. If binary not found, build from source:156 - Find source dir via Glob: `~/.claude/plugins/cache/arhuman-marketplace/global-project-manager/*/tools/s4ync/`157 - Run `make build` in that directory158 - Use the resulting binary as `S4YNC_BIN`1594. If source not found either, inform the user that s4ync could not be found and suggest `make install` in the plugin's `tools/s4ync/` directory160161## Listing All Projects162163When asked to list all projects (not just the current one):164165If S3 env vars exist (`MINIO_ENDPOINT`, `MINIO_ACCESS_KEY`, `MINIO_SECRET_KEY`):166- Resolve `S4YNC_BIN` using the procedure above167- Run `$S4YNC_BIN list`168169If no S3:170- S3 is the only cross-project registry; explain that `list projects` requires S3 to be configured171172## S3 Sync (Optional)173174If env vars exist (`MINIO_ENDPOINT`, `MINIO_ACCESS_KEY`, `MINIO_SECRET_KEY`):175- Resolve `S4YNC_BIN` using the procedure above176- Sync to `s3://global_projects/{shortname}/`177- Update `last_sync` in `project.md`178179## Schema Details180181**Only read `references/schema.md` when creating new files.** Contains field definitions, format examples, ID generation rules.