@manhquy/flow-skill 0.1.0-rc.1 → 0.1.0-rc.2
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/CHANGELOG.md +83 -1
- package/README.md +17 -31
- package/README_VN.md +15 -30
- package/bin/cli.mjs +27 -4
- package/package.json +3 -2
- package/skills/flow/SKILL.md +248 -234
- package/skills/flow/_templates/00-idea.md +16 -16
- package/skills/flow/_templates/00-inspect.md +42 -42
- package/skills/flow/_templates/01-research.md +59 -59
- package/skills/flow/_templates/02-scope.md +71 -71
- package/skills/flow/_templates/03-prd.md +57 -57
- package/skills/flow/_templates/04-adr.md +21 -21
- package/skills/flow/_templates/05-contract.md +59 -59
- package/skills/flow/_templates/card.md +26 -26
- package/skills/flow/eval/fixtures/routing/manifest.tsv +16 -0
- package/skills/flow/eval/fixtures/routing/states/state-any-midproject.txt +4 -0
- package/skills/flow/eval/fixtures/routing/states/state-cards-todo.txt +4 -0
- package/skills/flow/eval/fixtures/routing/states/state-empty.txt +4 -0
- package/skills/flow/eval/fixtures/routing/states/state-idea-stage.txt +4 -0
- package/skills/flow/eval/fixtures/routing/states/state-review-passed.txt +5 -0
- package/skills/flow/eval/fixtures/routing/states/state-review-pending.txt +4 -0
- package/skills/flow/eval/fixtures/routing/states/state-scope-stage.txt +4 -0
- package/skills/flow/harness/README.md +117 -117
- package/skills/flow/harness/schema/001-init.sql +129 -129
- package/skills/flow/harness/schema/002-story-verify.sql +9 -9
- package/skills/flow/harness/schema/003-tool-registry.sql +15 -15
- package/skills/flow/harness/schema/004-intervention.sql +15 -15
- package/skills/flow/harness/schema/005-tool-extensions.sql +20 -20
- package/skills/flow/harness/schema/009-accessed-count.sql +11 -11
- package/skills/flow/harness/schema/010-usage-event.sql +42 -42
- package/skills/flow/harness/schema/011-usage-gate-reason.sql +8 -8
- package/skills/flow/harness/schema/012-usage-ephemeral.sql +10 -10
- package/skills/flow/law/CLAUDE.md +140 -140
- package/skills/flow/law/DESIGN.md +141 -141
- package/skills/flow/law/RETRO.md +18 -13
- package/skills/flow/playbooks/README.md +28 -28
- package/skills/flow/playbooks/cloudflare-ai-gateway-qwen.md +346 -346
- package/skills/flow/playbooks/docker-deploy-stale-cache.md +32 -32
- package/skills/flow/playbooks/rag-lite-postgres-cloudflare.md +192 -192
- package/skills/flow/references/adversarial-review.md +202 -197
- package/skills/flow/references/agent-detection.md +88 -88
- package/skills/flow/references/agent-stage-mapping.md +114 -114
- package/skills/flow/references/auto-run.md +81 -81
- package/skills/flow/references/claudekit-skills.md +11 -0
- package/skills/flow/references/command-dispatch.md +54 -54
- package/skills/flow/references/concierge.md +113 -0
- package/skills/flow/references/flow-catalog.tsv +18 -0
- package/skills/flow/references/forge-idea.md +88 -0
- package/skills/flow/references/gate-rules.md +185 -171
- package/skills/flow/references/native-rituals.md +133 -0
- package/skills/flow/references/project-types.md +42 -42
- package/skills/flow/runner/flow.sh +362 -3
- package/skills-manifest.json +15 -3
- package/src/constants.mjs +19 -2
- package/src/help.mjs +8 -2
- package/src/prompt.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,9 +2,91 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@manhquy/flow-skill`. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versioning: [SemVer](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [0.1.0-rc.2] — 2026-07-17 (not yet published — see release command below)
|
|
6
|
+
|
|
7
|
+
Ships `skills/flow` v0.22.0 (concierge front-door + standalone native rituals — see the root
|
|
8
|
+
repo's CHANGELOG.md `## 0.22.0` entry for the full skill-content changelog). This wrapper
|
|
9
|
+
release fixes the actual reported installer bug, adds a 5th install target (Cursor), and fixes
|
|
10
|
+
two hardening items found while verifying it all.
|
|
11
|
+
|
|
12
|
+
### Fixed — the reported symptom (A0)
|
|
13
|
+
- **Antigravity users installing via `npx` got no guidance and saw a silent `/flow`-not-found.**
|
|
14
|
+
A freshly-installed skill isn't discovered by an agent until it reloads; the post-install
|
|
15
|
+
summary line only ever told Claude + Codex users what to do. Every installed target now gets
|
|
16
|
+
its own restart/reload hint (`bin/cli.mjs`'s `doneLine()`, `install.sh`, `install.ps1` — all
|
|
17
|
+
three entry points, built from the actual installed-targets list, not a static string).
|
|
18
|
+
|
|
19
|
+
### Fixed — hardening found during verification
|
|
20
|
+
- `scripts/sync.mjs` baked an **absolute local filesystem path** (e.g. `D:\project\flow\...`)
|
|
21
|
+
into `skills-manifest.json`'s `source` field, and that file ships inside the published
|
|
22
|
+
tarball (`package.json` `files:`) — leaking local machine layout and being non-reproducible
|
|
23
|
+
across dev machines/CI. Now emits a repo-relative `"../skills/flow"` (or a literal
|
|
24
|
+
`"$FLOW_SKILL_SRC (override)"` marker when the env override is used).
|
|
25
|
+
- `pretest: node scripts/sync.mjs` — the bundled `skills/flow/` tree is gitignored
|
|
26
|
+
(regenerated by `npm run sync`/`prepack`); a fresh checkout now gets it automatically before
|
|
27
|
+
`npm test` instead of failing with a missing/stale bundle.
|
|
28
|
+
- `--test-concurrency=1` pinned on the `test` script — the two new real (non-dry-run) CLI
|
|
29
|
+
install tests below, run in parallel with `lock-atomicity.test.mjs`'s own child-process
|
|
30
|
+
spawns, intermittently starved on Windows (spurious non-zero exit unrelated to any of the
|
|
31
|
+
three files' own logic, confirmed by serialized re-runs going 38/38 green repeatedly vs an
|
|
32
|
+
occasional false-red in parallel). Total suite time impact: negligible (~1-2s).
|
|
33
|
+
|
|
34
|
+
### Added — 5th install target: Cursor
|
|
35
|
+
- New `cursor` target → `~/.cursor/skills/flow`. **Marker is `.cursor/skills`, never bare
|
|
36
|
+
`.cursor`** — the bare dir holds unrelated editor config (settings, caches, `argv.json`) that
|
|
37
|
+
exists for every Cursor user, and a bare marker would have silently auto-installed flow under
|
|
38
|
+
`--yes` for anyone with Cursor installed at all (the exact false-positive class the existing
|
|
39
|
+
Antigravity `~/.gemini` guard already dodges).
|
|
40
|
+
- **Path confirmed by a live probe on the dev machine, not documentation/web research**: found a
|
|
41
|
+
real pre-existing symlink `~/.cursor/skills/find-skills -> ~/.agents/skills/find-skills`,
|
|
42
|
+
empirically proving Cursor's actual skill-read location and that it already consumes content
|
|
43
|
+
from the universal Agent-Skills home (see below).
|
|
44
|
+
- `agents` target relabeled "Agents home — universal Agent-Skills home" — it's the shared
|
|
45
|
+
directory the open Agent Skills standard ([agentskills.io](https://agentskills.io), Anthropic,
|
|
46
|
+
now stewarded by the Agentic AI Foundation) defines, which spec-compliant tools beyond this
|
|
47
|
+
installer's named targets (Cursor confirmed; ~30 others per the standard's adoption) can read.
|
|
48
|
+
- **Honesty limit, not overclaim**: Cursor has no discoverable headless CLI (`cursor agent --help`
|
|
49
|
+
falls through to generic IDE flags, no `-p`/`exec` print-mode). Unlike Antigravity (`agy -p`)
|
|
50
|
+
and Codex (`codex exec`), the installed skill's *runner execution* inside Cursor is not
|
|
51
|
+
independently live-verified here — install correctness is (real scratch-`$HOME` test, content
|
|
52
|
+
lands at the confirmed path). README/CHANGELOG say "install verified, runner not yet
|
|
53
|
+
independently confirmed" rather than claiming parity with the other two targets.
|
|
54
|
+
- `--all` now installs 5 targets; every "4 target(s)" mention across `--help`, both root READMEs,
|
|
55
|
+
and both npm-wrapper READMEs updated to 5 (the count in `--help` is now derived from
|
|
56
|
+
`TARGETS.length` so it cannot drift again).
|
|
57
|
+
|
|
58
|
+
### Added — tests
|
|
59
|
+
- `test/detect.test.mjs`: 2 new cases — bare `.cursor` does NOT trigger detection (the
|
|
60
|
+
false-positive regression guard), `.cursor/skills` present → detected at the confirmed dest.
|
|
61
|
+
- `test/cli.test.mjs`: three REAL (non-dry-run, scratch-`$HOME`) installs asserting the Done-line
|
|
62
|
+
restart hint — `antigravity` alone, `cursor` alone (this one caught a real bug: the Done-line
|
|
63
|
+
printed empty for a cursor-only install because Cursor wasn't yet in `RESTART_HINTS` when it
|
|
64
|
+
was written — fixed same-session), and `claude,codex` (proving the old Codex hint survives and
|
|
65
|
+
no unrelated agent line leaks in).
|
|
66
|
+
- `test/sync-manifest.test.mjs`: asserts `skills-manifest.json.source` is never an absolute path.
|
|
67
|
+
- `tests/test_flow_antigravity_integration.sh` (root repo bash suite): 4 new assertions —
|
|
68
|
+
both `install.sh` and `install.ps1` carry the Antigravity restart/reload hint, and the old
|
|
69
|
+
hardcoded Claude+Codex-only Done line is gone from both.
|
|
70
|
+
|
|
71
|
+
### Release command (operator-gated — not run by this change)
|
|
72
|
+
```
|
|
73
|
+
cd npm-wrapper && npm test # confirm green first
|
|
74
|
+
git tag npm@0.1.0-rc.2 && git push --tags # triggers .github/workflows/publish-npm-wrapper.yml
|
|
75
|
+
```
|
|
76
|
+
|
|
5
77
|
## [0.1.0-rc.1] — 2026-07-12
|
|
6
78
|
|
|
7
|
-
|
|
79
|
+
**LIVE on npm**: https://www.npmjs.com/package/@manhquy/flow-skill
|
|
80
|
+
|
|
81
|
+
Initial release candidate. Published manually to bootstrap npm Trusted Publisher (which requires the package to exist first). rc.2+ will be published from CI with OIDC + SLSA L2 provenance.
|
|
82
|
+
|
|
83
|
+
Publish details (for the record):
|
|
84
|
+
- Method: Granular Access Token with `Bypass 2FA` (created + used + revoked within 60s from the maintainer's local machine).
|
|
85
|
+
- No provenance on this bootstrap version (`npm publish --provenance` requires a supported CI environment; laptop publish is not).
|
|
86
|
+
- Dist-tags at publish: `{rc: 0.1.0-rc.1, latest: 0.1.0-rc.1}` — npm auto-populated `latest` on first publish. Docs advise pinning `@rc` or `@0.1.0-rc.1` explicitly.
|
|
87
|
+
- Tarball: 76 files, 203 KB gzipped, 566 KB unpacked.
|
|
88
|
+
|
|
89
|
+
Ships to the `rc` npm dist-tag.
|
|
8
90
|
|
|
9
91
|
### Post-implementation audit fixes (before first publish)
|
|
10
92
|
- **installer:** `acquireLock` was TOCTOU-racy — switched to atomic `writeFileSync(..., { flag: 'wx' })` so two `npx` runs cannot both acquire.
|
package/README.md
CHANGED
|
@@ -5,41 +5,18 @@ One-command installer that copies the [flow](https://github.com/manhquydev/flow-
|
|
|
5
5
|
- Pure Node — works on macOS, Linux, and Windows (cmd, PowerShell 5.1/7, Git Bash) with the same code path.
|
|
6
6
|
- Interactive multi-select or non-interactive CI mode.
|
|
7
7
|
- Preserves any user-added files in the destination outside the 6 subdirs the skill owns.
|
|
8
|
-
- Ships with [npm provenance](https://docs.npmjs.com/generating-provenance-statements) via GitHub Actions trusted publishing
|
|
9
|
-
|
|
10
|
-
## Status — 2026-07-12
|
|
11
|
-
|
|
12
|
-
- ✅ Code complete, 35/35 tests green, CI matrix green (ubuntu/macos/windows × Node 22/24).
|
|
13
|
-
- ⏳ Not yet on npm registry. Repo public + renamed; transfer to `manhquy` account pending accept; first publish (`v0.1.0-rc.1`, manual, no provenance) queued.
|
|
14
|
-
- ➡️ Once published, this section will disappear and `npx @manhquy/flow-skill@rc` becomes the canonical install path.
|
|
8
|
+
- Ships with [npm provenance](https://docs.npmjs.com/generating-provenance-statements) via GitHub Actions trusted publishing **starting with rc.2** — rc.1 was a manual bootstrap because npm Trusted Publisher cannot bind to a package that does not yet exist.
|
|
15
9
|
|
|
16
10
|
## Install
|
|
17
11
|
|
|
18
|
-
**A. From the git repo (works today, no npm registry needed)**
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
git clone https://github.com/manhquydev/flow-skill.git
|
|
22
|
-
cd flow-skill/npm-wrapper
|
|
23
|
-
npm install
|
|
24
|
-
npm run sync # materializes skills/flow from ../skills/flow
|
|
25
|
-
npm link # exposes `flow-skill` as a global command
|
|
26
|
-
|
|
27
|
-
flow-skill --yes --all --dry-run --json # smoke check
|
|
28
|
-
flow-skill # interactive install
|
|
29
12
|
```
|
|
30
|
-
|
|
31
|
-
To remove: `npm unlink -g @manhquy/flow-skill`.
|
|
32
|
-
|
|
33
|
-
**B. Via npx (once published)**
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
# Pre-release channel (RC candidate — will exist after first publish)
|
|
13
|
+
# Pre-release channel (current — v0.1.0-rc.2)
|
|
37
14
|
npx @manhquy/flow-skill@rc
|
|
38
15
|
```
|
|
39
16
|
|
|
40
17
|
An interactive prompt asks which agents to install to. Pick one or more, confirm, done.
|
|
41
18
|
|
|
42
|
-
> **RC phase**: pin `@rc` (dist-tag) or a specific version like `@0.1.0-rc.
|
|
19
|
+
> **RC phase**: pin `@rc` (dist-tag) or a specific version like `@0.1.0-rc.2`. `npx @manhquy/flow-skill@0.1.x` will start working after stable `0.1.0` is published — semver ranges do **not** match pre-release tuples by default. See [SECURITY.md](./SECURITY.md).
|
|
43
20
|
|
|
44
21
|
## Non-interactive
|
|
45
22
|
|
|
@@ -51,7 +28,7 @@ npx @manhquy/flow-skill@rc --yes
|
|
|
51
28
|
npx @manhquy/flow-skill@rc --yes -t claude -t codex
|
|
52
29
|
npx @manhquy/flow-skill@rc --yes -t claude,codex # comma form OK
|
|
53
30
|
|
|
54
|
-
# Force all
|
|
31
|
+
# Force all five targets even if not detected
|
|
55
32
|
npx @manhquy/flow-skill@rc --yes --all
|
|
56
33
|
|
|
57
34
|
# Project scope (Claude only — see below)
|
|
@@ -67,16 +44,25 @@ npx @manhquy/flow-skill@rc --yes --all --dry-run --json
|
|
|
67
44
|
|---|---|---|---|
|
|
68
45
|
| `claude` | Claude Code | `~/.claude/skills/flow` | any presence of `~/.claude` (Claude is always pre-checked) |
|
|
69
46
|
| `codex` | Codex CLI | `~/.codex/skills/flow` | `~/.codex/skills` |
|
|
70
|
-
| `agents` | Agents home | `~/.agents/skills/flow` | `~/.agents/skills` |
|
|
47
|
+
| `agents` | Agents home — also the universal [Agent-Skills](https://agentskills.io) home other spec-compliant tools read | `~/.agents/skills/flow` | `~/.agents/skills` |
|
|
71
48
|
| `antigravity` | Antigravity (CLI + IDE) | `~/.gemini/antigravity-cli/skills/flow` **and** `~/.gemini/config/skills/flow` | `~/.gemini/antigravity-cli` **or** `~/.gemini/config/skills` |
|
|
49
|
+
| `cursor` | Cursor | `~/.cursor/skills/flow` | `~/.cursor/skills` (never the bare `~/.cursor` config dir every Cursor user has) |
|
|
72
50
|
|
|
73
51
|
`--project` scope writes to `<dir>/.claude/skills/flow` and supports only the `claude` target. Combining `--project` with a non-Claude target exits with code `2`.
|
|
74
52
|
|
|
75
53
|
## After install
|
|
76
54
|
|
|
55
|
+
A freshly-installed skill isn't discovered by an agent until it reloads — the installer's final
|
|
56
|
+
line tells you exactly what to do for whichever targets you installed:
|
|
57
|
+
|
|
77
58
|
- Claude Code: type `/flow`.
|
|
78
|
-
- Codex CLI: type `$flow` (restart Codex once to load).
|
|
79
|
-
- Antigravity:
|
|
59
|
+
- Codex CLI: type `$flow` (restart Codex once to load a new skill).
|
|
60
|
+
- Antigravity: restart/reload the IDE (or restart `agy`) to load the new skill, then type `/flow`.
|
|
61
|
+
- Agents home: restart/reload your tool if it does not auto-detect new skills.
|
|
62
|
+
- Cursor: **install verified, live runner execution not yet independently confirmed** — Cursor
|
|
63
|
+
has no headless CLI probe available for automated verification (unlike Antigravity's `agy -p`
|
|
64
|
+
or Codex's `codex exec`); restart/reload Cursor after install and check the Agent panel for
|
|
65
|
+
the `flow` skill.
|
|
80
66
|
- Diagnostics: run `/flow doctor` from your agent.
|
|
81
67
|
|
|
82
68
|
## Uninstall
|
|
@@ -100,7 +86,7 @@ rm -rf <project>/.claude/skills/flow
|
|
|
100
86
|
- **Windows `EBUSY` / `EPERM` mid-install**: an agent (Claude Code, Codex, Antigravity IDE) is holding a file inside the destination. Close the agent and re-run. The installer already retries with 100/300/900 ms backoff before surfacing the error.
|
|
101
87
|
- **Stale advisory lock**: a prior run crashed. The next run detects the dead PID and reclaims the lock automatically. If it does not (very rare — the recorded PID was recycled by another live process), delete `<parent-of-dest>/.flow-skill.installing.lock`.
|
|
102
88
|
- **`No matching version found` on `@0.1.x`**: you are trying to install a pre-release version through a stable range. Use `@rc` (dist-tag) or an explicit `@0.1.0-rc.N` until stable `0.1.0` ships.
|
|
103
|
-
- **Node too old** (`requires Node.js >=
|
|
89
|
+
- **Node too old** (`requires Node.js >=22.14.0`): upgrade with your preferred version manager (`nvm install 22`, `fnm install 22`, or Node's official installer). Node 20 reached end-of-life April 2026; npm OIDC Trusted Publishing needs npm >=11.5.1 which bundles with Node 22.14+.
|
|
104
90
|
|
|
105
91
|
## JSONL contract
|
|
106
92
|
|
package/README_VN.md
CHANGED
|
@@ -7,39 +7,16 @@ Trình cài đặt một-lệnh sao chép skill [flow](https://github.com/manhqu
|
|
|
7
7
|
- Bảo toàn file người dùng đã thêm ngoài 6 subdir mà skill sở hữu.
|
|
8
8
|
- Ship kèm [npm provenance](https://docs.npmjs.com/generating-provenance-statements) qua GitHub Actions trusted publishing (từ rc.2+).
|
|
9
9
|
|
|
10
|
-
## Tình trạng — 2026-07-12
|
|
11
|
-
|
|
12
|
-
- ✅ Code hoàn thiện, 35/35 test xanh, CI matrix xanh (ubuntu/macos/windows × Node 22/24).
|
|
13
|
-
- ⏳ Chưa lên npm registry. Repo đã public + đã rename; transfer sang `manhquy` account đang chờ accept; first publish (`v0.1.0-rc.1`, thủ công, không có provenance) đang queued.
|
|
14
|
-
- ➡️ Sau khi publish, section này sẽ biến mất và `npx @manhquy/flow-skill@rc` thành lệnh cài chính thức.
|
|
15
|
-
|
|
16
10
|
## Cài đặt
|
|
17
11
|
|
|
18
|
-
**A. Từ git repo (chạy được ngay, không cần npm registry)**
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
git clone https://github.com/manhquydev/flow-skill.git
|
|
22
|
-
cd flow-skill/npm-wrapper
|
|
23
|
-
npm install
|
|
24
|
-
npm run sync # materialize skills/flow từ ../skills/flow
|
|
25
|
-
npm link # expose `flow-skill` như global command
|
|
26
|
-
|
|
27
|
-
flow-skill --yes --all --dry-run --json # smoke check
|
|
28
|
-
flow-skill # cài tương tác
|
|
29
12
|
```
|
|
30
|
-
|
|
31
|
-
Gỡ: `npm unlink -g @manhquy/flow-skill`.
|
|
32
|
-
|
|
33
|
-
**B. Qua npx (sau khi publish)**
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
# Kênh pre-release (RC candidate — sẽ tồn tại sau first publish)
|
|
13
|
+
# Kênh pre-release (hiện tại — v0.1.0-rc.2)
|
|
37
14
|
npx @manhquy/flow-skill@rc
|
|
38
15
|
```
|
|
39
16
|
|
|
40
17
|
Prompt tương tác hỏi cài vào agent nào. Chọn một hoặc nhiều, xác nhận, xong.
|
|
41
18
|
|
|
42
|
-
> **Giai đoạn RC**: pin `@rc` (dist-tag) hoặc phiên bản cụ thể `@0.1.0-rc.
|
|
19
|
+
> **Giai đoạn RC**: pin `@rc` (dist-tag) hoặc phiên bản cụ thể `@0.1.0-rc.2`. `npx @manhquy/flow-skill@0.1.x` chỉ dùng được sau khi stable `0.1.0` publish — semver range **không** match pre-release theo mặc định. Xem [SECURITY.md](./SECURITY.md).
|
|
43
20
|
|
|
44
21
|
## Non-interactive
|
|
45
22
|
|
|
@@ -51,7 +28,7 @@ npx @manhquy/flow-skill@rc --yes
|
|
|
51
28
|
npx @manhquy/flow-skill@rc --yes -t claude -t codex
|
|
52
29
|
npx @manhquy/flow-skill@rc --yes -t claude,codex # Dạng comma OK
|
|
53
30
|
|
|
54
|
-
# Ép cài cả
|
|
31
|
+
# Ép cài cả 5 target dù không detect
|
|
55
32
|
npx @manhquy/flow-skill@rc --yes --all
|
|
56
33
|
|
|
57
34
|
# Project scope (chỉ Claude — xem bên dưới)
|
|
@@ -67,16 +44,24 @@ npx @manhquy/flow-skill@rc --yes --all --dry-run --json
|
|
|
67
44
|
|---|---|---|---|
|
|
68
45
|
| `claude` | Claude Code | `~/.claude/skills/flow` | bất kỳ presence của `~/.claude` (Claude luôn pre-check) |
|
|
69
46
|
| `codex` | Codex CLI | `~/.codex/skills/flow` | `~/.codex/skills` |
|
|
70
|
-
| `agents` | Agents home | `~/.agents/skills/flow` | `~/.agents/skills` |
|
|
47
|
+
| `agents` | Agents home — cũng là thư mục [Agent-Skills](https://agentskills.io) chung mà các tool tuân chuẩn khác đọc | `~/.agents/skills/flow` | `~/.agents/skills` |
|
|
71
48
|
| `antigravity` | Antigravity (CLI + IDE) | `~/.gemini/antigravity-cli/skills/flow` **và** `~/.gemini/config/skills/flow` | `~/.gemini/antigravity-cli` **hoặc** `~/.gemini/config/skills` |
|
|
49
|
+
| `cursor` | Cursor | `~/.cursor/skills/flow` | `~/.cursor/skills` (không bao giờ dùng thư mục config `~/.cursor` trần — ai dùng Cursor cũng có) |
|
|
72
50
|
|
|
73
51
|
Scope `--project` ghi vào `<dir>/.claude/skills/flow` và chỉ hỗ trợ target `claude`. Kết hợp `--project` với target khác → exit code `2`.
|
|
74
52
|
|
|
75
53
|
## Sau khi cài
|
|
76
54
|
|
|
55
|
+
Skill vừa cài xong sẽ không được agent nhận ra cho tới khi agent reload — dòng cuối cùng của
|
|
56
|
+
installer nói rõ việc cần làm cho đúng target đã cài:
|
|
57
|
+
|
|
77
58
|
- Claude Code: gõ `/flow`.
|
|
78
|
-
- Codex CLI: gõ `$flow` (restart Codex 1 lần để load).
|
|
79
|
-
- Antigravity:
|
|
59
|
+
- Codex CLI: gõ `$flow` (restart Codex 1 lần để load skill mới).
|
|
60
|
+
- Antigravity: restart/reload IDE (hoặc restart `agy`) để load skill mới, rồi gõ `/flow`.
|
|
61
|
+
- Agents home: restart/reload tool nếu nó không tự nhận skill mới.
|
|
62
|
+
- Cursor: **đã xác nhận cài đúng chỗ, chưa xác nhận runner chạy độc lập** — Cursor không có
|
|
63
|
+
CLI headless để tự động kiểm (khác `agy -p` của Antigravity hay `codex exec` của Codex);
|
|
64
|
+
restart/reload Cursor sau khi cài rồi kiểm tra panel Agent xem có skill `flow` không.
|
|
80
65
|
- Chẩn đoán: chạy `/flow doctor` từ agent.
|
|
81
66
|
|
|
82
67
|
## Gỡ cài đặt
|
|
@@ -111,7 +96,7 @@ Hợp đồng additive trong `0.1.x` — field mới có thể thêm, field cũ
|
|
|
111
96
|
- **`EBUSY`/`EPERM` giữa install trên Windows**: một agent đang giữ handle vào file trong destination. Đóng agent + re-run. Installer đã retry 100/300/900 ms trước khi báo error.
|
|
112
97
|
- **Advisory lock cũ**: run trước crash. Run mới tự phát hiện PID dead → reclaim. Trường hợp hiếm (PID được recycle bởi process khác đang chạy): xóa `<parent-of-dest>/.flow-skill.installing.lock`.
|
|
113
98
|
- **`No matching version found` với `@0.1.x`**: cài pre-release qua stable range. Dùng `@rc` hoặc `@0.1.0-rc.N` cho tới khi stable `0.1.0` ship.
|
|
114
|
-
- **Node quá cũ** (`requires Node.js >=
|
|
99
|
+
- **Node quá cũ** (`requires Node.js >=22.14.0`): update bằng `nvm install 22`, `fnm install 22`, hoặc installer chính thức của Node. Node 20 hết vòng đời từ 4/2026; npm OIDC Trusted Publishing cần npm >=11.5.1 (bundle theo Node 22.14+).
|
|
115
100
|
|
|
116
101
|
## Yêu cầu
|
|
117
102
|
|
package/bin/cli.mjs
CHANGED
|
@@ -147,6 +147,29 @@ function humanResult(target, result) {
|
|
|
147
147
|
return `${status} ${target} -> ${dests}${err}`;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
// v0.23 A0 fix — the reported symptom: a user installs to a non-Claude agent, opens it, types
|
|
151
|
+
// /flow, and sees nothing, because a freshly-installed skill isn't discovered until the agent
|
|
152
|
+
// reloads. The old static message only told Claude+Codex users what to do; every installed
|
|
153
|
+
// target now gets its own line so nobody is left guessing why /flow doesn't show up.
|
|
154
|
+
const RESTART_HINTS = {
|
|
155
|
+
claude: 'Claude Code: type /flow',
|
|
156
|
+
codex: 'Codex CLI: type $flow (restart Codex once to load a new skill)',
|
|
157
|
+
antigravity:
|
|
158
|
+
'Antigravity: restart/reload the IDE (or restart `agy`) to load the new skill, then type /flow',
|
|
159
|
+
agents:
|
|
160
|
+
'Agents home (~/.agents/skills/): restart/reload your tool if it does not auto-detect new skills',
|
|
161
|
+
// Cursor has no headless CLI probe (unlike Antigravity's `agy -p` or Codex's `codex exec`) to
|
|
162
|
+
// independently verify the runner loads post-install — restart/reload guidance is still the
|
|
163
|
+
// correct advice (same discovery-on-reload mechanism), just without our own live confirmation
|
|
164
|
+
// that the Agent panel picks it up. See README's "After install" section for the caveat.
|
|
165
|
+
cursor: 'Cursor: restart/reload Cursor to load the new skill, then check the Agent panel for flow',
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
function doneLine(targets) {
|
|
169
|
+
const hints = targets.map((t) => RESTART_HINTS[t]).filter(Boolean);
|
|
170
|
+
return `Done. ${hints.join(' | ')}`;
|
|
171
|
+
}
|
|
172
|
+
|
|
150
173
|
async function main() {
|
|
151
174
|
const rawArgs = process.argv.slice(2);
|
|
152
175
|
let opts;
|
|
@@ -346,10 +369,7 @@ async function main() {
|
|
|
346
369
|
);
|
|
347
370
|
|
|
348
371
|
if (!opts.json && success) {
|
|
349
|
-
log(
|
|
350
|
-
'\nDone. Claude Code: type /flow | Codex CLI: type $flow (restart Codex once).',
|
|
351
|
-
false
|
|
352
|
-
);
|
|
372
|
+
log(`\n${doneLine(plan.map((p) => p.target))}`, false);
|
|
353
373
|
}
|
|
354
374
|
|
|
355
375
|
// If aborted mid-loop, exit 130 (matches shell convention) instead of the generic failure.
|
|
@@ -360,6 +380,9 @@ async function main() {
|
|
|
360
380
|
main().catch((err) => {
|
|
361
381
|
// F2 — a crash inside main() must not truncate JSONL: emit a machine-parseable summary
|
|
362
382
|
// before exit so CI consumers can distinguish "crashed" from "hung".
|
|
383
|
+
// Argv fallback: `--json` is a boolean flag with no alias in parseArgs config, so a raw
|
|
384
|
+
// string match on process.argv is safe today; if the flag ever gets an alias or
|
|
385
|
+
// `--json=true` form, hoist `jsonMode` to module scope from parseCliArgs instead.
|
|
363
386
|
const isJson = process.argv.includes('--json');
|
|
364
387
|
const message = err?.message ?? String(err);
|
|
365
388
|
if (isJson) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manhquy/flow-skill",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.2",
|
|
4
4
|
"description": "Install the flow skill (buildflow gated build process) into your coding agent(s) via one npx command",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"scripts": {
|
|
24
24
|
"sync": "node scripts/sync.mjs",
|
|
25
25
|
"prepack": "node scripts/sync.mjs",
|
|
26
|
-
"
|
|
26
|
+
"pretest": "node scripts/sync.mjs",
|
|
27
|
+
"test": "node --test --test-concurrency=1 test/installer.test.mjs test/detect.test.mjs test/cli.test.mjs test/lock-atomicity.test.mjs test/sync-manifest.test.mjs",
|
|
27
28
|
"smoke": "node scripts/smoke.mjs"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|