@manhquy/flow-skill 0.4.0 → 0.5.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/CHANGELOG.md +10 -0
- package/README.md +110 -91
- package/README_VN.md +114 -74
- package/package.json +1 -1
- package/skills/flow/SKILL.md +14 -8
- package/skills/flow/_templates/card.md +3 -0
- package/skills/flow/eval/fixtures/f05a/flow/05-contract.md +22 -0
- package/skills/flow/eval/fixtures/f05b/flow/05-contract.md +11 -0
- package/skills/flow/eval/manifest.tsv +2 -0
- package/skills/flow/references/attestations.md +307 -0
- package/skills/flow/references/auto-run.md +7 -2
- package/skills/flow/references/command-dispatch.md +3 -1
- package/skills/flow/references/concierge.md +1 -0
- package/skills/flow/references/debt-and-halts.md +2 -0
- package/skills/flow/references/ground-truth-gates.md +3 -0
- package/skills/flow/runner/attestations.sh +1365 -0
- package/skills/flow/runner/flow.sh +222 -16
- package/skills-manifest.json +6 -2
- package/src/help.mjs +13 -15
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
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.5.0] — 2026-08-11 — ships skill v0.28.0 (attested execution)
|
|
6
|
+
|
|
7
|
+
Installer minor: bundles skill **v0.28.0** (risk + attestation receipts + auto trust plane).
|
|
8
|
+
Installer CLI contract unchanged. Prerelease dist-tag policy: **`next`**.
|
|
9
|
+
|
|
10
|
+
## [0.4.1] — 2026-08-11 — README + CLI help install UX
|
|
11
|
+
|
|
12
|
+
Docs-only installer release (same skill **v0.27.0**). Professional install section, full
|
|
13
|
+
standard-command recipes, `@latest`-only help EXAMPLES, dual-version accuracy.
|
|
14
|
+
|
|
5
15
|
## [0.4.0] — 2026-08-11 — ships skill v0.27.0 (harness authority continuity)
|
|
6
16
|
|
|
7
17
|
Skill-content release. Ships skill product **v0.27.0**: flow-owned durable authority,
|
package/README.md
CHANGED
|
@@ -1,148 +1,167 @@
|
|
|
1
1
|
# @manhquy/flow-skill
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Install the **flow** skill into coding agents with one command.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
| | |
|
|
6
|
+
|---|---|
|
|
7
|
+
| **Package** | [`@manhquy/flow-skill`](https://www.npmjs.com/package/@manhquy/flow-skill) (installer CLI) |
|
|
8
|
+
| **Current GA** | **0.5.0** — ships skill product **v0.28.0** |
|
|
9
|
+
| **Platforms** | macOS · Linux · Windows (same Node path) |
|
|
10
|
+
| **Requirement** | Node.js **≥ 22.14** |
|
|
11
|
+
| **Source** | [github.com/manhquydev/flow-skill](https://github.com/manhquydev/flow-skill) |
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
flow is a gated build harness (`/flow`): idea → honest gates → real done-evidence. This package only **installs** that skill into agent skill homes.
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Standard install
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Recommended — always pin the dist-tag so npx does not reuse a stale cache entry
|
|
14
21
|
npx @manhquy/flow-skill@latest
|
|
15
22
|
```
|
|
16
23
|
|
|
17
|
-
|
|
24
|
+
| Step | Detail |
|
|
25
|
+
|------|--------|
|
|
26
|
+
| 1 | Fetches **`latest`** from the npm registry |
|
|
27
|
+
| 2 | Interactive multi-select of detected agents (Claude is always offered) |
|
|
28
|
+
| 3 | Copies `skills/flow` into each selected destination |
|
|
29
|
+
| 4 | Prints what to type after reload (`/flow`, `$flow`, …) |
|
|
18
30
|
|
|
19
|
-
|
|
20
|
-
> re-run a stale cached copy; `@latest` forces npx to fetch the newest GA release. See
|
|
21
|
-
> [SECURITY.md](./SECURITY.md).
|
|
22
|
-
>
|
|
23
|
-
> **`npm i` alone is not enough.** `npm install @manhquy/flow-skill` only adds the installer
|
|
24
|
-
> package to `node_modules`. You must **run** it (`npx @manhquy/flow-skill@latest` or
|
|
25
|
-
> `npx flow-skill` after install) to copy the skill into agent homes.
|
|
26
|
-
>
|
|
27
|
-
> **Two version axes:** package `version` in this folder is the **installer** (e.g. `0.4.0`).
|
|
28
|
-
> Skill product version lives in `skills/flow/SKILL.md` (`metadata.version`, e.g. `0.27.0`).
|
|
29
|
-
> `--help` and the JSONL `plan` event expose both (`version` + `skillVersion`).
|
|
31
|
+
**After install:** restart or reload the agent, then invoke flow (see [After install](#after-install)).
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
### Confirm versions
|
|
32
34
|
|
|
35
|
+
```bash
|
|
36
|
+
npx @manhquy/flow-skill@latest --help
|
|
37
|
+
# expect: flow-skill v0.5.x (ships skill v0.27.x)
|
|
33
38
|
```
|
|
34
|
-
|
|
39
|
+
|
|
40
|
+
### Common commands
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Non-interactive (Claude + detected agents)
|
|
35
44
|
npx @manhquy/flow-skill@latest --yes
|
|
36
45
|
|
|
37
|
-
#
|
|
46
|
+
# One or more targets
|
|
47
|
+
npx @manhquy/flow-skill@latest --yes --target claude
|
|
38
48
|
npx @manhquy/flow-skill@latest --yes -t claude -t codex
|
|
39
|
-
npx @manhquy/flow-skill@latest --yes -t claude,codex
|
|
49
|
+
npx @manhquy/flow-skill@latest --yes -t claude,codex
|
|
40
50
|
|
|
41
|
-
#
|
|
51
|
+
# Every supported target
|
|
42
52
|
npx @manhquy/flow-skill@latest --yes --all
|
|
43
53
|
|
|
44
|
-
#
|
|
54
|
+
# Claude skill inside a project repo (commit-friendly)
|
|
45
55
|
npx @manhquy/flow-skill@latest --yes --project --dir .
|
|
46
56
|
|
|
47
|
-
#
|
|
57
|
+
# Plan only (no disk writes) + JSONL for CI
|
|
48
58
|
npx @manhquy/flow-skill@latest --yes --all --dry-run --json
|
|
49
59
|
```
|
|
50
60
|
|
|
51
|
-
|
|
61
|
+
### Options
|
|
52
62
|
|
|
53
|
-
|
|
|
54
|
-
|
|
55
|
-
| `
|
|
56
|
-
|
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
|
|
|
63
|
+
| Flag | Meaning |
|
|
64
|
+
|------|---------|
|
|
65
|
+
| `-y`, `--yes` | Skip prompts; install default selection (detected + Claude) |
|
|
66
|
+
| `-t`, `--target <name>` | Target (repeatable or comma-separated) |
|
|
67
|
+
| `--all` | All targets, even if not detected |
|
|
68
|
+
| `--project` | Project scope — Claude only → `<dir>/.claude/skills/flow` |
|
|
69
|
+
| `--dir <path>` | Project directory (implies `--project`; default: cwd) |
|
|
70
|
+
| `--json` | JSONL events (`plan`, `install:*`, `summary`) |
|
|
71
|
+
| `--dry-run` | Print plan; do not write |
|
|
72
|
+
| `-h`, `--help` | Help |
|
|
60
73
|
|
|
61
|
-
|
|
74
|
+
### Targets
|
|
62
75
|
|
|
63
|
-
|
|
76
|
+
| Name | Destination | Detection |
|
|
77
|
+
|------|-------------|-----------|
|
|
78
|
+
| `claude` | `~/.claude/skills/flow` | `~/.claude` (always offered) |
|
|
79
|
+
| `codex` | `~/.codex/skills/flow` | `~/.codex/skills` |
|
|
80
|
+
| `agents` | `~/.agents/skills/flow` | `~/.agents/skills` |
|
|
81
|
+
| `antigravity` | `~/.gemini/antigravity-cli/skills/flow` **and** `~/.gemini/config/skills/flow` | either path |
|
|
82
|
+
| `cursor` | `~/.cursor/skills/flow` | `~/.cursor/skills` |
|
|
64
83
|
|
|
65
|
-
|
|
66
|
-
line tells you exactly what to do for whichever targets you installed:
|
|
84
|
+
`--project` supports **only** `claude`. Other targets with `--project` exit `2`.
|
|
67
85
|
|
|
68
|
-
|
|
69
|
-
- Codex CLI: type `$flow` (restart Codex once to load a new skill).
|
|
70
|
-
- Antigravity: restart/reload the IDE (or restart `agy`) to load the new skill, then type `/flow`.
|
|
71
|
-
- Agents home (`~/.agents/skills/`): restart/reload your tool if it does not auto-detect new skills.
|
|
72
|
-
- Cursor: **install verified, live runner execution not yet independently confirmed** — Cursor
|
|
73
|
-
has no headless CLI probe available for automated verification (unlike Antigravity's `agy -p`
|
|
74
|
-
or Codex's `codex exec`); restart/reload Cursor after install and check the Agent panel for
|
|
75
|
-
the `flow` skill.
|
|
76
|
-
- Diagnostics: run `/flow doctor` from your agent.
|
|
86
|
+
### Rules
|
|
77
87
|
|
|
78
|
-
|
|
88
|
+
| Do | Don’t |
|
|
89
|
+
|----|--------|
|
|
90
|
+
| `npx @manhquy/flow-skill@latest` | Bare `npx @manhquy/flow-skill` (stale npx cache) |
|
|
91
|
+
| **Run** the CLI to copy the skill | `npm i` alone (package only; no skill files in agent homes) |
|
|
92
|
+
| Pin installer `@0.5.0` if needed | Pin npm `@0.28.0` (skill version ≠ package version) |
|
|
93
|
+
| Prefer `@latest` | `@rc` (retired / behind) |
|
|
79
94
|
|
|
80
|
-
|
|
95
|
+
**Two version axes:** `package.json` version = installer; `SKILL.md` metadata = skill product. Both appear in `--help` and in the `plan` JSONL event (`version` + `skillVersion`).
|
|
81
96
|
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## After install
|
|
100
|
+
|
|
101
|
+
| Agent | Next step |
|
|
102
|
+
|-------|-----------|
|
|
103
|
+
| Claude Code | Type `/flow` |
|
|
104
|
+
| Codex CLI | Restart Codex once → `$flow` |
|
|
105
|
+
| Antigravity | Restart IDE / `agy` → `/flow` |
|
|
106
|
+
| Agents home | Reload the tool if it does not auto-pick new skills |
|
|
107
|
+
| Cursor | Reload Cursor; confirm `flow` in the agent skills panel |
|
|
108
|
+
| Any | `/flow doctor` (or run `runner/flow.sh doctor`) |
|
|
109
|
+
|
|
110
|
+
### Verify on disk (Claude global)
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
grep -E '^\s*version:' ~/.claude/skills/flow/SKILL.md | head -1
|
|
114
|
+
bash ~/.claude/skills/flow/runner/flow.sh doctor
|
|
82
115
|
```
|
|
83
|
-
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Uninstall
|
|
120
|
+
|
|
121
|
+
```bash
|
|
84
122
|
rm -rf ~/.claude/skills/flow
|
|
85
123
|
rm -rf ~/.codex/skills/flow
|
|
86
124
|
rm -rf ~/.agents/skills/flow
|
|
125
|
+
rm -rf ~/.cursor/skills/flow
|
|
87
126
|
rm -rf ~/.gemini/antigravity-cli/skills/flow
|
|
88
127
|
rm -rf ~/.gemini/config/skills/flow
|
|
89
|
-
|
|
90
|
-
# Project scope (only Claude)
|
|
128
|
+
# project scope:
|
|
91
129
|
rm -rf <project>/.claude/skills/flow
|
|
92
130
|
```
|
|
93
131
|
|
|
132
|
+
---
|
|
133
|
+
|
|
94
134
|
## Troubleshooting
|
|
95
135
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
136
|
+
| Symptom | Fix |
|
|
137
|
+
|---------|-----|
|
|
138
|
+
| Agent has no `/flow` after `npm i` | Run `npx @manhquy/flow-skill@latest` (install must **execute**) |
|
|
139
|
+
| Old skill after reinstall | Always use `@latest`; avoid bare package name |
|
|
140
|
+
| `No matching version found` for `@0.28.0` | That is the **skill** version. Use `@latest` or `@0.5.x` |
|
|
141
|
+
| Node too old | Install Node ≥ 22.14 (`nvm install 22`, etc.) |
|
|
142
|
+
| Windows `EBUSY` / `EPERM` | Close the agent holding files under the skill dir; re-run |
|
|
143
|
+
| Stale install lock | Delete `<parent>/.flow-skill.installing.lock` if reclaim fails |
|
|
101
144
|
|
|
102
|
-
|
|
145
|
+
---
|
|
103
146
|
|
|
104
|
-
`--json`
|
|
147
|
+
## JSONL (`--json`)
|
|
105
148
|
|
|
106
149
|
```jsonl
|
|
107
|
-
{"event":"plan","version":"0.
|
|
150
|
+
{"event":"plan","version":"0.5.0","skillVersion":"0.28.0","dryRun":false,"scope":"global","targets":["claude"]}
|
|
108
151
|
{"event":"install:start","target":"claude","dests":["~/.claude/skills/flow"]}
|
|
109
152
|
{"event":"install:done","target":"claude","dests":["~/.claude/skills/flow"],"result":"success","error":null,"warnings":[]}
|
|
110
|
-
{"event":"summary","success":true,"total":
|
|
153
|
+
{"event":"summary","success":true,"total":1,"attempted":1,"installed":1,"failed":0,"skipped":0,"aborted":false}
|
|
111
154
|
```
|
|
112
155
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
### Event contract
|
|
116
|
-
|
|
117
|
-
| Event | Required fields | Notes |
|
|
118
|
-
|---|---|---|
|
|
119
|
-
| `plan` | `version` (string), `dryRun` (bool), `scope` (`global`\|`project`), `targets` (string[]), optional `skillVersion` (string\|null) | Always the first event. `version` = npm package; `skillVersion` = bundled `SKILL.md` product version. |
|
|
120
|
-
| `install:start` | `target` (string), `dests` (string[]) | One per selected target. |
|
|
121
|
-
| `install:done` | `target`, `dests`, `result` (`success`\|`failed`), `error` (string\|null), `warnings` (string[]) | Fired after each target. `error` is `null` on success. |
|
|
122
|
-
| `summary` | `success` (bool), `total`, `attempted`, `installed`, `failed`, `skipped`, `aborted` (bool) | Always the last event. Counts sum: `attempted = installed + failed`; `skipped = total - attempted`. |
|
|
123
|
-
| `error` | `message` (string), `exitCode` (int) | Emitted only when the process crashes before completing a normal flow (e.g. missing bundled skill). Then exits with `exitCode`. |
|
|
124
|
-
|
|
125
|
-
Exit codes: `0` success · `1` at least one target failed · `2` invalid usage (bad target name, `--project` with a non-Claude target, missing bundled skill) · `130` `SIGINT` (Ctrl+C).
|
|
156
|
+
Exit codes: `0` success · `1` target failure · `2` bad usage · `130` SIGINT.
|
|
126
157
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
## Requirements
|
|
130
|
-
|
|
131
|
-
- Node.js **>= 22.14.0** — Node 20 reached end-of-life in April 2026, and the publish workflow requires npm >=11.5.1 (bundled with Node 22.14+) for OIDC Trusted Publisher support
|
|
132
|
-
|
|
133
|
-
## Provenance
|
|
134
|
-
|
|
135
|
-
Every version published from the CI workflow carries an [npm provenance](https://docs.npmjs.com/generating-provenance-statements) attestation (SLSA Build Level 2). Verify with:
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
npm view @manhquy/flow-skill@<version> dist.attestations.provenance
|
|
139
|
-
```
|
|
158
|
+
Contract is additive: new optional fields may appear; existing fields are stable.
|
|
140
159
|
|
|
141
|
-
|
|
160
|
+
---
|
|
142
161
|
|
|
143
|
-
##
|
|
162
|
+
## Provenance & security
|
|
144
163
|
|
|
145
|
-
|
|
164
|
+
Published builds from CI include [npm provenance](https://docs.npmjs.com/generating-provenance-statements). Threat model and reporting: [SECURITY.md](./SECURITY.md).
|
|
146
165
|
|
|
147
166
|
## License
|
|
148
167
|
|
package/README_VN.md
CHANGED
|
@@ -1,127 +1,167 @@
|
|
|
1
1
|
# @manhquy/flow-skill
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Cài skill **flow** vào coding agent bằng một lệnh.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
| | |
|
|
6
|
+
|---|---|
|
|
7
|
+
| **Package** | [`@manhquy/flow-skill`](https://www.npmjs.com/package/@manhquy/flow-skill) (installer CLI) |
|
|
8
|
+
| **GA hiện tại** | **0.4.1** — ships skill product **v0.27.0** |
|
|
9
|
+
| **Nền tảng** | macOS · Linux · Windows (cùng code path Node) |
|
|
10
|
+
| **Yêu cầu** | Node.js **≥ 22.14** |
|
|
11
|
+
| **Source** | [github.com/manhquydev/flow-skill](https://github.com/manhquydev/flow-skill) |
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
flow là harness build có cổng (`/flow`): ý tưởng → cổng trung thực → bằng chứng done thật. Package này chỉ **cài** skill đó vào skill home của agent.
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Lệnh chuẩn
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Khuyến nghị — luôn gắn @latest để npx không dùng cache cũ
|
|
14
21
|
npx @manhquy/flow-skill@latest
|
|
15
22
|
```
|
|
16
23
|
|
|
17
|
-
|
|
24
|
+
| Bước | Chi tiết |
|
|
25
|
+
|------|----------|
|
|
26
|
+
| 1 | Tải dist-tag **`latest`** từ npm registry |
|
|
27
|
+
| 2 | Multi-select tương tác các agent detect được (Claude luôn được đề xuất) |
|
|
28
|
+
| 3 | Copy cây `skills/flow` vào từng đích đã chọn |
|
|
29
|
+
| 4 | In hướng dẫn sau reload (`/flow`, `$flow`, …) |
|
|
18
30
|
|
|
19
|
-
|
|
20
|
-
> bản cache cũ; `@latest` ép lấy GA mới nhất. Kênh `rc` đã retire — không dùng `@rc`.
|
|
21
|
-
>
|
|
22
|
-
> **`npm i` alone chưa đủ** — phải **chạy** CLI. Hai trục version: package npm vs skill product
|
|
23
|
-
> (`ships skill v…` / `skillVersion` trong JSONL). Xem [SECURITY.md](./SECURITY.md).
|
|
31
|
+
**Sau cài:** restart hoặc reload agent (xem [Sau khi cài](#sau-khi-cài)).
|
|
24
32
|
|
|
25
|
-
|
|
33
|
+
### Xác nhận version
|
|
26
34
|
|
|
35
|
+
```bash
|
|
36
|
+
npx @manhquy/flow-skill@latest --help
|
|
37
|
+
# expect: flow-skill v0.4.x (ships skill v0.27.x)
|
|
27
38
|
```
|
|
28
|
-
|
|
39
|
+
|
|
40
|
+
### Lệnh hay dùng
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Không prompt (Claude + agent đã detect)
|
|
29
44
|
npx @manhquy/flow-skill@latest --yes
|
|
30
45
|
|
|
31
|
-
#
|
|
46
|
+
# Một hoặc nhiều target
|
|
47
|
+
npx @manhquy/flow-skill@latest --yes --target claude
|
|
32
48
|
npx @manhquy/flow-skill@latest --yes -t claude -t codex
|
|
33
|
-
npx @manhquy/flow-skill@latest --yes -t claude,codex
|
|
49
|
+
npx @manhquy/flow-skill@latest --yes -t claude,codex
|
|
34
50
|
|
|
35
|
-
#
|
|
51
|
+
# Mọi target được hỗ trợ
|
|
36
52
|
npx @manhquy/flow-skill@latest --yes --all
|
|
37
53
|
|
|
38
|
-
#
|
|
54
|
+
# Skill Claude trong repo (dễ commit)
|
|
39
55
|
npx @manhquy/flow-skill@latest --yes --project --dir .
|
|
40
56
|
|
|
41
|
-
# JSONL
|
|
57
|
+
# Chỉ xem kế hoạch, không ghi đĩa + JSONL (CI)
|
|
42
58
|
npx @manhquy/flow-skill@latest --yes --all --dry-run --json
|
|
43
59
|
```
|
|
44
60
|
|
|
45
|
-
|
|
61
|
+
### Tùy chọn
|
|
46
62
|
|
|
47
|
-
|
|
|
48
|
-
|
|
49
|
-
| `
|
|
50
|
-
|
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
|
|
|
63
|
+
| Flag | Ý nghĩa |
|
|
64
|
+
|------|---------|
|
|
65
|
+
| `-y`, `--yes` | Bỏ prompt; cài selection mặc định (detected + Claude) |
|
|
66
|
+
| `-t`, `--target <name>` | Target (lặp được hoặc comma-separated) |
|
|
67
|
+
| `--all` | Mọi target, kể cả chưa detect |
|
|
68
|
+
| `--project` | Scope project — chỉ Claude → `<dir>/.claude/skills/flow` |
|
|
69
|
+
| `--dir <path>` | Thư mục project (kéo theo `--project`; mặc định: cwd) |
|
|
70
|
+
| `--json` | JSONL events (`plan`, `install:*`, `summary`) |
|
|
71
|
+
| `--dry-run` | In plan; không ghi đĩa |
|
|
72
|
+
| `-h`, `--help` | Help |
|
|
54
73
|
|
|
55
|
-
|
|
74
|
+
### Targets
|
|
56
75
|
|
|
57
|
-
|
|
76
|
+
| Tên | Đích | Detection |
|
|
77
|
+
|-----|------|-----------|
|
|
78
|
+
| `claude` | `~/.claude/skills/flow` | `~/.claude` (luôn được đề xuất) |
|
|
79
|
+
| `codex` | `~/.codex/skills/flow` | `~/.codex/skills` |
|
|
80
|
+
| `agents` | `~/.agents/skills/flow` | `~/.agents/skills` |
|
|
81
|
+
| `antigravity` | `~/.gemini/antigravity-cli/skills/flow` **và** `~/.gemini/config/skills/flow` | một trong hai path |
|
|
82
|
+
| `cursor` | `~/.cursor/skills/flow` | `~/.cursor/skills` |
|
|
58
83
|
|
|
59
|
-
|
|
60
|
-
installer nói rõ việc cần làm cho đúng target đã cài:
|
|
84
|
+
`--project` **chỉ** hỗ trợ `claude`. Kết hợp target khác → exit `2`.
|
|
61
85
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
86
|
+
### Quy tắc
|
|
87
|
+
|
|
88
|
+
| Nên | Không |
|
|
89
|
+
|-----|--------|
|
|
90
|
+
| `npx @manhquy/flow-skill@latest` | Bare `npx @manhquy/flow-skill` (cache npx có thể cũ) |
|
|
91
|
+
| **Chạy** CLI để copy skill | Chỉ `npm i` (chỉ thêm package; không cài skill vào agent home) |
|
|
92
|
+
| Pin installer `@0.4.1` nếu cần cố định | Pin npm `@0.27.0` (version **skill** ≠ version package) |
|
|
93
|
+
| Ưu tiên `@latest` / `@0.4.x` | `@rc` (đã retire / tụt hậu) |
|
|
94
|
+
|
|
95
|
+
**Hai trục version:** `package.json` = installer CLI; `SKILL.md` metadata = skill product. Cả hai hiện trong `--help` và event JSONL `plan` (`version` + `skillVersion`).
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Sau khi cài
|
|
70
100
|
|
|
71
|
-
|
|
101
|
+
| Agent | Bước tiếp |
|
|
102
|
+
|-------|-----------|
|
|
103
|
+
| Claude Code | Gõ `/flow` |
|
|
104
|
+
| Codex CLI | Restart Codex một lần → `$flow` |
|
|
105
|
+
| Antigravity | Restart IDE / `agy` → `/flow` |
|
|
106
|
+
| Agents home | Reload tool nếu không tự nhận skill mới |
|
|
107
|
+
| Cursor | Reload Cursor; kiểm panel agent skills |
|
|
108
|
+
| Bất kỳ | `/flow doctor` (hoặc `runner/flow.sh doctor`) |
|
|
72
109
|
|
|
73
|
-
|
|
110
|
+
### Kiểm tra trên đĩa (Claude global)
|
|
74
111
|
|
|
112
|
+
```bash
|
|
113
|
+
grep -E '^\s*version:' ~/.claude/skills/flow/SKILL.md | head -1
|
|
114
|
+
bash ~/.claude/skills/flow/runner/flow.sh doctor
|
|
75
115
|
```
|
|
76
|
-
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Gỡ cài
|
|
120
|
+
|
|
121
|
+
```bash
|
|
77
122
|
rm -rf ~/.claude/skills/flow
|
|
78
123
|
rm -rf ~/.codex/skills/flow
|
|
79
124
|
rm -rf ~/.agents/skills/flow
|
|
125
|
+
rm -rf ~/.cursor/skills/flow
|
|
80
126
|
rm -rf ~/.gemini/antigravity-cli/skills/flow
|
|
81
127
|
rm -rf ~/.gemini/config/skills/flow
|
|
82
|
-
|
|
83
|
-
# Project scope (chỉ Claude)
|
|
128
|
+
# project scope:
|
|
84
129
|
rm -rf <project>/.claude/skills/flow
|
|
85
130
|
```
|
|
86
131
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
`--json` stream một JSON object mỗi dòng. Xem [README.md § JSONL contract](./README.md#jsonl-contract) cho bảng đầy đủ event/field/exit code. Tóm tắt:
|
|
132
|
+
---
|
|
90
133
|
|
|
91
|
-
|
|
92
|
-
- `install:start` / `install:done` — một cặp mỗi target; `install:done.result` = `success` hoặc `failed`.
|
|
93
|
-
- `summary` — event cuối cùng; `success`, `total`, `attempted`, `installed`, `failed`, `skipped`, `aborted`.
|
|
94
|
-
- Exit codes: `0` OK · `1` ≥1 target fail · `2` sai flag/target · `130` Ctrl+C.
|
|
134
|
+
## Xử lý sự cố
|
|
95
135
|
|
|
96
|
-
|
|
136
|
+
| Hiện tượng | Cách xử lý |
|
|
137
|
+
|------------|------------|
|
|
138
|
+
| Agent không có `/flow` sau `npm i` | Chạy `npx @manhquy/flow-skill@latest` (phải **execute** installer) |
|
|
139
|
+
| Skill cũ sau khi “cài lại” | Luôn dùng `@latest`; tránh bare package name |
|
|
140
|
+
| `No matching version found` với `@0.27.0` | Đó là version **skill**. Dùng `@latest` hoặc `@0.4.x` |
|
|
141
|
+
| Node quá cũ | Cài Node ≥ 22.14 (`nvm install 22`, v.v.) |
|
|
142
|
+
| Windows `EBUSY` / `EPERM` | Đóng agent đang giữ file trong skill dir; chạy lại |
|
|
143
|
+
| Stale install lock | Xóa `<parent>/.flow-skill.installing.lock` nếu reclaim thất bại |
|
|
97
144
|
|
|
98
|
-
|
|
145
|
+
---
|
|
99
146
|
|
|
100
|
-
|
|
101
|
-
- **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`.
|
|
102
|
-
- **`No matching version found` với `@0.24.0`**: đó là version **skill product**, không phải version npm package. Cài installer theo version của nó (bare / `@0.1.x` / `@rc`) — version skill in ra ở `--help` (`ships skill v…`).
|
|
103
|
-
- **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+).
|
|
147
|
+
## JSONL (`--json`)
|
|
104
148
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
149
|
+
```jsonl
|
|
150
|
+
{"event":"plan","version":"0.4.1","skillVersion":"0.27.0","dryRun":false,"scope":"global","targets":["claude"]}
|
|
151
|
+
{"event":"install:start","target":"claude","dests":["~/.claude/skills/flow"]}
|
|
152
|
+
{"event":"install:done","target":"claude","dests":["~/.claude/skills/flow"],"result":"success","error":null,"warnings":[]}
|
|
153
|
+
{"event":"summary","success":true,"total":1,"attempted":1,"installed":1,"failed":0,"skipped":0,"aborted":false}
|
|
154
|
+
```
|
|
110
155
|
|
|
111
|
-
|
|
156
|
+
Exit codes: `0` success · `1` target failure · `2` bad usage · `130` SIGINT.
|
|
112
157
|
|
|
113
|
-
|
|
114
|
-
npm view @manhquy/flow-skill@<version> dist.attestations.provenance
|
|
115
|
-
```
|
|
158
|
+
Contract additive: field mới có thể xuất hiện; field hiện có không đổi tên/xóa.
|
|
116
159
|
|
|
117
|
-
|
|
118
|
-
> Trusted Publisher (TP không thể bind tới package chưa tồn tại) — bản này không có provenance.
|
|
119
|
-
> Từ `v0.1.0-rc.2` trở đi, mọi bản publish đều qua CI workflow với OIDC và có attestation
|
|
120
|
-
> SLSA Build Level 2 đầy đủ.
|
|
160
|
+
---
|
|
121
161
|
|
|
122
|
-
##
|
|
162
|
+
## Provenance & bảo mật
|
|
123
163
|
|
|
124
|
-
|
|
164
|
+
Bản publish từ CI có [npm provenance](https://docs.npmjs.com/generating-provenance-statements). Mô hình đe dọa và báo cáo: [SECURITY.md](./SECURITY.md).
|
|
125
165
|
|
|
126
166
|
## License
|
|
127
167
|
|
package/package.json
CHANGED
package/skills/flow/SKILL.md
CHANGED
|
@@ -3,12 +3,12 @@ name: flow
|
|
|
3
3
|
description: Run the buildflow gated build process from idea to real done-evidence. Walk gated stages (Idea->Research->Scope->PRD->ADR->Contract->Cards->Build->Review->Deploy/Ship->Verify->Retro), each with a honest gate that must pass before advancing. Adapts to project type (web|cli|library|skill). Use when starting or driving a real product build, when the user types /flow, /flow next, /flow card, /flow check, or asks to scope/plan/ship a project through gates. Kill at any gate is a valid outcome.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
when_to_use: "User wants to build a real product end-to-end with discipline (idea -> a deployed URL for web, or installs+runs for a CLI/library/skill), or types any /flow command, or asks for a gated build process, scope decision, contract-first plan, or card-based shipping."
|
|
6
|
-
argument-hint: "[ resume | next | card | check C-NNN | project-type web|cli|library|skill | mode teach|work | skip <stage> | ready | workspace add|list|enter|remove|check|doctor | auto | doctor | retro | eval --stage 01|02|card|routing --fixture <id> --n 3 --keep-going --report | or just say what you want in plain language ]"
|
|
6
|
+
argument-hint: "[ resume | next | card | check C-NNN | project-type web|cli|library|skill | mode teach|work | skip <stage> | ready | workspace add|list|enter|remove|check|doctor | auto [stop] | attest semantic|live-verify|status|recover | doctor | retro | eval --stage 01|02|05|card|routing --fixture <id> --n 3 --keep-going --report | or just say what you want in plain language ]"
|
|
7
7
|
keywords: [flow, buildflow, gate, build, ship, scope, prd, contract, card, deploy, vertical-slice, cli, library, skill, worktree, parallel-agents, workspace, multi-agent]
|
|
8
8
|
license: MIT
|
|
9
9
|
metadata:
|
|
10
10
|
author: flow-skill
|
|
11
|
-
version: "0.
|
|
11
|
+
version: "0.28.0"
|
|
12
12
|
attribution: "Methodology from ai20k-build-phase/buildflow (Tony, arealisticdreamer.com); durable-layer ancestry and improve-ritual spirit from repository-harness (protocol v1 EOL — flow-owned fork); agent patterns from claudekit-engineer, BMAD-METHOD. v0.22 concierge from BMAD bmad-help; forge-idea from bmad-forge-idea (MIT, BMad Code LLC)."
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -94,7 +94,8 @@ takes over a lock you're sure is dead; `/flow unlock` clears it.
|
|
|
94
94
|
| `/flow mode teach\|work` | set who writes the artifacts (default `teach`) |
|
|
95
95
|
| `/flow ready` | `flow.sh ready` — which todo cards are buildable + parallel-safety hint |
|
|
96
96
|
| `/flow workspace add\|list\|enter\|remove\|check\|doctor` | `flow.sh workspace …` — **multi-agent worktree isolation** for running several agents (Claude/Codex/Antigravity, many terminals) in parallel WITHOUT the "one agent switches branch → every terminal flips" trap. Each agent gets its own `git worktree` (own HEAD/index/files, shared object store); git is the live registry (`git worktree list`) and a 10-field JSONL side-file (`.flow/workspaces.jsonl`) adds vendor/card/port/task. `add <branch> [--card C-NNN] [--vendor …] [--task …] [--copy-env]` provisions a worktree + distinct port-offset + paste-ready cd/env block; `list` shows who-is-where; `enter <branch>` re-prints a crashed terminal's env; `check <branch> [--card]` flags branch-claim + allowed-files overlap before you launch; `remove <branch> [--force]` tears down safely (never auto-forces); `doctor` reconciles orphan trees/records. Advisory layer; git's refusal to check out one branch twice is the real lock. |
|
|
97
|
-
| `/flow auto` | `flow.sh auto` preflight
|
|
97
|
+
| `/flow auto` | `flow.sh auto` — attested preflight (risk + Stage 05 receipt) activates shared auto policy; then drive the autonomous run (see AUTO principles). `auto stop` clears it. |
|
|
98
|
+
| `/flow attest …` | `flow.sh attest semantic\|live-verify\|status\|recover` — mint/inspect fingerprint-bound receipts (`references/attestations.md`) |
|
|
98
99
|
| `/flow recall` | `flow.sh recall` — read back durable memory (open debt, recent retro, previous-card scope, harness friction/backlog, playbooks) **at the start of a stage/card** so you don't re-learn known pain |
|
|
99
100
|
| `/flow usage` | `flow.sh usage` — roll up the mechanical usage log (JSONL flight-recorder of every invocation) into `usage_event` and print build analytics: cycle-time, gate fail-rate, per-stage dwell, cycle completion, command breakdown. `--global` for the device-wide view; `--prune [--keep N]` caps the log (crash-safe). Local-only; disable with `FLOW_LOG_DISABLE=1`/`DO_NOT_TRACK=1`. `recall` now surfaces a one-line usage digest and `retro`'s `propose` flags chronically-failing stages. |
|
|
100
101
|
| `/flow contract` | `flow.sh contract` — flag client base-URL vs served-path prefix drift (web; advisory; run after the contract gate) |
|
|
@@ -189,11 +190,16 @@ deliver the card set as one summary. Gates bind the same as `teach`.
|
|
|
189
190
|
|
|
190
191
|
## AUTO principles
|
|
191
192
|
|
|
192
|
-
`/flow auto` drives the build phase autonomously (`references/auto-run.md`)
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
193
|
+
`/flow auto` drives the build phase autonomously (`references/auto-run.md`) under the
|
|
194
|
+
**attested-execution** trust control plane (`references/attestations.md`). Mechanical
|
|
195
|
+
preflight persists auto policy only when every card has classified risk (security-class
|
|
196
|
+
needs a distinct-author DEBT ack) and Stage 05 has a current `semantic_gate` receipt.
|
|
197
|
+
While auto is active, `check` / `card done` / ready deps / merged worktree remove require
|
|
198
|
+
fingerprint-bound semantic and live receipts; `auto stop` returns to warning-only manual
|
|
199
|
+
mode. Operator setting: **Tier-A auto-merge green cards; halt at security-class.** Per
|
|
200
|
+
card: tier-classify → scoped subagent in its own worktree → build → adversarial review →
|
|
201
|
+
owner-backed semantic receipt → `flow.sh check` PASS → merge → deploy → live_verify
|
|
202
|
+
receipt → world-state evidence → `card done` → durable trace + `AUTO-LOG.md`.
|
|
197
203
|
- **Tier A**: green + no security-class → auto-merge, no ask.
|
|
198
204
|
- **Tier B**: fixable issues → one repair by a FRESH subagent (two-strikes), else escalate.
|
|
199
205
|
If the fix needs >1 experimental attempt against a single numeric target (not a review
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
status: todo
|
|
4
4
|
deps: [FILL: card ids this depends on, e.g. "C-001, C-002" — or "none"]
|
|
5
5
|
implements: [FILL: PRD feature ids this card delivers, e.g. "FR1, FR2" — or "infra"/"none" for non-feature cards]
|
|
6
|
+
risk: unknown
|
|
7
|
+
risk-reason:
|
|
8
|
+
risk-ack: none
|
|
6
9
|
|
|
7
10
|
## Scope
|
|
8
11
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# 05 — Contract
|
|
2
|
+
|
|
3
|
+
## Interfaces
|
|
4
|
+
|
|
5
|
+
| Method | Path | Request | Response | Errors | Owner |
|
|
6
|
+
|---|---|---|---|---|---|
|
|
7
|
+
| GET | /healthz | none | `{ "ok": true }` | 503 if deps down | platform |
|
|
8
|
+
|
|
9
|
+
## Auth
|
|
10
|
+
|
|
11
|
+
- Public: `/healthz` only.
|
|
12
|
+
- All other routes: bearer session token; 401 if missing/invalid.
|
|
13
|
+
|
|
14
|
+
## Error model
|
|
15
|
+
|
|
16
|
+
- `code` (string), `message` (string), `request_id` (string).
|
|
17
|
+
- 4xx client; 5xx server; no silent 200 on failure.
|
|
18
|
+
|
|
19
|
+
## Gate
|
|
20
|
+
- [x] Every endpoint has method, path, request, response, errors, owner.
|
|
21
|
+
- [x] Auth boundary is explicit for each route class.
|
|
22
|
+
- [x] Error shape is machine-readable and stable.
|