rbin-task-flow 1.27.1 → 1.30.3

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/AGENTS.md CHANGED
@@ -13,6 +13,7 @@
13
13
  | `.task-flow/.internal/tasks.json` | Task definitions |
14
14
  | `.task-flow/.internal/status.json` | Status source of truth |
15
15
  | `.task-flow/contexts/` | Specs/mockups for subtasks |
16
+ | `.task-flow/dev-logs/` | Manual steps + conversation log (AI updates from chat) |
16
17
 
17
18
  ## Git
18
19
 
@@ -52,12 +53,13 @@ No explanatory comments. Complex topics → `dev-logs/*.md`. Allowed: `// ──
52
53
  ## Run (embedded)
53
54
 
54
55
  1. Read `tasks.json` + `status.json`.
55
- 2. `run next X` (default X=1): next X **pending** subtasks in order 1.1, 1.2, …, 2.1…
56
- 3. `run X` / `X,Y` / `all`: all pending for task(s); for `run X`, block if tasks `1..X-1` have any pending subtask.
57
- 4. Per subtask: follow `instructions`; read `contexts/` if cited; implement + verify.
58
- 5. If `.task-flow/guides/graphify-out/graph.json` exists, prefer `graphify query --graph .task-flow/guides/graphify-out/graph.json` before repo-wide grep.
59
- 6. Mark subtask `done` in `status.json`; update `tasks.status.md` Summary.
60
- 7. Parent task `done` when all subtasks done. Suggest commit; never git write.
56
+ 2. **Resolve `manual` first:** read dev-logs + conversation; append Conversation log; mark `done` only when verified.
57
+ 3. `run next X` (default X=1): next X **pending** subtasks (skip unresolved `manual`).
58
+ 4. `run X` / `X,Y` / `all`: all pending for task(s); block if tasks `1..X-1` have non-`done` subtasks.
59
+ 5. Per subtask: `instructions`; `contexts/`; implement + verify; optional `graphify query`.
60
+ 6. **Automatable** `done`; **manual intervention** `manual` + dev-log; user reports in chat; AI updates log and completes when verified.
61
+ 7. Parent task `done` when all subtasks `done`. Suggest commit; never git write.
62
+ 8. **Never** write `guides/reports/` during run.
61
63
 
62
64
  ## Prompt templates (copy)
63
65
 
package/README.md CHANGED
@@ -33,7 +33,7 @@
33
33
  <a id="português"></a>
34
34
  # 🇧🇷 Português
35
35
 
36
- > **v1.25.1** — Padrão `.env` Vercel nos coding standards. De **1.25.0**: `npm install -g rbin-task-flow@1.25.1` e `rbin-task-flow update`. [CHANGELOG](CHANGELOG.md) · [Publicação](RELEASE-1.25.1.md).
36
+ > **v1.30.3** — `.gitignore`: `.task-flow` no final, sem comentários. `npm install -g rbin-task-flow@1.30.3` e `rbin-task-flow reset --keep-tasks`. [CHANGELOG](CHANGELOG.md) · [Publicação](RELEASE-1.30.3.md).
37
37
 
38
38
  ## O Que É Este Projeto?
39
39
 
@@ -74,11 +74,12 @@ rbin-task-flow init
74
74
  rbin-task-flow init # Inicializa no projeto atual
75
75
  rbin-task-flow init --profile minimal # Só 2 regras always-on + skills (menos tokens no Cursor)
76
76
  rbin-task-flow init --share-ai-config # Versiona .cursor/skills/ e .cursor/rules/ no git (time)
77
- rbin-task-flow update # Atualiza configurações (mantém profile em install-meta.json)
78
- rbin-task-flow update --profile standard # Passa a copiar todas as regras .mdc
77
+ rbin-task-flow init --graphify # Init + grafo em .task-flow/guides/graphify-out/
79
78
  rbin-task-flow reset # Reinstala o Task Flow do zero
80
- rbin-task-flow update --graphify # Update + grafo em .task-flow/guides/graphify-out/
79
+ rbin-task-flow reset --keep-tasks # Sobe versão sem sobrescrever suas tasks
80
+ rbin-task-flow reset --profile standard # Passa a copiar todas as regras .mdc
81
81
  rbin-task-flow reset --graphify # Reset + graphify extract (CLI Graphify no PATH)
82
+ rbin-task-flow reset --keep-tasks --graphify # Upgrade + mantém tasks + graphify extract
82
83
  rbin-task-flow version-check # Verifica atualizações de modelos
83
84
  rbin-task-flow info # Mostra informações
84
85
  rbin-task-flow estimate <ids> # Estima tempo (ex: "1" ou "1,2" ou "all")
@@ -91,7 +92,7 @@ Após inicializar, use estes comandos na IA (Cursor/Claude/Codex) para gerenciar
91
92
 
92
93
  **Otimizar por plataforma:** [.task-flow/guides/AI-PLATFORMS.md](.task-flow/guides/AI-PLATFORMS.md) · [Claude](.task-flow/guides/platforms/claude-code.md) · [Cursor](.task-flow/guides/platforms/cursor.md) · [Codex](.task-flow/guides/platforms/codex.md) · [Graphify](.task-flow/guides/GRAPHIFY.md)
93
94
 
94
- **Graphify (opcional):** grafo em `.task-flow/guides/graphify-out/`. Novo projeto: `rbin-task-flow init --graphify`. **Já tem Task Flow:** `npm install -g rbin-task-flow@latest` e `rbin-task-flow update --graphify` no projeto (migra `graphify-out/` da raiz + regera grafo). Detalhes: [.task-flow/README.md](.task-flow/README.md#graphify-opcional) · [GRAPHIFY.md](.task-flow/guides/GRAPHIFY.md).
95
+ **Graphify (opcional):** grafo em `.task-flow/guides/graphify-out/`. Novo projeto: `rbin-task-flow init --graphify`. **Já tem Task Flow:** `npm install -g rbin-task-flow@latest` e `rbin-task-flow reset --keep-tasks --graphify` no projeto (migra `graphify-out/` da raiz + regera grafo). **Manter suas tasks ao subir versão:** `rbin-task-flow reset --keep-tasks`. Detalhes: [.task-flow/README.md](.task-flow/README.md#graphify-opcional) · [GRAPHIFY.md](.task-flow/guides/GRAPHIFY.md).
95
96
 
96
97
  **Claude Code / Cursor skills (v1.20+):** `init` copia 11 skills para `.claude/skills/` e `.cursor/skills/` — use `/task-flow-split`, `/task-flow-sync`, `/task-flow-run`, etc.
97
98
 
@@ -101,7 +102,7 @@ Após inicializar, use estes comandos na IA (Cursor/Claude/Codex) para gerenciar
101
102
 
102
103
  **Perfil minimal:** `init --profile minimal` instala só as 2 regras always-on e as 11 skills; workflows via `@task-flow-*` (sem `task_work`, `coding_standards` glob, etc.). `standard` (padrão) copia todas as regras `.cursor/rules/`.
103
104
 
104
- **Compartilhar com o time:** `init --share-ai-config` não ignora `.cursor/skills/` nem `.cursor/rules/` no `.gitignore` (só `.cursor/settings.json` e overrides locais). Padrão: `.cursor/` inteiro ignorado menos ruído no repo, config local por dev.
105
+ **Compartilhar com o time:** `.cursor/`, `CLAUDE.md` e `AGENTS.md` podem ir no git; só `.task-flow/` fica ignorado (tasks e progresso locais). Flag `--share-ai-config` grava preferência em `install-meta.json`.
105
106
 
106
107
  | Comando | Por Que Usar | Feature Principal |
107
108
  |---------|--------------|-------------------|
@@ -110,7 +111,7 @@ Após inicializar, use estes comandos na IA (Cursor/Claude/Codex) para gerenciar
110
111
  | `task-flow: audit` | **Avalia** o quanto o código bate com os padrões de codificação | Analisa a codebase, dá um score por categoria e pergunta quais melhorias você quer adotar — sem impor nada |
111
112
  | `task-flow: status` | **Visualiza** o progresso rapidamente | Vê resumo com tasks completas, em andamento e quantas subtarefas faltam |
112
113
  | `task-flow: split` | `:3` · `:2` · `:3 50-72` | **Divide** trabalho entre N IAs — gera N comandos `run X,Y,Z` (só plano) |
113
- | `task-flow: run next X` | **Automatiza** o trabalho nas próximas subtarefas | A IA trabalha nas próximas X subtarefas sequencialmente, você acompanha |
114
+ | `task-flow: run next X` | **Automatiza** o trabalho nas próximas subtarefas | IA implementa o que pode; passos manuais → `dev-logs/`; você reporta no chat |
114
115
  | `task-flow: run X` | **Completa** uma tarefa inteira de uma vez | Executa todas as subtarefas de uma tarefa específica (permite trabalho paralelo) |
115
116
  | `task-flow: run X,Y` | **Completa** múltiplas tarefas | Executa tarefas separadas por vírgula (ex: `task-flow: run 10,11`) |
116
117
  | `task-flow: run all` | **Completa** todas as tarefas | Executa todas as tarefas pendentes |
@@ -145,7 +146,7 @@ Repositório centralizado de configurações e regras de desenvolvimento que pod
145
146
  - **Instalação Global NPM** - Instale uma vez, use em qualquer lugar com `npm install -g rbin-task-flow`
146
147
  - **Gerenciamento Simples de Tarefas** - Defina tarefas em texto simples, a IA gera subtarefas detalhadas
147
148
  - **Múltiplos Modelos de IA** - Claude Code Sonnet configurado e pronto para uso
148
- - **.gitignore Discreto** - Configurações de IA ocultas com comentários genéricos
149
+ - **.gitignore mínimo** - `.task-flow/` ignorado; `.cursor/` e instruções versionáveis no git
149
150
  - **Zero Configuração** - Pronto para usar imediatamente
150
151
  - **RBIN Task Flow** - Gerenciamento de tarefas alimentado por IA com interface de texto simples
151
152
 
@@ -247,23 +248,14 @@ Gerenciamento de tarefas simples e poderoso:
247
248
  - **Rastreamento Simples**: Gerenciamento de status baseado em JSON com comandos CLI fáceis
248
249
  - **Monitoramento de Progresso**: Feedback visual claro sobre a conclusão das tarefas
249
250
 
250
- ## .gitignore Discreto
251
+ ## .gitignore
251
252
 
252
- O instalador adiciona estas entradas ao `.gitignore`:
253
+ O instalador adiciona `.task-flow` ao final do `.gitignore`:
253
254
 
254
255
  ```gitignore
255
- .claude/
256
- .cursor/
257
- .task-flow/
258
- CLAUDE.md
256
+ .task-flow
259
257
  ```
260
258
 
261
- **Por que discreto?**
262
- - Sem comentários explicando o que são
263
- - Sem menção a "IA", "Claude" ou "Anthropic"
264
- - Tudo relacionado ao RBIN Task Flow permanece local
265
- - Histórico git limpo sem arquivos de ferramentas de IA
266
-
267
259
  ## Atualizando Projetos
268
260
 
269
261
  Para atualizar configurações em um projeto existente:
@@ -271,11 +263,17 @@ Para atualizar configurações em um projeto existente:
271
263
  ```bash
272
264
  # Usando NPM (recomendado)
273
265
  cd /caminho/para/seu/projeto
274
- rbin-task-flow update
275
266
 
276
- # Para reiniciar o Task Flow do zero, incluindo .task-flow/.internal
267
+ # Primeira instalação
268
+ rbin-task-flow init
269
+
270
+ # Subir versão do pacote mantendo suas tasks
271
+ npm install -g rbin-task-flow@latest
272
+ rbin-task-flow reset --keep-tasks
273
+ rbin-task-flow reset --keep-tasks --graphify
274
+
275
+ # Reiniciar o Task Flow do zero (perde tasks)
277
276
  rbin-task-flow reset
278
- # Com grafo de código (requer graphify no PATH):
279
277
  rbin-task-flow reset --graphify
280
278
 
281
279
  # Ou usando método legacy
@@ -336,9 +334,7 @@ Lista cada `.cursor/rules/*.mdc` (bytes, linhas, `alwaysApply`), soma always-on
336
334
  - ⚠️ Este é um **repositório template** - não use RBIN Task Flow aqui
337
335
  - ✅ Use RBIN Task Flow em **projetos que recebem** as configurações via instalação
338
336
  - 🔄 O instalador **sempre sobrescreve** configurações existentes
339
- - 🤫 As entradas do .gitignore são **discretas** (sem menções a IA)
340
- - 🎯 Funciona com **Claude Code CLI** ou **Cursor Pro**
341
- - 📦 O diretório Task Flow (`.task-flow/`) é **automaticamente gitignored**
337
+ - 📦 Apenas `.task-flow/` é **gitignored** (tasks e progresso locais)
342
338
  - 📝 Defina tarefas em `.task-flow/tasks.input.txt` usando formato simples: `- Descrição da tarefa`
343
339
  - 🚀 **Instalação Global NPM**: `npm install -g rbin-task-flow`, depois use `rbin-task-flow init` em qualquer projeto
344
340
  - 🔒 **Chaves de API podem ser necessárias** - depende do seu provedor de IA (Claude Code ou Cursor Pro)
@@ -416,7 +412,7 @@ Para problemas ou perguntas:
416
412
  <a id="english"></a>
417
413
  # 🇬🇧 English
418
414
 
419
- > **v1.25.1** — Vercel `.env` pattern in coding standards. From **1.25.0**: `npm install -g rbin-task-flow@1.25.1` then `rbin-task-flow update`. [CHANGELOG](CHANGELOG.md) · [Release guide](RELEASE-1.25.1.md).
415
+ > **v1.30.3** — `.gitignore`: append `.task-flow` only, no comments. `npm install -g rbin-task-flow@1.30.3` then `rbin-task-flow reset --keep-tasks`. [CHANGELOG](CHANGELOG.md) · [Release guide](RELEASE-1.30.3.md).
420
416
 
421
417
  ## What Is This Project?
422
418
 
@@ -457,11 +453,12 @@ rbin-task-flow init
457
453
  rbin-task-flow init # Initialize in current project
458
454
  rbin-task-flow init --profile minimal # 2 always-on rules + skills only (lower Cursor token cost)
459
455
  rbin-task-flow init --share-ai-config # Commit .cursor/skills and rules with the team
460
- rbin-task-flow update # Update configs (keeps profile from .task-flow/install-meta.json)
461
- rbin-task-flow update --profile standard # Install all .cursor/rules/*.mdc
456
+ rbin-task-flow init --graphify # Init + graph at .task-flow/guides/graphify-out/
462
457
  rbin-task-flow reset # Reinstall Task Flow from scratch
463
- rbin-task-flow update --graphify # Update + graph at .task-flow/guides/graphify-out/
458
+ rbin-task-flow reset --keep-tasks # Upgrade package without overwriting your tasks
459
+ rbin-task-flow reset --profile standard # Install all .cursor/rules/*.mdc
464
460
  rbin-task-flow reset --graphify # Reset + graphify extract (Graphify CLI on PATH)
461
+ rbin-task-flow reset --keep-tasks --graphify # Upgrade + keep tasks + graphify extract
465
462
  rbin-task-flow version-check # Check for model updates
466
463
  rbin-task-flow info # Show information
467
464
  rbin-task-flow estimate <ids> # Estimate time (e.g., "1" or "1,2" or "all")
@@ -474,7 +471,7 @@ After initializing, use these commands in your AI (Cursor/Claude/Codex) to autom
474
471
 
475
472
  **Per-platform optimization:** [index](.task-flow/guides/AI-PLATFORMS.md) · [Claude](.task-flow/guides/platforms/claude-code.md) · [Cursor](.task-flow/guides/platforms/cursor.md) · [Codex](.task-flow/guides/platforms/codex.md) · [Graphify](.task-flow/guides/GRAPHIFY.md)
476
473
 
477
- **Graphify (optional):** graph at `.task-flow/guides/graphify-out/`. New project: `rbin-task-flow init --graphify`. **Existing project:** `npm install -g rbin-task-flow@latest` then `rbin-task-flow update --graphify` (migrates legacy root `graphify-out/` + re-extracts). See [.task-flow/README.md](.task-flow/README.md#graphify-opcional) · [GRAPHIFY.md](.task-flow/guides/GRAPHIFY.md).
474
+ **Graphify (optional):** graph at `.task-flow/guides/graphify-out/`. New project: `rbin-task-flow init --graphify`. **Existing project:** `npm install -g rbin-task-flow@latest` then `rbin-task-flow reset --keep-tasks --graphify` (migrates legacy root `graphify-out/` + re-extracts). **Keep your tasks when upgrading:** `rbin-task-flow reset --keep-tasks`. See [.task-flow/README.md](.task-flow/README.md#graphify-opcional) · [GRAPHIFY.md](.task-flow/guides/GRAPHIFY.md).
478
475
 
479
476
  **Claude / Cursor skills (v1.20+):** installs 11 skills — use `/task-flow-split`, `/task-flow-sync`, `/task-flow-run`, etc.
480
477
 
@@ -484,7 +481,7 @@ After initializing, use these commands in your AI (Cursor/Claude/Codex) to autom
484
481
 
485
482
  **Minimal profile:** `init --profile minimal` copies only `task-flow-cursor.mdc` and `rbin-git-policy.mdc` plus skills; use `@task-flow-*` for workflows. `standard` (default) copies all rules under `.cursor/rules/`.
486
483
 
487
- **Share with team:** `init --share-ai-config` leaves `.cursor/skills/` and `.cursor/rules/` out of `.gitignore` (see comment block in `.gitignore` for token vs team trade-off). Default ignores all of `.cursor/`.
484
+ **Share with team:** `.cursor/`, `CLAUDE.md`, and `AGENTS.md` can be committed; only `.task-flow/` is gitignored (local tasks and progress). `--share-ai-config` saves preference in `install-meta.json`.
488
485
 
489
486
  | Command | Why Use It | Key Feature |
490
487
  |---------|------------|-------------|
@@ -493,7 +490,7 @@ After initializing, use these commands in your AI (Cursor/Claude/Codex) to autom
493
490
  | `task-flow: audit` | **Evaluate** how well your code matches coding standards | Scans the codebase, scores it by category and asks which improvements you want to adopt — never imposes changes |
494
491
  | `task-flow: status` | **Visualize** progress quickly | See summary with completed tasks, in progress, and remaining subtasks |
495
492
  | `task-flow: split` | `:3` · `:2` · `:3 50-72` | **Split** work across N AIs — N `run` commands (plan only) |
496
- | `task-flow: run next X` | **Automate** work on next subtasks | AI works on next X subtasks sequentially, you just follow along |
493
+ | `task-flow: run next X` | **Automate** work on next subtasks | AI implements what it can; manual steps → `dev-logs/`; you report in chat |
497
494
  | `task-flow: run X` | **Complete** an entire task at once | Executes all subtasks of a specific task (allows parallel work) |
498
495
  | `task-flow: run X,Y` | **Complete** multiple tasks | Executes comma-separated tasks (e.g., `task-flow: run 10,11`) |
499
496
  | `task-flow: run all` | **Complete** all tasks | Executes all pending tasks |
@@ -528,7 +525,7 @@ A centralized repository of development configurations and rules that can be ins
528
525
  - **NPM Global Installation** - Install once, use everywhere with `npm install -g rbin-task-flow`
529
526
  - **Simple Task Management** - Define tasks in plain text, AI generates detailed subtasks
530
527
  - **Multiple AI Models** - Claude Code Sonnet configured and ready to use
531
- - **Discrete .gitignore** - AI configs hidden with generic comments
528
+ - **Minimal .gitignore** - Only `.task-flow/` ignored; `.cursor/` and instruction files committable
532
529
  - **Zero Configuration** - Ready to use immediately
533
530
  - **RBIN Task Flow** - AI-powered task management with simple text interface
534
531
 
@@ -630,23 +627,14 @@ Simple yet powerful task management:
630
627
  - **Simple Tracking**: JSON-based status management with easy CLI commands
631
628
  - **Progress Monitoring**: Clear visual feedback on task completion
632
629
 
633
- ## Discrete .gitignore
630
+ ## .gitignore
634
631
 
635
- The installer adds these entries to `.gitignore`:
632
+ The installer appends `.task-flow` at the end of `.gitignore`:
636
633
 
637
634
  ```gitignore
638
- .claude/
639
- .cursor/
640
- .task-flow/
641
- CLAUDE.md
635
+ .task-flow
642
636
  ```
643
637
 
644
- **Why discrete?**
645
- - No comments explaining what they are
646
- - No mention of "AI", "Claude", or "Anthropic"
647
- - Everything related to RBIN Task Flow stays local
648
- - Clean git history without AI tooling files
649
-
650
638
  ## Updating Projects
651
639
 
652
640
  To update configs in an existing project:
@@ -654,11 +642,17 @@ To update configs in an existing project:
654
642
  ```bash
655
643
  # Using NPM (recommended)
656
644
  cd /path/to/your/project
657
- rbin-task-flow update
658
645
 
659
- # To reset Task Flow from scratch, including .task-flow/.internal
646
+ # First install
647
+ rbin-task-flow init
648
+
649
+ # Upgrade package while keeping your tasks
650
+ npm install -g rbin-task-flow@latest
651
+ rbin-task-flow reset --keep-tasks
652
+ rbin-task-flow reset --keep-tasks --graphify
653
+
654
+ # Reset Task Flow from scratch (loses tasks)
660
655
  rbin-task-flow reset
661
- # With code knowledge graph (requires graphify on PATH):
662
656
  rbin-task-flow reset --graphify
663
657
 
664
658
  # Or using legacy method
@@ -719,9 +713,7 @@ Prints each `.cursor/rules/*.mdc` (bytes, lines, `alwaysApply`), totals always-o
719
713
  - ⚠️ This is a **template repository** - don't use RBIN Task Flow here
720
714
  - ✅ Use RBIN Task Flow in **projects that receive** the configs via installation
721
715
  - 🔄 Installer **always overwrites** existing configs
722
- - 🤫 .gitignore entries are **discrete** (no AI mentions)
723
- - 🎯 Works with **Claude Code CLI** or **Cursor Pro**
724
- - 📦 Task Flow directory (`.task-flow/`) is **automatically gitignored**
716
+ - 📦 Only `.task-flow/` is **gitignored** (local tasks and progress)
725
717
  - 📝 Define tasks in `.task-flow/tasks.input.txt` using simple format: `- Task description`
726
718
  - 🚀 **NPM Global Install**: `npm install -g rbin-task-flow`, then use `rbin-task-flow init` in any project
727
719
  - 🔒 **API keys may be required** - depends on your AI provider (Claude Code or Cursor Pro)
package/bin/cli.js CHANGED
@@ -22,11 +22,15 @@ function addInstallCommand(name, description, extra = {}) {
22
22
  .option('-g, --graphify', 'Run graphify extract → .task-flow/guides/graphify-out/ (claude-cli backend; requires graphify CLI)')
23
23
  .option(
24
24
  '--profile <profile>',
25
- 'Cursor rules: minimal (2 always-on + skills) or standard (all rules); update without flag keeps .task-flow/install-meta.json'
25
+ 'Cursor rules: minimal (2 always-on + skills) or standard (all rules); reset without flag keeps .task-flow/install-meta.json'
26
26
  )
27
27
  .option(
28
28
  '--share-ai-config',
29
- 'Do not gitignore .cursor/skills/ or .cursor/rules/ (team can commit shared AI config; see .gitignore comment)'
29
+ 'Save team AI config preference in install-meta.json (appends .task-flow to .gitignore)'
30
+ )
31
+ .option(
32
+ '--keep-tasks',
33
+ 'Preserve tasks.input.txt, tasks.status.md, .internal/, and dev-logs/ on reset (upgrade package without losing task definitions)'
30
34
  )
31
35
  .action(async (options) => {
32
36
  const targetPath = options.path || process.cwd();
@@ -39,6 +43,7 @@ function addInstallCommand(name, description, extra = {}) {
39
43
  graphify: options.graphify,
40
44
  profile,
41
45
  shareAiConfig,
46
+ keepTasks: options.keepTasks === true,
42
47
  });
43
48
  } catch (error) {
44
49
  console.error(chalk.red('\n' + error.message + '\n'));
@@ -48,7 +53,6 @@ function addInstallCommand(name, description, extra = {}) {
48
53
  }
49
54
 
50
55
  addInstallCommand('init', 'Initialize RBIN Task Flow in current directory');
51
- addInstallCommand('update', 'Update RBIN Task Flow in current directory', { update: true });
52
56
  addInstallCommand('reset', 'Reset RBIN Task Flow in current directory', { reset: true });
53
57
 
54
58
  program
@@ -93,9 +97,10 @@ program
93
97
  console.log(chalk.cyan(' rbin-task-flow init --profile minimal') + ' - Low-token install (2 always-on rules + skills)');
94
98
  console.log(chalk.cyan(' rbin-task-flow init --share-ai-config') + ' - Version .cursor/skills and rules in git');
95
99
  console.log(chalk.cyan(' rbin-task-flow init --graphify') + ' - Init + graphify extract --backend claude-cli (if CLI installed)');
96
- console.log(chalk.cyan(' rbin-task-flow update') + ' - Update configurations');
97
100
  console.log(chalk.cyan(' rbin-task-flow reset') + ' - Reset task flow files from scratch');
101
+ console.log(chalk.cyan(' rbin-task-flow reset --keep-tasks') + ' - Upgrade package without overwriting tasks');
98
102
  console.log(chalk.cyan(' rbin-task-flow reset --graphify') + ' - Reset + graphify extract --backend claude-cli (if CLI installed)');
103
+ console.log(chalk.cyan(' rbin-task-flow reset --keep-tasks --graphify') + ' - Upgrade + keep tasks + graphify extract');
99
104
  console.log(chalk.cyan(' rbin-task-flow version-check') + ' - Check for model updates');
100
105
  console.log(chalk.cyan(' rbin-task-flow estimate <ids>') + ' - Estimate time (e.g., "1" or "1,2" or "all")');
101
106
  console.log(chalk.cyan(' rbin-task-flow report <ids>') + ' - Generate report (e.g., "1" or "1,2" or "all")');
package/lib/cursor.js CHANGED
@@ -30,7 +30,7 @@ async function setupCursorIntegration(targetPath, options = {}) {
30
30
 
31
31
  if (profile === 'minimal') {
32
32
  showInfo('Minimal profile: 2 always-on rules; workflows via @task-flow-* skills only');
33
- showInfo('Full rules: rbin-task-flow update --profile standard');
33
+ showInfo('Full rules: rbin-task-flow reset --profile standard --keep-tasks');
34
34
  } else {
35
35
  showInfo('Rules: 2 always-on + intelligent/glob rules; prefer @task-flow-* skills for workflows');
36
36
  }
package/lib/gitignore.js CHANGED
@@ -1,99 +1,68 @@
1
1
  const fs = require('fs-extra');
2
2
  const path = require('path');
3
3
 
4
- const MARKER_START = '# RBIN Task Flow (rbin-task-flow)';
5
- const MARKER_END = '# END RBIN Task Flow (rbin-task-flow)';
6
-
7
- const ENTRIES_DEFAULT = [
8
- '.claude/',
9
- '.cursor/',
10
- '.task-flow/',
11
- 'CLAUDE.md',
12
- 'AGENTS.md',
13
- ];
14
-
15
- const ENTRIES_SHARE_AI_CONFIG = [
16
- '.claude/',
17
- '.cursor/settings.json',
18
- '.cursor/rules/*.local.mdc',
19
- '.task-flow/',
20
- 'CLAUDE.md',
21
- 'AGENTS.md',
4
+ const GITIGNORE_ENTRY = '.task-flow';
5
+
6
+ const LEGACY_MARKER_START = '# RBIN Task Flow (rbin-task-flow)';
7
+ const LEGACY_MARKER_END = '# END RBIN Task Flow (rbin-task-flow)';
8
+
9
+ const STRIP_LINE_PATTERNS = [
10
+ /^\.task-flow\/?\s*$/m,
11
+ /^\.claude\/\s*$/m,
12
+ /^\.cursor\/\s*$/m,
13
+ /^CLAUDE\.md\s*$/m,
14
+ /^AGENTS\.md\s*$/m,
15
+ /^\.cursor\/settings\.json\s*$/m,
16
+ /^\.cursor\/rules\/\*\.local\.mdc\s*$/m,
17
+ /^graphify-out\/\s*$/m,
18
+ /^\.task-flow\/scripts\/tasks\.json\s*$/m,
19
+ /^\.task-flow\/scripts\/status\.json\s*$/m,
20
+ /^# RBIN Task Flow.*$/m,
21
+ /^# END RBIN Task Flow.*$/m,
22
+ /^# share-ai-config:.*$/m,
23
+ /^# Trade-off:.*$/m,
24
+ /^# Default \(no flag\):.*$/m,
25
+ /^# Only \.task-flow\/.*$/m,
26
+ /^# \.cursor\/.*$/m,
22
27
  ];
23
28
 
24
- const STRIP_PATTERNS = [
25
- ...ENTRIES_DEFAULT,
26
- ...ENTRIES_SHARE_AI_CONFIG,
27
- MARKER_START,
28
- MARKER_END,
29
- '# share-ai-config:',
30
- '# Trade-off:',
31
- '# Default (no flag):',
32
- ];
33
-
34
- function escapeRegExp(value) {
35
- return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
36
- }
37
-
38
- function stripRbinGitignoreBlock(content) {
29
+ function stripTaskFlowGitignoreLines(content) {
39
30
  let next = content;
40
31
 
41
32
  const blockRegex = new RegExp(
42
- `\\n?${escapeRegExp(MARKER_START)}[\\s\\S]*?${escapeRegExp(MARKER_END)}\\n?`,
33
+ `\\n?${LEGACY_MARKER_START.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}[\\s\\S]*?${LEGACY_MARKER_END.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\n?`,
43
34
  'g'
44
35
  );
45
36
  next = next.replace(blockRegex, '\n');
46
37
 
47
- for (const entry of STRIP_PATTERNS) {
48
- const lineRegex = new RegExp(`^${escapeRegExp(entry)}\\s*$`, 'gm');
49
- next = next.replace(lineRegex, '');
38
+ for (const pattern of STRIP_LINE_PATTERNS) {
39
+ next = next.replace(pattern, '');
50
40
  }
51
41
 
52
- return next.replace(/\n{3,}/g, '\n\n');
42
+ return next.replace(/\n{3,}/g, '\n\n').replace(/\s+$/, '');
53
43
  }
54
44
 
55
- function buildRbinGitignoreBlock(shareAiConfig) {
56
- const lines = ['', MARKER_START, ''];
57
-
58
- if (shareAiConfig) {
59
- lines.push(
60
- '# share-ai-config: .cursor/skills/ and .cursor/rules/ are NOT ignored — commit them for team consistency.',
61
- '# Trade-off: shared AI config improves workflow parity; each developer still pays token cost when the Agent loads rules/skills.',
62
- '# Default (no flag): entire .cursor/ stays local and gitignored — lower repo noise, no team sync of rules.',
63
- ''
64
- );
65
- lines.push(...ENTRIES_SHARE_AI_CONFIG);
66
- } else {
67
- lines.push(...ENTRIES_DEFAULT);
68
- }
69
-
70
- lines.push(MARKER_END, '');
71
- return lines.join('\n');
45
+ function appendTaskFlowEntry(content) {
46
+ const normalized = stripTaskFlowGitignoreLines(content);
47
+ const suffix = normalized.length > 0 ? '\n' : '';
48
+ return `${normalized}${suffix}${GITIGNORE_ENTRY}\n`;
72
49
  }
73
50
 
74
- async function updateGitignore(targetPath, { shareAiConfig = false } = {}) {
51
+ async function updateGitignore(targetPath) {
75
52
  const gitignorePath = path.join(targetPath, '.gitignore');
76
53
 
77
54
  if (!fs.existsSync(gitignorePath)) {
78
- await fs.writeFile(gitignorePath, '');
55
+ await fs.writeFile(gitignorePath, `${GITIGNORE_ENTRY}\n`);
56
+ return;
79
57
  }
80
58
 
81
- let content = await fs.readFile(gitignorePath, 'utf8');
82
- content = stripRbinGitignoreBlock(content);
83
-
84
- if (!content.endsWith('\n')) {
85
- content += '\n';
86
- }
87
-
88
- content += buildRbinGitignoreBlock(shareAiConfig);
89
- await fs.writeFile(gitignorePath, content);
90
-
91
- return { shareAiConfig };
59
+ const content = await fs.readFile(gitignorePath, 'utf8');
60
+ await fs.writeFile(gitignorePath, appendTaskFlowEntry(content));
92
61
  }
93
62
 
94
63
  module.exports = {
95
- MARKER_START,
96
- buildRbinGitignoreBlock,
97
- stripRbinGitignoreBlock,
64
+ GITIGNORE_ENTRY,
65
+ stripTaskFlowGitignoreLines,
66
+ appendTaskFlowEntry,
98
67
  updateGitignore,
99
68
  };