rbin-task-flow 1.5.0 → 1.6.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.
Files changed (3) hide show
  1. package/AGENTS.md +42 -0
  2. package/lib/install.js +32 -38
  3. package/package.json +2 -1
package/AGENTS.md ADDED
@@ -0,0 +1,42 @@
1
+ # Project norms (Codex)
2
+
3
+ This repo follows the same development norms as in `.cursor/rules/` and `CLAUDE.md`. When working here, follow these rules.
4
+
5
+ ## Git
6
+
7
+ - **Never run** `git add`, `git commit`, `git push`, `git pull`, `git merge`, `git checkout`, `git reset`, `git rebase`, etc.
8
+ - **Only suggest** git commands; the user runs them.
9
+ - You **may** run read-only git: `git status`, `git diff`, `git log`, `git show`, `git branch` (list only).
10
+
11
+ ## Commits
12
+
13
+ - After completing tasks, **suggest** a commit message (Conventional Commits: `feat`, `fix`, `refactor`, `docs`, `test`, `chore`).
14
+ - Include task/subtask ID when relevant, e.g. `Task ID: 3.2`.
15
+
16
+ ## Code and comments
17
+
18
+ - **No explanatory comments** in code; keep code self-explanatory via names.
19
+ - **Document non-obvious or complex topics** in `dev-logs/` (markdown).
20
+ - **Allowed comments**: only section separators in this form:
21
+ ```text
22
+ // ────────────────────────────────
23
+ // Section Name
24
+ // ────────────────────────────────
25
+ ```
26
+
27
+ ## RBIN Task Flow
28
+
29
+ - **Task flow** always means **RBIN Task Flow**.
30
+ - Tasks: `.task-flow/tasks.input.txt` (format: `- Task description`).
31
+ - Status: `.task-flow/tasks.status.md` and `.task-flow/.internal/status.json`.
32
+ - **Commands** to support: `task-flow: sync`, `task-flow: think`, `task-flow: audit`, `task-flow: status`, `task-flow: run next X`, `task-flow: run X` (or `X,Y` / `all`), `task-flow: review X`, `task-flow: refactor X`, `task-flow: estimate X`, `task-flow: report X`.
33
+ - When running `task-flow: audit`: scan the codebase, score it against `.cursor/rules/coding_standards.mdc`, present a report, and ask the user which improvements to adopt — never impose changes.
34
+ - When running subtasks: read `.task-flow/.internal/tasks.json` and `status.json`, implement, then update `status.json` and `tasks.status.md` (mark done, refresh summary).
35
+ - Use context from `.task-flow/contexts/` when subtask instructions reference it.
36
+
37
+ ## Full rules
38
+
39
+ For complete wording and examples, see:
40
+
41
+ - `CLAUDE.md` – overview and task-flow commands
42
+ - `.cursor/rules/` – all rules (git, commits, comments, task-flow, etc.)
package/lib/install.js CHANGED
@@ -48,7 +48,7 @@ async function installInProject(targetPath, options = {}) {
48
48
 
49
49
  spinner.text = 'Copying configuration files...';
50
50
 
51
- await copyConfigs(targetPath);
51
+ await copyConfigs(targetPath, isUpdate);
52
52
 
53
53
  spinner.text = 'Updating .gitignore...';
54
54
 
@@ -69,14 +69,14 @@ async function installInProject(targetPath, options = {}) {
69
69
  }
70
70
  }
71
71
 
72
- async function copyConfigs(targetPath) {
72
+ async function copyConfigs(targetPath, isUpdate = false) {
73
73
  const cursorRulesPath = path.join(TEMPLATE_DIR, '.cursor/rules');
74
+ const cursorRulesDest = path.join(targetPath, '.cursor/rules');
74
75
  if (fs.existsSync(cursorRulesPath)) {
75
- await fs.copy(
76
- cursorRulesPath,
77
- path.join(targetPath, '.cursor/rules'),
78
- { overwrite: true }
79
- );
76
+ if (isUpdate && fs.existsSync(cursorRulesDest)) {
77
+ await fs.emptyDir(cursorRulesDest);
78
+ }
79
+ await fs.copy(cursorRulesPath, cursorRulesDest, { overwrite: true });
80
80
  showSuccess('Cursor rules');
81
81
  }
82
82
 
@@ -110,6 +110,16 @@ async function copyConfigs(targetPath) {
110
110
  showSuccess('Claude instructions');
111
111
  }
112
112
 
113
+ const agentsPath = path.join(TEMPLATE_DIR, 'AGENTS.md');
114
+ if (fs.existsSync(agentsPath)) {
115
+ await fs.copy(
116
+ agentsPath,
117
+ path.join(targetPath, 'AGENTS.md'),
118
+ { overwrite: true }
119
+ );
120
+ showSuccess('Codex instructions (AGENTS.md)');
121
+ }
122
+
113
123
  await copyTaskFlow(targetPath);
114
124
  }
115
125
 
@@ -119,39 +129,22 @@ async function copyTaskFlow(targetPath) {
119
129
 
120
130
  await fs.ensureDir(taskFlowDest);
121
131
 
122
- showSuccess('Task Flow directory');
123
- showInfo('Note: .internal/tasks.json and .internal/status.json are NOT overwritten (your data is safe)');
124
-
125
- const contextsDest = path.join(taskFlowDest, 'contexts');
126
- await fs.ensureDir(contextsDest);
127
- showSuccess('Contexts directory (.task-flow/contexts/)');
128
-
129
- const docsDest = path.join(taskFlowDest, 'docs');
130
- await fs.ensureDir(docsDest);
131
- showSuccess('Documentation directory (.task-flow/docs/)');
132
-
133
- const exampleSrc = path.join(taskFlowSrc, 'contexts/example.png.txt');
134
- const exampleDest = path.join(contextsDest, 'example.png.txt');
135
- if (fs.existsSync(exampleSrc) && !fs.existsSync(exampleDest)) {
136
- await fs.copy(exampleSrc, exampleDest);
137
- }
138
-
139
- const files = [
140
- { name: 'README.md', overwrite: true },
141
- { name: 'tasks.input.txt', overwrite: false },
142
- { name: 'tasks.status.md', overwrite: false }
132
+ const PROTECTED = [
133
+ path.join(taskFlowDest, '.internal'),
143
134
  ];
144
135
 
145
- for (const file of files) {
146
- const src = path.join(taskFlowSrc, file.name);
147
- const dest = path.join(taskFlowDest, file.name);
136
+ await fs.copy(taskFlowSrc, taskFlowDest, {
137
+ overwrite: true,
138
+ filter: (src) => {
139
+ return !PROTECTED.some((p) => src.startsWith(p));
140
+ },
141
+ });
148
142
 
149
- if (fs.existsSync(src)) {
150
- if (file.overwrite || !fs.existsSync(dest)) {
151
- await fs.copy(src, dest, { overwrite: file.overwrite });
152
- }
153
- }
154
- }
143
+ await fs.ensureDir(path.join(taskFlowDest, 'contexts'));
144
+ await fs.ensureDir(path.join(taskFlowDest, 'docs'));
145
+
146
+ showSuccess('Task Flow directory (overwritten)');
147
+ showInfo('Protected: .internal/ (your task data is safe)');
155
148
  }
156
149
 
157
150
  async function updateGitignore(targetPath) {
@@ -167,7 +160,8 @@ async function updateGitignore(targetPath) {
167
160
  '.claude/',
168
161
  '.cursor/',
169
162
  '.task-flow/',
170
- 'CLAUDE.md'
163
+ 'CLAUDE.md',
164
+ 'AGENTS.md'
171
165
  ];
172
166
 
173
167
  for (const entry of entries) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rbin-task-flow",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "AI-powered task management for Claude and Cursor",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -33,6 +33,7 @@
33
33
  ".task-flow/",
34
34
  ".model-versions.json",
35
35
  "CLAUDE.md",
36
+ "AGENTS.md",
36
37
  "lib/"
37
38
  ],
38
39
  "preferGlobal": true,