@flowmind/cli 0.2.1 → 0.3.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/README.md +28 -1
- package/dist/flowmind/SKILL.md +25 -5
- package/dist/index.js +2138 -1685
- package/package.json +15 -2
package/README.md
CHANGED
|
@@ -18,7 +18,18 @@ because hooks start without your shell profile and a version manager may not put
|
|
|
18
18
|
Codex on Windows gets a PowerShell command (`& '<node>' '<cli>' agent hook --agent codex`).
|
|
19
19
|
After you upgrade Node or move the CLI, `hooks status` shows `outdated`; run `hooks install` again
|
|
20
20
|
and trust the changed hooks. The hook records each agent turn under the CLI config folder.
|
|
21
|
-
In a linked repository, the session-start hook tells the agent which project it works on.
|
|
21
|
+
In a linked repository, the session-start hook tells the agent which project it works on. Once 20 or more minutes of
|
|
22
|
+
finished agent turns are unstaged, each prompt also carries a reminder with the minutes and the
|
|
23
|
+
staging command. A successful `agent stage` resets the count.
|
|
24
|
+
|
|
25
|
+
In a git repository without `.flowmind.json`, the session-start hook first reads `.flowmind.json` from the
|
|
26
|
+
local remote-tracking refs: the current branch's upstream, then `origin/HEAD`, `origin/main` and
|
|
27
|
+
`origin/master`. It does not fetch. If a remote ref links the repository, the agent learns the project and
|
|
28
|
+
is told to run `git pull` and never to create a new project. Otherwise the agent gets the steps to link
|
|
29
|
+
the repository: pull, find the existing project, create one only for a new product, link, and commit
|
|
30
|
+
`.flowmind.json`, or mark a third-party clone or scratch folder with `link --ignore`. Once 20 minutes of
|
|
31
|
+
agent turns are recorded in such a repository, one prompt per session repeats this as a short reminder.
|
|
32
|
+
Ignored repositories and folders outside git get no context and no reminder.
|
|
22
33
|
Codex runs new hooks only after you trust them once in `/hooks`. `hooks status` shows both installs,
|
|
23
34
|
and `hooks uninstall` removes only the Flowmind entries.
|
|
24
35
|
|
|
@@ -33,12 +44,28 @@ flowmind projects add "Bead Focus" --description "Focus timer for iOS" --json
|
|
|
33
44
|
flowmind link "Bead Focus" # writes .flowmind.json at the repository root
|
|
34
45
|
flowmind link <project-id> --dir ~/projects/bead-focus
|
|
35
46
|
flowmind link # shows the current link
|
|
47
|
+
flowmind link --ignore --reason "Third-party clone"
|
|
48
|
+
flowmind link --scan ~/projects ~/code --depth 2
|
|
36
49
|
```
|
|
37
50
|
|
|
38
51
|
A link names the project by id and keeps its name as a label. `link` accepts an id or an exact
|
|
39
52
|
project name and checks it against the projects visible to agents. Commit `.flowmind.json` to share
|
|
40
53
|
the link with other machines and agents.
|
|
41
54
|
|
|
55
|
+
One product is one project on every machine. `projects add` refuses a name that an existing project
|
|
56
|
+
already has (trimmed, ignoring case), names that project and its id, and suggests `flowmind link <id>`.
|
|
57
|
+
It creates nothing in that case. `--allow-duplicate` creates the second project anyway.
|
|
58
|
+
|
|
59
|
+
`link --ignore` writes `{"ignore": true, "reason": "..."}` as `.flowmind.json` for a third-party clone or
|
|
60
|
+
a scratch folder. `link` then prints `Ignored for Flowmind`, the hooks stay silent there, and
|
|
61
|
+
`agent stage` fails unless you pass `--project`. Commit the marker so other machines skip it too.
|
|
62
|
+
|
|
63
|
+
`link --scan <dir...>` finds git repositories in each directory and up to `--depth` folder levels below
|
|
64
|
+
it (default 2). It skips hidden folders and `node_modules`, and does not search inside a repository.
|
|
65
|
+
Each repository gets a status: `linked`, `ignored`, `remote-linked` (a local remote-tracking ref has the
|
|
66
|
+
link; run `git pull`) or `unlinked`, with the project and the origin URL without credentials.
|
|
67
|
+
`--json` prints `{ "repositories": [...] }`. The scan exits 0 and does not use the network.
|
|
68
|
+
|
|
42
69
|
Log completed work by project name and duration:
|
|
43
70
|
|
|
44
71
|
```sh
|
package/dist/flowmind/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flowmind
|
|
3
|
-
description: "Set up Flowmind for a builder's coding agents and log agent work to it with the flowmind CLI. Use when the user asks to set up, connect, or onboard Flowmind; to create or link Flowmind projects; to log or stage work in Flowmind; to check Flowmind progress;
|
|
3
|
+
description: "Set up Flowmind for a builder's coding agents and log agent work to it with the flowmind CLI. Use when the user asks to set up, connect, or onboard Flowmind; to create or link Flowmind projects; to log or stage work in Flowmind; to check Flowmind progress; when you finish material work in a repository that has a .flowmind.json file; when you start or scaffold a new project or repository; or when you work in a repository that Flowmind reports as not linked. Skip generic time tracking that does not involve Flowmind."
|
|
4
4
|
homepage: https://www.flowmind.pro/
|
|
5
5
|
metadata: { "openclaw": { "emoji": "⏱️" } }
|
|
6
6
|
---
|
|
@@ -13,20 +13,37 @@ Flowmind records what a builder ships, including work their agents do. Agents us
|
|
|
13
13
|
|
|
14
14
|
Use this when the user says "set up Flowmind", "connect my projects to Flowmind", or similar.
|
|
15
15
|
|
|
16
|
-
1. Check the CLI with `flowmind --version`. If it is missing or older than 0.
|
|
16
|
+
1. Check the CLI with `flowmind --version`. If it is missing or older than 0.3.0, run `npm install -g @flowmind/cli`.
|
|
17
17
|
2. Check sign-in with `flowmind auth status --json`. If `authenticated` is false, run `flowmind auth login --no-browser`, give the user the printed URL, and keep the command running while it waits (up to 5 minutes). The user approves in the browser.
|
|
18
18
|
3. Install the skill and session hooks with `flowmind hooks install`. Tell the user that Codex runs new hooks only after they trust them once in `/hooks`. Claude Code runs them at its next session.
|
|
19
19
|
4. Inventory the user's local work:
|
|
20
|
-
- Find git repositories
|
|
20
|
+
- Find git repositories and their link status with `flowmind link --scan <dir...> --json` over the folders the user works in (for example `~/projects`, `~/code`, `~/src`, and the workspaces your host lists). Read each README or package manifest only far enough to name and describe the project.
|
|
21
21
|
- Read existing Flowmind projects with `flowmind projects --json`.
|
|
22
|
-
-
|
|
23
|
-
5. Propose a table: repository path, Flowmind project name, one-line description, and action (create, link to an existing project, or
|
|
22
|
+
- A `remote-linked` repository needs only `git pull`.
|
|
23
|
+
5. Propose a table: repository path, Flowmind project name, one-line description, and action (create, link to an existing project, or ignore). Put repositories of one product under one project. Ask the user to approve or edit the list. Create nothing before they approve.
|
|
24
24
|
6. After approval, for each row:
|
|
25
25
|
- Create: `flowmind projects add "<name>" --description "<one line>" --json`. The new id is `project.id`.
|
|
26
26
|
- Link: `flowmind link <project-id> --dir <repo> --json`. This writes `.flowmind.json` at the repository root.
|
|
27
|
+
- Ignore: `flowmind link --ignore --dir <repo>`.
|
|
27
28
|
- Ask whether to commit `.flowmind.json`. A committed link reaches the user's other machines and agents.
|
|
28
29
|
7. Report what you created and linked, and explain how agent work gets logged from now on.
|
|
29
30
|
|
|
31
|
+
## New projects and unlinked repositories
|
|
32
|
+
|
|
33
|
+
Use this when you start or scaffold a new project or repository, or when a session starts in a repository that Flowmind reports as not linked.
|
|
34
|
+
|
|
35
|
+
One product is one Flowmind project on every machine. The same repository on another machine already shares its link through the committed `.flowmind.json`. Never create a duplicate project.
|
|
36
|
+
|
|
37
|
+
1. Run `git pull` first. Another machine may have linked the repository already. If Flowmind says the remote links it, the pull is all you need.
|
|
38
|
+
2. Look for the existing project with `flowmind projects --json`. Match by product, repository, and name.
|
|
39
|
+
3. Create a project with `flowmind projects add "<name>" --description "<one line>" --json` only for a new product. If it refuses because the name exists, link to that project instead.
|
|
40
|
+
4. Run `flowmind link <project-id>` and commit `.flowmind.json`.
|
|
41
|
+
5. For a third-party clone or a scratch folder, run `flowmind link --ignore` instead, and commit the marker.
|
|
42
|
+
|
|
43
|
+
Ask the user once when you are unsure which project a repository belongs to, or whether it counts at all. Do this before you finish the task.
|
|
44
|
+
|
|
45
|
+
To find gaps across the user's folders, run `flowmind link --scan <dir...>`. It lists each repository as `linked`, `ignored`, `remote-linked`, or `unlinked`.
|
|
46
|
+
|
|
30
47
|
## Log agent work
|
|
31
48
|
|
|
32
49
|
In a linked repository, the session hooks record how long each agent turn runs. When you finish a material unit of work, such as a feature, fix, investigation, or document, stage it. Do not stage every turn.
|
|
@@ -36,6 +53,7 @@ flowmind agent stage --intention "<what you set out to do>" --outcome "<what cha
|
|
|
36
53
|
```
|
|
37
54
|
|
|
38
55
|
- The CLI reads the project from `.flowmind.json` and the time from the session record. A second stage in the same session covers only the time after the first.
|
|
56
|
+
- After 20 minutes of unstaged agent time, each prompt in a linked repository carries a reminder with the unstaged minutes. Stage when the current unit of work is complete; a stage with explicit times also resets the count.
|
|
39
57
|
- Add `--dry-run` to preview the project and minutes without staging.
|
|
40
58
|
- Pass `--project`, `--minutes`, and `--started-at` only when no session record exists. Use observed times only. Never estimate time from tokens or tool calls.
|
|
41
59
|
- Write the intention and the outcome as one short sentence each. Never paste transcripts, terminal output, commit messages, issue titles, emails, or secrets.
|
|
@@ -67,3 +85,5 @@ Ask only for missing fields. A natural-language entry (`flowmind log "2h on the
|
|
|
67
85
|
- "No recorded agent time": the hooks are missing or not trusted, or the session started before installation. Stage with observed `--minutes` and `--started-at`, or stage in the next session.
|
|
68
86
|
- "Several agent sessions have a turn in progress": pass `--session-id`.
|
|
69
87
|
- "No project given": run `flowmind link <project>` in the repository, or pass `--project`.
|
|
88
|
+
- "This repository is ignored for Flowmind": the repository has an ignore marker. Pass `--project` only if the user wants this work staged.
|
|
89
|
+
- "A project named ... already exists": link to that project with `flowmind link <id>`. Use `--allow-duplicate` only when the user asks for a second project with the same name.
|