@mgeri1993/claude-task-manager 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env.example ADDED
@@ -0,0 +1,2 @@
1
+ CTM_PORT=3333
2
+ CTM_RESTART=no
package/Dockerfile ADDED
@@ -0,0 +1,11 @@
1
+ FROM php:8.3-cli-alpine
2
+
3
+ RUN apk add --no-cache bash jq
4
+
5
+ WORKDIR /app
6
+ COPY . /app
7
+ RUN chmod +x /app/engine/task.sh /app/engine/projects.sh
8
+
9
+ EXPOSE 3333
10
+
11
+ CMD ["php", "-S", "0.0.0.0:3333", "-t", "/app"]
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 mgeri1993
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.hu.md ADDED
@@ -0,0 +1,255 @@
1
+ # claude-task-manager
2
+
3
+ 🌐 [English](README.md) | **Magyar**
4
+
5
+ ÖnĂĄllĂł, dockerizĂĄlt, **több projektet** kiszolgĂĄlĂł Kanban task-manager Claude Code
6
+ agentek (fƑ agent + teammate-ek) koordinĂĄlĂĄsĂĄhoz. Egy közös böngĂ©szƑs board, egy
7
+ token-hatĂ©kony, `--as <agent>`-alapĂș `task.sh` CLI, modul-szƱrĂ©s, Ă©s kĂ©tnyelvƱ
8
+ (angol/magyar) felĂŒlet — bĂĄrmelyik regisztrĂĄlt projektbƑl hĂ­vva, a CLI-hez docker nĂ©lkĂŒl.
9
+
10
+ ## KĂ©pernyƑkĂ©pek
11
+
12
+ | Kanban board (angol) | Task-részlet modal | Kanban board (magyar) |
13
+ |---|---|---|
14
+ | ![Kanban board, angol](docs/screenshots/board-kanban-en.png) | ![Task-részlet modal](docs/screenshots/board-modal-en.png) | ![Kanban board, magyar](docs/screenshots/board-kanban-hu.png) |
15
+
16
+ ## Telepítés
17
+
18
+ SzĂŒksĂ©ges: `git`, `bash`, `jq`, `docker` (a `docker compose` pluginnal) Ă©s `php` — ezek
19
+ csak akkor kellenek, ha a böngĂ©szƑs boardot is futtatod. Maga a `task.sh` CLI csak
20
+ `bash` + `jq`-t igényel, dockert nem.
21
+
22
+ ```bash
23
+ git clone https://github.com/GeRiY/claude-task-manager.git
24
+ cd claude-task-manager
25
+ cp .env.example .env # alap: board a 3333-as porton, autostart nĂ©lkĂŒl
26
+ ```
27
+
28
+ Vagy, ha klĂłnozĂĄs nĂ©lkĂŒl csak a `ctm` parancs kell:
29
+
30
+ ```bash
31
+ npm install -g @mgeri1993/claude-task-manager
32
+ ```
33
+
34
+ Ennyi — nincs build-lĂ©pĂ©s. EzutĂĄn jellemzƑen kĂ©t dolgot csinĂĄlsz:
35
+
36
+ 1. **Board indĂ­tĂĄsa** (opcionĂĄlis, csak a böngĂ©szƑs UI-hoz kell):
37
+ ```bash
38
+ ./bin/ctm up # elsƑ futtatĂĄskor image-et Ă©pĂ­t, 3333-as porton indul
39
+ # vagy mĂ©g a ctm parancs nĂ©lkĂŒl: docker compose up -d --build
40
+ ```
41
+ 2. **A `ctm` parancs globålis regisztrålåsa** és **az eszköz telepítése egy projektbe**,
42
+ hogy annak agentjei hasznĂĄlhassĂĄk a `task.sh`-t:
43
+ ```bash
44
+ ln -s "$(pwd)/bin/ctm" ~/.local/bin/ctm # gyƑzƑdj meg róla, hogy ~/.local/bin a PATH-adban van
45
+ cd /path/to/valamelyik/masik/projekt
46
+ ctm init # regisztralja + telepiti ABBA a projektbe
47
+ ```
48
+ (A `ctm init` az elsƑ futtatáskor a `ctm` szimlinket is automatikusan regisztrálja, így
49
+ a fenti kĂ©zi `ln -s` opcionĂĄlis — csak akkor kell, ha bĂĄrmilyen projektbe telepĂ­tĂ©s
50
+ elƑtt szeretnĂ©d elĂ©rhetƑvĂ© tenni a `ctm`-et.)
51
+
52
+ A teljes parancs-referenciåért låsd a [Gyors indulås](#gyors-indulås) szekciót lentebb.
53
+
54
+ ## ArchitektĂșra diĂłhĂ©jban
55
+
56
+ - **`engine/task.sh`** — a tĂ©nyleges Kanban-motor (jq-alapĂș, atomikus Ă­rĂĄs, lock,
57
+ `events.jsonl`-alapĂș inbox-Ă©rtesĂ­tĂ©s). `TM_DIR` env-vĂĄltozĂłval bĂĄrmelyik projekt sajĂĄt
58
+ adat-könyvtĂĄrĂĄra mutathatĂł. Minden futtatĂĄskor stderr-emlĂ©keztetƑt Ă­r, ha a projekt
59
+ preferált nyelve (a boardról állítva) nem angol — lásd [Nyelv](#nyelv--i18n).
60
+ - **`engine/projects.sh`** — projekt-regisztráló admin CLI: minden regisztrált projekthez
61
+ létrehoz egy `data/<id>/` adat-könyvtårat, és egy `wrappers/<id>.sh` wrappert, ami a
62
+ `TM_DIR`-t Ă©s az engine abszolĂșt ĂștjĂĄt mĂĄr **beĂ©getve** hordozza.
63
+ - **`data/<id>/`** — a projektek tĂ©nyleges tĂĄblĂĄi (`tasks.json`, `context.json`,
64
+ `events.jsonl`, `.cursors/`, `.board-lang`) — ITT Ă©lnek, nem a cĂ©lprojektben.
65
+ - **`index.html` + `js/*` + `style.css`** — a böngĂ©szƑs board. Docker compose-szal
66
+ szolgålja ki egy PHP beépített szerver; a Forrås-vålasztó a `data/projects.json`
67
+ regisztrålt projektjei közt vålt.
68
+ - **`api/index.php`** — a board ÍRÁS-endpointja: allowlistelt `task.sh` parancsokat futtat
69
+ a kivĂĄlasztott projekt `TM_DIR`-jĂ©vel (a böngĂ©szƑ sosem Ă­rja közvetlenĂŒl a JSON-t).
70
+ - **`install.sh`** / **`bin/ctm`** — egy tetszƑleges cĂ©lprojektbe telepĂ­ti a
71
+ `.claude/skills/task-manager/` mappĂĄt (wrapper `task.sh` + `SKILL.md`), a generikus
72
+ `ctm-*` teammate-agenteket, és az `allow-task-sh.sh` / `notify-inbox.sh` hookokat, majd
73
+ bƑvĂ­ti a cĂ©lprojekt Bash-allowlistjĂ©t.
74
+ - **`bin/add-agent.sh`** (`ctm agent add`) — egyedi, `tm-*` nevƱ teammate-definĂ­ciĂł
75
+ létrehozåsa egy mår telepített projektben.
76
+ - **`engine/check-update.sh`** — az admin-jellegƱ scriptek (`ctm`, `install.sh`,
77
+ `add-agent.sh`, `projects.sh`) forrĂĄsoljĂĄk be, hogy sĂĄrga "van Ășj verziĂł" jelzĂ©st
78
+ Ă­rjanak ki — lĂĄsd [NaprakĂ©szen tartĂĄs](#naprakĂ©szen-tartĂĄs).
79
+
80
+ **Fontos:** a `task.sh`-hĂ­vĂĄsokhoz (agent-munkavĂ©gzĂ©s) **egyĂĄltalĂĄn nem kell docker** — a
81
+ wrapperek sima host-bash scriptek. KizĂĄrĂłlag a böngĂ©szƑs **board** Ă©s az **API** fut
82
+ konténerben.
83
+
84
+ ## Gyors indulĂĄs
85
+
86
+ ### 1. A `ctm` parancs regisztrĂĄlĂĄsa
87
+
88
+ Bårmely telepítés (`install.sh` / `ctm init`) automatikusan regisztrålja a `ctm`-et a
89
+ PATH-on (`/usr/local/bin/ctm` vagy `~/.local/bin/ctm`, amelyik írható). Ha még sosem
90
+ futtattål telepítést, regisztrålhatod kézzel is:
91
+
92
+ ```bash
93
+ ln -s /path/to/claude-task-manager/bin/ctm ~/.local/bin/ctm
94
+ # gyƑzƑdj meg róla, hogy a ~/.local/bin a PATH-adban van
95
+ ```
96
+
97
+ ### 2. Board indĂ­tĂĄsa (docker)
98
+
99
+ ```bash
100
+ ctm up # alapértelmezett port: 3333 (låsd .env: CTM_PORT)
101
+ ctm up 4000 # mĂĄs port — ĂĄtĂ­rja a .env-et Ă©s ĂșjraindĂ­tja a kontĂ©nert
102
+ ```
103
+
104
+ A `ctm up` **idempotens**: ha a konténer mår fut ugyanazzal a konfiguråcióval, nem csinål
105
+ semmit; ha nem fut, elindĂ­tja; ha a port vĂĄltozott, ĂșjraindĂ­tja. Ha a kĂ©rt port mĂĄr
106
+ foglalt egy MÁS folyamat ĂĄltal, egyĂ©rtelmƱ hibĂĄval leĂĄll, mielƑtt dockert hĂ­vna.
107
+
108
+ ```bash
109
+ ctm down # board leĂĄllĂ­tĂĄsa
110
+ ctm autostart on|off # docker restart-policy (unless-stopped / no) — gĂ©p/docker
111
+ # ĂșjraindĂ­tĂĄskor is magĂĄtĂłl elinduljon-e a board
112
+ ```
113
+
114
+ A board ezutĂĄn elĂ©rhetƑ: `http://localhost:<port>/`. Az URL a `?project=<id>&lang=<en|hu>`
115
+ paramĂ©tereket is elfogadja, hogy egy adott projektre/nyelvre lehessen közvetlenĂŒl
116
+ mélylinkelni.
117
+
118
+ ### 3. Telepítés egy projektbe
119
+
120
+ BĂĄrmelyik projekt gyökerĂ©bƑl (vagy a git-repĂłjĂĄn belĂŒl bĂĄrhonnan) futtatva:
121
+
122
+ ```bash
123
+ cd /path/to/valamelyik/projekt
124
+ ctm init # id/label = a mappa neve
125
+ ctm init sajat-id "Szép Név" # explicit id/label
126
+ ctm init --force # felĂŒlĂ­rja a generĂĄlt fĂĄjlokat rĂĄkĂ©rdezĂ©s nĂ©lkĂŒl
127
+ ```
128
+
129
+ Ez létrehozza:
130
+
131
+ - `<projekt>/.claude/skills/task-manager/task.sh` — a projekt saját wrappere (`TM_DIR` +
132
+ az engine abszolĂșt Ăștja beĂ©getve; docker NEM szĂŒksĂ©ges).
133
+ - `<projekt>/.claude/skills/task-manager/SKILL.md` — Claude Code skill-dokumentáció
134
+ (a `task.sh`-hívási kontraktus, workflow, `context.json` stb.) — projekt-agnosztikus.
135
+ - `<projekt>/.claude/agents/ctm-frontend-developer.md`, `ctm-backend-developer.md`,
136
+ `ctm-code-investigator.md` — generikus teammate-definĂ­ciĂłk (a konkrĂ©t stack-et a
137
+ projekt sajĂĄt dokumentĂĄciĂłjĂĄbĂłl olvassĂĄk ki).
138
+ - `<projekt>/.claude/hooks/allow-task-sh.sh` + `notify-inbox.sh`, regisztrĂĄlva a
139
+ `<projekt>/.claude/settings.json`-ban — automatikusan engedĂ©lyezi a `task.sh`
140
+ Bash-hívåsokat, és inbox-értesítést injektål a hívó agentnek minden `task.sh` futås utån.
141
+ - `<projekt>/.claude/settings.local.json` — bƑvítve a `task.sh` Bash-allowlist
142
+ bejegyzĂ©sĂ©vel (engedĂ©lykĂ©rĂ©s nĂ©lkĂŒl).
143
+
144
+ Az Ășjrafuttatott `ctm init` **idempotens** — ha egy generĂĄlt fĂĄjl mĂĄr lĂ©tezik, rĂĄkĂ©rdez
145
+ felĂŒlĂ­rĂĄs elƑtt (kivĂ©ve `--force`/`-y`, vagy nem-interaktĂ­v mĂłdban, ahol kihagyja Ă©s
146
+ jelzi, hogy adj meg `--force`-ot). A `data/<id>/` tåbla tartalmåt sosem érinti, és a sajåt
147
+ `tm-*` egyedi agent-fĂĄjljaidhoz sem nyĂșl.
148
+
149
+ ### 4. Egyedi teammate hozzĂĄadĂĄsa
150
+
151
+ Egy mår telepített projektben, ha a 3 alap szerepkörön (frontend/backend/investigator)
152
+ felĂŒl mĂĄsra is szĂŒksĂ©ged van:
153
+
154
+ ```bash
155
+ cd /path/to/mar-telepitett-projekt
156
+ ctm agent add reviewer "KĂłdot review-z Ă©s minƑsĂ©gi kaput ellenƑriz."
157
+ ```
158
+
159
+ Létrehozza a `.claude/agents/tm-reviewer.md`-t. **Névkonvenció:** az `install.sh`/`ctm
160
+ init` generålta alap készlet mindig `ctm-*`; az így hozzåadott egyedi agentek mindig
161
+ `tm-*` — Ă­gy egy pillantĂĄsra lĂĄtszik, mi az automatikusan frissĂŒlƑ alap kĂ©szlet Ă©s mi a
162
+ sajĂĄt, kĂ©zzel szerkesztett kiegĂ©szĂ­tĂ©s (a `ctm init` a `tm-*` fĂĄjlokhoz sosem nyĂșl).
163
+
164
+ ### 5. Projektek kezelése
165
+
166
+ ```bash
167
+ ctm list # regisztrålt projektek (id, címke, adat-könyvtår)
168
+ ctm wrapper <id> # egy projekt generålt wrapperének kiíråsa (kézi måsolåshoz)
169
+ ctm rm <id> [--force] # projekt törlĂ©se a regisztrĂĄciĂłbĂłl (adat + wrapper) — rĂĄkĂ©rdez
170
+ ```
171
+
172
+ ## `task.sh` a projektbƑl (docker nĂ©lkĂŒl)
173
+
174
+ A telepĂ­tett wrapperen keresztĂŒl, a projekt sajĂĄt `.claude/skills/task-manager/`-jĂ©bƑl:
175
+
176
+ ```bash
177
+ /path/to/projekt/.claude/skills/task-manager/task.sh summary --as main
178
+ /path/to/projekt/.claude/skills/task-manager/task.sh list todo --as main
179
+ /path/to/projekt/.claude/skills/task-manager/task.sh list --module auth --as main
180
+ /path/to/projekt/.claude/skills/task-manager/task.sh add fix-1 "Bug fix" "leĂ­rĂĄs" --as main
181
+ /path/to/projekt/.claude/skills/task-manager/task.sh module fix-1 auth --as main
182
+ /path/to/projekt/.claude/skills/task-manager/task.sh status fix-1 in_progress --as main
183
+ ```
184
+
185
+ Teljes parancslista: `task.sh help`. A hĂ­vĂĄsi kontraktust (kötelezƑ `--as`, csupasz-hĂ­vĂĄs
186
+ szabĂĄly, review→done ĂĄtadĂĄsi kör) a telepĂ­tett `SKILL.md` Ă­rja le rĂ©szletesen. A taskok
187
+ tĂĄmogatnak egy opcionĂĄlis `module` mezƑt (szabad szöveg, pl. `auth`/`frontend`/`infra`)
188
+ csoportosĂ­tĂĄshoz/szƱrĂ©shez — beĂĄllĂ­tĂĄs: `task.sh module <id> <nĂ©v>`, szƱrĂ©s:
189
+ `task.sh list --module <nĂ©v>`, Ă©s a boardon is szƱrhetƑ.
190
+
191
+ ## Nyelv / i18n
192
+
193
+ A board alapból **angol**. Kattints a fejléc nyelv-gombjåra (vagy tedd hozzå az URL-hez
194
+ a `?lang=hu`-t) a **magyarra** vĂĄltĂĄshoz — a vĂĄlasztĂĄs megmarad `localStorage`-ban, Ă©s
195
+ tĂŒkrözƑdik az URL-ben (`?lang=hu`), Ă­gy egy board-link megoszthatĂł egy adott nyelven.
196
+
197
+ A nyelv **nem** kerĂŒl semelyik taskba vagy jegyzetbe. A board minden Ă­rĂĄsa elkĂŒldi az
198
+ aktuĂĄlis UI-nyelvet is; az `api/index.php` egy kis `data/<id>/.board-lang` fĂĄjlba menti
199
+ (nem a task-séma része). Az `engine/task.sh` minden futtatåskor beolvassa ezt a fåjlt
200
+ (kivĂ©ve `help`/`inbox`, a zaj elkerĂŒlĂ©se vĂ©gett), Ă©s — ha nem angol — egy emlĂ©keztetƑt Ă­r
201
+ ki stderr-re, pl.:
202
+
203
+ ```
204
+ [task-manager] Preferred language for this project: Hungarian — please reply and do the work in Hungarian.
205
+ ```
206
+
207
+ Így tudja meg egy `task.sh`-t futtatĂł agent (a Bash tooljĂĄn keresztĂŒl), milyen nyelvet
208
+ hasznĂĄlt a human a boardon, anĂ©lkĂŒl hogy ez az instrukciĂł valaha is bekerĂŒlne a
209
+ task-adatokba.
210
+
211
+ ## Naprakészen tartås
212
+
213
+ A `ctm`, `install.sh`, `add-agent.sh` Ă©s `projects.sh` mindegyike ellenƑrzi (egy
214
+ könnyƱsĂșlyĂș `git ls-remote`-tal, nem teljes fetch-csel), hogy az `origin` alapĂ©rtelmezett
215
+ ågån van-e olyan commit, ami a lokålis checkoutból hiånyzik. Ha igen, sårga jelzést ír ki,
216
+ hogy futtass egy `git pull`-t; ha mĂĄr naprakĂ©sz vagy, nem Ă­r ki semmit. Ez az ellenƑrzĂ©s
217
+ **szĂĄndĂ©kosan nem** fut le az `engine/task.sh`-ban — azt a scriptet minden egyes
218
+ task-mutåciónål meghívjåk (egy agent-sessionben gyakran sokszor), és egy hålózati
219
+ körĂŒljĂĄrĂĄs minden hĂ­vĂĄsnĂĄl valĂłs, ismĂ©tlƑdƑ kĂ©sleltetĂ©st adna a hot path-hoz.
220
+
221
+ ## Könyvtårszerkezet
222
+
223
+ ```
224
+ claude-task-manager/
225
+ engine/task.sh, projects.sh, check-update.sh # a motor + projekt-admin CLI + frissĂ­tĂ©s-ellenƑrzĂ©s
226
+ bin/ctm, add-agent.sh # a "ctm" parancssori belépési pont
227
+ install.sh # egy cĂ©lprojekt telepĂ­tƑje (a ctm init hĂ­vja)
228
+ templates/ # SKILL.md / ctm-* / tm-custom / hooks sablonok (__PLACEHOLDER__-ekkel)
229
+ api/index.php # a board Ă­rĂĄs-endpointja
230
+ index.html, js/, style.css # a böngĂ©szƑs board
231
+ favicon.svg, favicon.ico # board favicon
232
+ data/<id>/ # projektenkénti tåbla (gitignore-olva)
233
+ wrappers/<id>.sh # generålt, projektenkénti task.sh wrapperek (gitignore-olva)
234
+ docker-compose.yml, Dockerfile # a board+API konténerizålåsa (CTM_PORT, CTM_RESTART)
235
+ ```
236
+
237
+ ## Környezeti våltozók (`.env`)
238
+
239
+ | Våltozó | Alap | Jelentés |
240
+ |---|---|---|
241
+ | `CTM_PORT` | `3333` | A board portja (host loopback: `127.0.0.1:<port>`). A `ctm up <port>` ĂĄllĂ­tja. |
242
+ | `CTM_RESTART` | `no` | Docker restart-policy. `ctm autostart on` → `unless-stopped`. |
243
+
244
+ LĂĄsd a `.env.example`-t (a valĂłdi `.env` gitignore-olva van, mert a `ctm` Ă­rja/frissĂ­ti).
245
+
246
+ ## Biztonsågi megjegyzések
247
+
248
+ - A board docker-portja kizĂĄrĂłlag `127.0.0.1`-re van kötve (sosem `0.0.0.0`-ra) — a LAN-rĂłl
249
+ nem elĂ©rhetƑ, csak magĂĄrĂłl a host gĂ©prƑl.
250
+ - Az Ă­rĂĄs-endpoint (`api/index.php`) csak egy explicit parancs-allowlistet futtat
251
+ (`status`, `note`, `priority`, `module`, `tag`, `assign`, `dep`, `status-many`, `reopen`,
252
+ `add`) — a destruktív parancsok (`rm`, `restore`, `raw`, `archive`) sosincsenek kiengedve
253
+ a böngĂ©szƑnek.
254
+ - Minden írås-kérésben a `project` id-t a `data/projects.json` regisztrålt liståja ellen
255
+ ellenƑrizzĂŒk — a kliens sosem tud tetszƑleges könyvtĂĄrra mutatni az API-val.
package/README.md ADDED
@@ -0,0 +1,253 @@
1
+ # claude-task-manager
2
+
3
+ 🌐 **English** | [Magyar](README.hu.md)
4
+
5
+ A standalone, dockerized, **multi-project** Kanban task manager for coordinating Claude
6
+ Code agents (main agent + teammates). One shared browser board, a token-efficient
7
+ `--as <agent>`-based `task.sh` CLI, module filtering, and a bilingual (English/Hungarian)
8
+ UI — callable from any registered project, no docker required for the CLI itself.
9
+
10
+ ## Screenshots
11
+
12
+ | Kanban board (English) | Task detail modal | Kanban board (Hungarian) |
13
+ |---|---|---|
14
+ | ![Kanban board, English](docs/screenshots/board-kanban-en.png) | ![Task detail modal](docs/screenshots/board-modal-en.png) | ![Kanban board, Hungarian](docs/screenshots/board-kanban-hu.png) |
15
+
16
+ ## Install
17
+
18
+ Requirements: `git`, `bash`, `jq`, `docker` (with the `docker compose` plugin) and `php`
19
+ are only needed if you plan to run the browser board — the `task.sh` CLI itself only
20
+ needs `bash` + `jq`, no docker.
21
+
22
+ ```bash
23
+ git clone https://github.com/GeRiY/claude-task-manager.git
24
+ cd claude-task-manager
25
+ cp .env.example .env # default: board on port 3333, no autostart
26
+ ```
27
+
28
+ Or, if you just want the `ctm` command without cloning:
29
+
30
+ ```bash
31
+ npm install -g @mgeri1993/claude-task-manager
32
+ ```
33
+
34
+ That's it — there's no build step. Two things you'll typically do next:
35
+
36
+ 1. **Start the board** (optional, only needed for the browser UI):
37
+ ```bash
38
+ ./bin/ctm up # builds the image on first run, starts on port 3333
39
+ # or without the ctm command yet: docker compose up -d --build
40
+ ```
41
+ 2. **Register the `ctm` command globally** and **install this tool into a project**, so
42
+ its agents can use `task.sh`:
43
+ ```bash
44
+ ln -s "$(pwd)/bin/ctm" ~/.local/bin/ctm # make sure ~/.local/bin is on your PATH
45
+ cd /path/to/some/other/project
46
+ ctm init # registers + installs into THAT project
47
+ ```
48
+ (`ctm init` also registers the `ctm` symlink automatically the first time it runs, so
49
+ the manual `ln -s` above is optional — only needed if you want `ctm` available before
50
+ installing into any project.)
51
+
52
+ See [Quick start](#quick-start) below for the full command reference.
53
+
54
+ ## Architecture in a nutshell
55
+
56
+ - **`engine/task.sh`** — the actual Kanban engine (jq-based, atomic writes, locking,
57
+ `events.jsonl`-based inbox notifications). Points at any project's own data directory via
58
+ the `TM_DIR` environment variable. Prints a stderr reminder on every run if the project's
59
+ preferred language (set from the board) isn't English — see [Language](#language--i18n).
60
+ - **`engine/projects.sh`** — the project-registration admin CLI: for every registered
61
+ project it creates a `data/<id>/` data directory and a `wrappers/<id>.sh` wrapper that
62
+ already has `TM_DIR` and the engine's absolute path **baked in**.
63
+ - **`data/<id>/`** — the projects' actual tables (`tasks.json`, `context.json`,
64
+ `events.jsonl`, `.cursors/`, `.board-lang`) — they live HERE, not in the target project.
65
+ - **`index.html` + `js/*` + `style.css`** — the browser board. Served by a PHP built-in
66
+ server via docker compose; the Source selector switches between the projects registered
67
+ in `data/projects.json`.
68
+ - **`api/index.php`** — the board's WRITE endpoint: runs allowlisted `task.sh` commands
69
+ with the selected project's `TM_DIR` (the browser never writes the JSON directly).
70
+ - **`install.sh`** / **`bin/ctm`** — installs `.claude/skills/task-manager/` (wrapper
71
+ `task.sh` + `SKILL.md`), the generic `ctm-*` teammate agents, and the `allow-task-sh.sh` /
72
+ `notify-inbox.sh` hooks into an arbitrary target project, and extends its Bash allowlist.
73
+ - **`bin/add-agent.sh`** (`ctm agent add`) — creates a custom, `tm-*`-named teammate
74
+ definition in an already-installed project.
75
+ - **`engine/check-update.sh`** — sourced by the admin-facing scripts (`ctm`, `install.sh`,
76
+ `add-agent.sh`, `projects.sh`) to print a yellow "update available" notice — see
77
+ [Staying up to date](#staying-up-to-date).
78
+
79
+ **Important:** `task.sh` calls (agent work) need **no docker at all** — the wrappers are
80
+ plain host-bash scripts. Only the browser **board** and its **API** run in a container.
81
+
82
+ ## Quick start
83
+
84
+ ### 1. Register the `ctm` command
85
+
86
+ Any install (`install.sh` / `ctm init`) registers `ctm` on PATH automatically
87
+ (`/usr/local/bin/ctm` or `~/.local/bin/ctm`, whichever is writable). If you've never run an
88
+ install yet, register it by hand:
89
+
90
+ ```bash
91
+ ln -s /path/to/claude-task-manager/bin/ctm ~/.local/bin/ctm
92
+ # make sure ~/.local/bin is on your PATH
93
+ ```
94
+
95
+ ### 2. Start the board (docker)
96
+
97
+ ```bash
98
+ ctm up # default port: 3333 (see .env: CTM_PORT)
99
+ ctm up 4000 # a different port — rewrites .env and restarts the container
100
+ ```
101
+
102
+ `ctm up` is **idempotent**: if the container is already running with the same config, it
103
+ does nothing; if it's not running, it starts it; if the port changed, it restarts it. If the
104
+ requested port is already taken by another process, it fails with a clear message before
105
+ ever calling docker.
106
+
107
+ ```bash
108
+ ctm down # stop the board
109
+ ctm autostart on|off # docker restart-policy (unless-stopped / no) — start the board
110
+ # automatically on Docker/machine restart or not
111
+ ```
112
+
113
+ The board is then reachable at `http://localhost:<port>/`. The URL also accepts
114
+ `?project=<id>&lang=<en|hu>` to deep-link directly to a project in a given language.
115
+
116
+ ### 3. Install into a project
117
+
118
+ Run from any project's root (or anywhere inside its git repo):
119
+
120
+ ```bash
121
+ cd /path/to/some/project
122
+ ctm init # id/label = the folder name
123
+ ctm init my-id "Pretty Name" # explicit id/label
124
+ ctm init --force # overwrite generated files without prompting
125
+ ```
126
+
127
+ This creates:
128
+
129
+ - `<project>/.claude/skills/task-manager/task.sh` — the project's own wrapper (`TM_DIR` +
130
+ the engine's absolute path baked in; docker NOT required).
131
+ - `<project>/.claude/skills/task-manager/SKILL.md` — Claude Code skill documentation (the
132
+ `task.sh` calling contract, workflow, `context.json`, etc.) — project-agnostic.
133
+ - `<project>/.claude/agents/ctm-frontend-developer.md`, `ctm-backend-developer.md`,
134
+ `ctm-code-investigator.md` — generic teammate definitions (they read the concrete stack
135
+ from the project's own documentation).
136
+ - `<project>/.claude/hooks/allow-task-sh.sh` + `notify-inbox.sh`, registered in
137
+ `<project>/.claude/settings.json` — auto-allow `task.sh` Bash calls, and inject inbox
138
+ notifications into the calling agent after every `task.sh` run.
139
+ - `<project>/.claude/settings.local.json` — extended with `task.sh`'s Bash allowlist entry
140
+ (no permission prompt).
141
+
142
+ Re-running `ctm init` is **idempotent** — if a generated file already exists, it asks
143
+ before overwriting (unless `--force`/`-y`, or non-interactive, where it skips and tells you
144
+ to pass `--force`). It never touches `data/<id>/`'s table contents, and never touches your
145
+ own `tm-*` custom agent files.
146
+
147
+ ### 4. Add a custom teammate
148
+
149
+ In an already-installed project, when you need more than the 3 base roles
150
+ (frontend/backend/investigator):
151
+
152
+ ```bash
153
+ cd /path/to/installed/project
154
+ ctm agent add reviewer "Reviews code and checks the quality gate."
155
+ ```
156
+
157
+ Creates `.claude/agents/tm-reviewer.md`. **Naming convention:** the base set installed by
158
+ `install.sh`/`ctm init` is always `ctm-*`; custom agents added this way are always `tm-*` —
159
+ so at a glance you can tell the auto-refreshed base set apart from your own hand-edited
160
+ addition (`ctm init` never touches `tm-*` files).
161
+
162
+ ### 5. Manage projects
163
+
164
+ ```bash
165
+ ctm list # registered projects (id, label, data directory)
166
+ ctm wrapper <id> # print a project's generated wrapper (for manual copying)
167
+ ctm rm <id> [--force] # deregister a project (data + wrapper) — asks first
168
+ ```
169
+
170
+ ## `task.sh` from a project (no docker)
171
+
172
+ Through the installed wrapper, from the project's own `.claude/skills/task-manager/`:
173
+
174
+ ```bash
175
+ /path/to/project/.claude/skills/task-manager/task.sh summary --as main
176
+ /path/to/project/.claude/skills/task-manager/task.sh list todo --as main
177
+ /path/to/project/.claude/skills/task-manager/task.sh list --module auth --as main
178
+ /path/to/project/.claude/skills/task-manager/task.sh add fix-1 "Bug fix" "description" --as main
179
+ /path/to/project/.claude/skills/task-manager/task.sh module fix-1 auth --as main
180
+ /path/to/project/.claude/skills/task-manager/task.sh status fix-1 in_progress --as main
181
+ ```
182
+
183
+ Full command list: `task.sh help`. The calling contract (required `--as`, the bare-call
184
+ rule, the review→done handoff loop) is documented in detail in the installed `SKILL.md`.
185
+ Tasks support an optional `module` field (free text, e.g. `auth`/`frontend`/`infra`) for
186
+ grouping/filtering — set with `task.sh module <id> <name>`, filter with
187
+ `task.sh list --module <name>`, and filterable on the board too.
188
+
189
+ ## Language / i18n
190
+
191
+ The board defaults to **English**. Click the language button in the header (or add
192
+ `?lang=hu` to the URL) to switch to **Hungarian** — the choice persists in `localStorage`
193
+ and is reflected in the URL (`?lang=hu`), so a board link is shareable in a specific
194
+ language.
195
+
196
+ The language is **not** stored in any task or note. Every write from the board also sends
197
+ its current UI language; `api/index.php` persists it in a small `data/<id>/.board-lang`
198
+ file (not part of the task schema). `engine/task.sh` reads that file on every invocation
199
+ (except `help`/`inbox`, to avoid noise) and — if it's not English — prints a reminder to
200
+ stderr, e.g.:
201
+
202
+ ```
203
+ [task-manager] Preferred language for this project: Hungarian — please reply and do the work in Hungarian.
204
+ ```
205
+
206
+ This is how an agent running `task.sh` (via its Bash tool) learns which language a human
207
+ was using on the board, without that instruction ever being written into the task data
208
+ itself.
209
+
210
+ ## Staying up to date
211
+
212
+ `ctm`, `install.sh`, `add-agent.sh`, and `projects.sh` each check (via a lightweight
213
+ `git ls-remote`, not a full fetch) whether `origin`'s default branch has commits your local
214
+ checkout doesn't have yet. If so, they print a yellow notice telling you to `git pull`; if
215
+ you're already up to date, they print nothing. This check is **deliberately not** run by
216
+ `engine/task.sh` itself — that script is called on every single task mutation (often many
217
+ times per agent session), and a network round-trip on every call would add real, repeated
218
+ latency to that hot path.
219
+
220
+ ## Directory structure
221
+
222
+ ```
223
+ claude-task-manager/
224
+ engine/task.sh, projects.sh, check-update.sh # the engine + project-admin CLI + update-check
225
+ bin/ctm, add-agent.sh # the "ctm" command-line entry point
226
+ install.sh # a target project's installer (ctm init calls it)
227
+ templates/ # SKILL.md / ctm-* / tm-custom / hooks templates (with __PLACEHOLDER__s)
228
+ api/index.php # the board's write endpoint
229
+ index.html, js/, style.css # the browser board
230
+ favicon.svg, favicon.ico # board favicon
231
+ data/<id>/ # per-project table (gitignored)
232
+ wrappers/<id>.sh # generated, per-project task.sh wrappers (gitignored)
233
+ docker-compose.yml, Dockerfile # containerizes the board+API (CTM_PORT, CTM_RESTART)
234
+ ```
235
+
236
+ ## Environment variables (`.env`)
237
+
238
+ | Variable | Default | Meaning |
239
+ |---|---|---|
240
+ | `CTM_PORT` | `3333` | The board's port (host loopback: `127.0.0.1:<port>`). Set by `ctm up <port>`. |
241
+ | `CTM_RESTART` | `no` | Docker restart-policy. `ctm autostart on` → `unless-stopped`. |
242
+
243
+ See `.env.example` (the real `.env` is gitignored, since `ctm` writes/updates it).
244
+
245
+ ## Security notes
246
+
247
+ - The board's docker port is bound to `127.0.0.1` only (never `0.0.0.0`) — unreachable from
248
+ the LAN, only from the host itself.
249
+ - The write endpoint (`api/index.php`) only runs an explicit command allowlist (`status`,
250
+ `note`, `priority`, `module`, `tag`, `assign`, `dep`, `status-many`, `reopen`, `add`) —
251
+ destructive commands (`rm`, `restore`, `raw`, `archive`) are never exposed to the browser.
252
+ - The `project` id in every write request is checked against `data/projects.json`'s
253
+ registered list — a client can never point the API at an arbitrary directory.