@double-coding/flow2spec-core
Advanced tools
+2
-2
| { | ||
| "name": "@double-coding/flow2spec-core", | ||
| "version": "3.7.1", | ||
| "templateVersion": "3.6.1", | ||
| "version": "3.7.2", | ||
| "templateVersion": "3.6.2", | ||
| "description": "Flow2Spec Core APIs, knowledge engine, project initialization and shared resources", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/double-coding-lab/Flow2Spec#readme", |
@@ -98,3 +98,3 @@ #!/usr/bin/env node | ||
| '', | ||
| '[flow2spec/agent-instruction] You may run `flow2spec update --core`, then `flow2spec init <initialized agents>`. After init, read `.Knowledge/manifest-routing.json`: if projectRev equals pkgRev, delete `.Knowledge/update-check.json`; otherwise continue with f2s-kb-upgrade from step 2c.', | ||
| '[flow2spec/agent-instruction] You may run `flow2spec update --cli` (CLI and its pinned Core update in lockstep), then `flow2spec init <initialized agents>`. After init, read `.Knowledge/manifest-routing.json`: if projectRev equals pkgRev, delete `.Knowledge/update-check.json`; otherwise continue with f2s-kb-upgrade from step 2c.', | ||
| ].join('\n'); | ||
@@ -107,3 +107,3 @@ } | ||
| '', | ||
| '[flow2spec/agent-instruction] You may run `flow2spec update --core`, then one idempotent `flow2spec init <initialized agents>` to refresh the Hook. Do not enter f2s-kb-upgrade when Template Version is unchanged; delete `.Knowledge/update-check.json` afterwards.', | ||
| '[flow2spec/agent-instruction] You may run `flow2spec update --cli` (CLI and its pinned Core update in lockstep), then one idempotent `flow2spec init <initialized agents>` to refresh the Hook. Do not enter f2s-kb-upgrade when Template Version is unchanged; delete `.Knowledge/update-check.json` afterwards.', | ||
| ].join('\n'); | ||
@@ -110,0 +110,0 @@ } |
| { | ||
| "version": "3.6.1", | ||
| "version": "3.6.2", | ||
| "projectRev": 3, | ||
@@ -4,0 +4,0 @@ "knowledgeRoot": ".Knowledge", |
@@ -101,3 +101,3 @@ --- | ||
| 1. Read `flow2spec.config.json` -> if `updateCheck.enabled` is not `true`, skip and show no notice. | ||
| 2. Read `.Knowledge/update-check.json` -> if the file exists and `checkedAt` is on the same local calendar day, do not query npm again. When `coreUpdateAvailable=true`, the agent may run `flow2spec update --core`. If `templateUpdateAvailable=false`, run one idempotent `flow2spec init <initialized agents>` to refresh the Hook, delete the cache, and do not enter `f2s-kb-upgrade`. If `templateUpdateAvailable=true`, update Core, run init, then use `projectRev` / `pkgRev` to choose the fast path or full flow. `.Knowledge/manifest-routing.json.version` is Template Version and must not be compared directly with Core Version. | ||
| 2. Read `.Knowledge/update-check.json` -> if the file exists and `checkedAt` is on the same local calendar day, do not query npm again. When `coreUpdateAvailable=true`, the agent may run `flow2spec update --cli` (CLI and its pinned Core update in lockstep). If `templateUpdateAvailable=false`, run one idempotent `flow2spec init <initialized agents>` to refresh the Hook, delete the cache, and do not enter `f2s-kb-upgrade`. If `templateUpdateAvailable=true`, update first, run init, then use `projectRev` / `pkgRev` to choose the fast path or full flow. `.Knowledge/manifest-routing.json.version` is Template Version and must not be compared directly with Core Version. | ||
| 3. If neither of the two steps above skipped the check: run the update-check script under the current agent configuration root (Claude: `node .claude/hooks/f2s-update-check.js`; Cursor: `node .cursor/hooks/f2s-update-check.js`; Codex: `node .codex/hooks/f2s-update-check.js`) and parse JSON from stdout: | ||
@@ -104,0 +104,0 @@ - If it contains `hookSpecificOutput.additionalContext`: **tell the user** that content and follow its separate Core-only or Template-update instructions. |
@@ -110,9 +110,9 @@ --- | ||
| Record CLI Version, Core Version, Core Range, Template Version, Protocol Version, and the latest npm Core/Template values: | ||
| Record CLI Version, Core Version, Core Pinned, Template Version, Protocol Version, and the latest npm Core/Template values (the CLI pins Core to an exact version; the two packages release in lockstep): | ||
| | Case | Action | Default step 2 command | | ||
| | --- | --- | --- | | ||
| | **A. Template is current** | If only Core changed, run `flow2spec update --core`, then one idempotent init to refresh the Hook. Afterwards **do not stop immediately**: first run the "**project-side alignment check**" below, and only stop this skill (clearing the cache) after it passes. | `flow2spec init <agents...>` | | ||
| | **B. Template changed and latest Core is inside Core Range** | Run `flow2spec update --core`, then continue to step 0. A compatible Core update does not require a CLI release or upgrade. | `flow2spec init <agents...>` | | ||
| | **C. Not installed, unknown, or latest Core is outside the range** | Use an explicit latest CLI/Core combination so npx cannot reuse an old Core. If latest Core still is not compatible, upgrade to a CLI that supports it first. | `npx --yes --package <cli-package>@latest --package <core-package>@latest flow2spec init <agents...>` | | ||
| | **A. Template is current** | If the CLI/Core has an update, run `flow2spec update --cli` (CLI and its pinned Core update together), then one idempotent init to refresh the Hook. Afterwards **do not stop immediately**: first run the "**project-side alignment check**" below, and only stop this skill (clearing the cache) after it passes. | `flow2spec init <agents...>` | | ||
| | **B. Template changed** | Run `flow2spec update --cli` (CLI and its pinned Core arrive together), then continue to step 0. | `flow2spec init <agents...>` | | ||
| | **C. Not installed or unknown** | Use the latest CLI (it carries its pinned Core), avoiding stale npx caches. | `npx --yes <cli-package>@latest init <agents...>` | | ||
@@ -163,4 +163,4 @@ If the preflight fails, case C is allowed as fallback, but never treat Core Version as Template Version. This step does not mandate a sub-agent or a background global install. | ||
| - `flow2spec init <agents...>` | ||
| 2. **Step -1 returned C**: explicitly combine latest CLI/Core so this session gets the latest Core and templates: | ||
| - `npx --yes --package <cli-package>@latest --package <core-package>@latest flow2spec init <agents...>` | ||
| 2. **Step -1 returned C**: use the latest CLI (it carries its pinned Core and templates): | ||
| - `npx --yes <cli-package>@latest init <agents...>` | ||
| 3. For overwrite reset: | ||
@@ -174,3 +174,3 @@ - Append `--reset-knowledge` to the above command. | ||
| > **Helper commands (user self-inspection)**: `flow2spec version` shows the five version dimensions; `flow2spec update --check|--cli|--core` checks updates, updates CLI, or updates a compatible Core. These commands do not replace this skill's full flow after Template Version changes. | ||
| > **Helper commands (user self-inspection)**: `flow2spec version` shows the five version dimensions; `flow2spec update --check` checks updates, and `flow2spec update --cli` performs the lockstep update (CLI plus its pinned Core; `--core` is an equivalent alias). These commands do not replace this skill's full flow after Template Version changes. | ||
@@ -352,3 +352,3 @@ **After step 2 completes**: immediately execute the above **"init and skill self-update"** loop: re-read **`skills/f2s-kb-upgrade/SKILL.md`**. If updated, **rerun from step 2c per the new literal text** (**do not run `init` a second time**; avoid using the old SKILL for subsequent verification). | ||
| 1. **Step -1** was performed: `flow2spec version` and `flow2spec update --check` recorded CLI/Core/Core Range/Template/Protocol; Core-only updates refreshed Core/Hook, while Template updates selected the current CLI or an explicit latest CLI/Core combination through A/B/C; **before stopping on branch A, the "project-side alignment check" was completed** (manifest `version`/`pkgRev` comparison + `kb check --strict`), and when not aligned the skill switched to the full flow instead of stopping. | ||
| 1. **Step -1** was performed: `flow2spec version` and `flow2spec update --check` recorded CLI/Core/Core Pinned/Template/Protocol; when updates existed, `flow2spec update --cli` refreshed the CLI and its pinned Core in lockstep, and Template updates selected the current CLI or the latest CLI through A/B/C; **before stopping on branch A, the "project-side alignment check" was completed** (manifest `version`/`pkgRev` comparison + `kb check --strict`), and when not aligned the skill switched to the full flow instead of stopping. | ||
| 2. **Step 0** was performed: on V1 the skill stopped and told the user how to proceed, and **current repositories (V2+)** entered the `init` flow normally. | ||
@@ -355,0 +355,0 @@ 3. **Before step 2** recorded the project-side `projectRev` (`projectRev`), and **after step 2 `init`** re-read `pkgRev` and executed **step 2c** judgment. |
@@ -98,3 +98,3 @@ #!/usr/bin/env node | ||
| '', | ||
| '[flow2spec/agent-instruction] 可先执行 `flow2spec update --core`,再执行 `flow2spec init <已初始化的 agents>`。init 后读取 `.Knowledge/manifest-routing.json`:projectRev 与 pkgRev 相等则更新完成并删除 `.Knowledge/update-check.json`;不等时再执行 f2s-kb-upgrade(可从步骤 2c 继续)。', | ||
| '[flow2spec/agent-instruction] 可先执行 `flow2spec update --cli`(CLI 与配套 Core 联动更新),再执行 `flow2spec init <已初始化的 agents>`。init 后读取 `.Knowledge/manifest-routing.json`:projectRev 与 pkgRev 相等则更新完成并删除 `.Knowledge/update-check.json`;不等时再执行 f2s-kb-upgrade(可从步骤 2c 继续)。', | ||
| ].join('\n'); | ||
@@ -107,3 +107,3 @@ } | ||
| '', | ||
| '[flow2spec/agent-instruction] 可执行 `flow2spec update --core`,随后执行一次幂等 `flow2spec init <已初始化的 agents>` 刷新 Hook。Template Version 未变化,不进入 f2s-kb-upgrade;完成后删除 `.Knowledge/update-check.json`。', | ||
| '[flow2spec/agent-instruction] 可执行 `flow2spec update --cli`(CLI 与配套 Core 联动更新),随后执行一次幂等 `flow2spec init <已初始化的 agents>` 刷新 Hook。Template Version 未变化,不进入 f2s-kb-upgrade;完成后删除 `.Knowledge/update-check.json`。', | ||
| ].join('\n'); | ||
@@ -110,0 +110,0 @@ } |
| { | ||
| "version": "3.6.1", | ||
| "version": "3.6.2", | ||
| "projectRev": 3, | ||
@@ -4,0 +4,0 @@ "knowledgeRoot": ".Knowledge", |
@@ -101,3 +101,3 @@ --- | ||
| 1. 读 `flow2spec.config.json` → 若 `updateCheck.enabled` 不为 `true`,跳过,不做任何提示。 | ||
| 2. 读 `.Knowledge/update-check.json` → 若文件存在且 `checkedAt` 与今日为同一自然日,不重复查 npm;`coreUpdateAvailable=true` 时可执行 `flow2spec update --core`。若 `templateUpdateAvailable=false`,随后只执行一次幂等 `flow2spec init <已初始化的 agents>` 刷新 Hook,删除缓存,不进入 `f2s-kb-upgrade`;若 `templateUpdateAvailable=true`,更新 Core 后执行 init,再以 `projectRev` / `pkgRev` 判定快速路径或完整流程。`.Knowledge/manifest-routing.json.version` 表示 Template Version,禁止与 Core Version 直接比较。 | ||
| 2. 读 `.Knowledge/update-check.json` → 若文件存在且 `checkedAt` 与今日为同一自然日,不重复查 npm;`coreUpdateAvailable=true` 时可执行 `flow2spec update --cli`(CLI 与配套 Core 联动更新)。若 `templateUpdateAvailable=false`,随后只执行一次幂等 `flow2spec init <已初始化的 agents>` 刷新 Hook,删除缓存,不进入 `f2s-kb-upgrade`;若 `templateUpdateAvailable=true`,更新后执行 init,再以 `projectRev` / `pkgRev` 判定快速路径或完整流程。`.Knowledge/manifest-routing.json.version` 表示 Template Version,禁止与 Core Version 直接比较。 | ||
| 3. 上述两步均未跳过时:执行当前 agent 配置根下的更新检测脚本(Claude:`node .claude/hooks/f2s-update-check.js`;Cursor:`node .cursor/hooks/f2s-update-check.js`;Codex:`node .codex/hooks/f2s-update-check.js`),解析标准输出的 JSON: | ||
@@ -104,0 +104,0 @@ - 若含 `hookSpecificOutput.additionalContext`:**告知用户**该内容,并按其中 agent-instruction 分别处理 Core-only 与 Template 更新。 |
@@ -110,9 +110,9 @@ --- | ||
| 按输出记录 CLI Version、Core Version、Core Range、Template Version、Protocol Version,以及 npm 最新 Core/Template: | ||
| 按输出记录 CLI Version、Core Version、Core Pinned、Template Version、Protocol Version,以及 npm 最新 Core/Template(CLI 对 Core 为精确 pin,两包联动发布): | ||
| | 情况 | 行动 | 步骤 2 默认命令 | | ||
| | --- | --- | --- | | ||
| | **A. Template 已是最新** | 若只有 Core 更新,执行 `flow2spec update --core` 后幂等 init 刷新 Hook;随后**不得直接停止**,必须先做下方「**项目侧对齐检查**」,通过后才删除缓存并停止本技能 | `flow2spec init <agents...>` | | ||
| | **B. Template 有更新且最新 Core 落在当前 Core Range** | 执行 `flow2spec update --core`,继续步骤 0;CLI 无需因 Core 兼容更新而发版或升级 | `flow2spec init <agents...>` | | ||
| | **C. 未安装、版本未知或最新 Core 超出范围** | 使用显式 latest CLI/Core 组合,避免 npx 复用旧 Core;若最新 Core 仍不兼容,先升级支持它的 CLI | `npx --yes --package <cli-package>@latest --package <core-package>@latest flow2spec init <agents...>` | | ||
| | **A. Template 已是最新** | 若 CLI/Core 有更新,执行 `flow2spec update --cli`(CLI 与配套 Core 联动更新)后幂等 init 刷新 Hook;随后**不得直接停止**,必须先做下方「**项目侧对齐检查**」,通过后才删除缓存并停止本技能 | `flow2spec init <agents...>` | | ||
| | **B. Template 有更新** | 执行 `flow2spec update --cli`(CLI 与配套 Core 一起到位),继续步骤 0 | `flow2spec init <agents...>` | | ||
| | **C. 未安装或版本未知** | 使用 latest CLI(自带 pin 的配套 Core),避免 npx 复用旧版缓存 | `npx --yes <cli-package>@latest init <agents...>` | | ||
@@ -163,4 +163,4 @@ 预检失败时允许回退 C,但不得把 Core Version 当作 Template Version。此步骤不强制创建子 agent,也不后台安装全局包。 | ||
| - `flow2spec init <agents...>` | ||
| 2. **步骤 -1 判定为 C**:显式组合 latest CLI/Core,保证本次拿到最新 Core 与模板: | ||
| - `npx --yes --package <cli-package>@latest --package <core-package>@latest flow2spec init <agents...>` | ||
| 2. **步骤 -1 判定为 C**:用 latest CLI(自带 pin 的配套 Core 与模板): | ||
| - `npx --yes <cli-package>@latest init <agents...>` | ||
| 3. 覆盖重置时: | ||
@@ -174,3 +174,3 @@ - 在上述命令末尾追加 `--reset-knowledge` | ||
| > **辅助命令(用户可自查)**:`flow2spec version` 查看五维版本;`flow2spec update --check|--cli|--core` 分别检查、更新 CLI、更新兼容 Core。这些命令不替代 Template Version 变化后的本技能完整流程。 | ||
| > **辅助命令(用户可自查)**:`flow2spec version` 查看五维版本;`flow2spec update --check` 检查更新,`flow2spec update --cli` 整体更新(CLI 与配套 Core 联动,`--core` 为其等价别名)。这些命令不替代 Template Version 变化后的本技能完整流程。 | ||
@@ -352,3 +352,3 @@ **步骤 2 完成后**:立刻执行上文 **「init 与技能自更新」**:重读 **`skills/f2s-kb-upgrade/SKILL.md`**;若有更新则**按新版字面从步骤 2c 起重跑**(**不再次 init**;避免用旧版 SKILL 做后续校验)。 | ||
| 1. 是否已做 **步骤 -1**:执行 `flow2spec version` 与 `flow2spec update --check`,记录 CLI/Core/Core Range/Template/Protocol;Core-only 更新是否直接刷新 Core/Hook,Template 更新是否按 A/B/C 选择当前 CLI 或显式 latest CLI/Core 组合;**A 分支停止前是否完成「项目侧对齐检查」**(manifest `version`/`pkgRev` 对比 + `kb check --strict`),未对齐时是否已转完整流程而非直接停止。 | ||
| 1. 是否已做 **步骤 -1**:执行 `flow2spec version` 与 `flow2spec update --check`,记录 CLI/Core/Core Pinned/Template/Protocol;有更新时是否执行 `flow2spec update --cli` 联动刷新 CLI 与配套 Core,Template 更新是否按 A/B/C 选择当前 CLI 或 latest CLI;**A 分支停止前是否完成「项目侧对齐检查」**(manifest `version`/`pkgRev` 对比 + `kb check --strict`),未对齐时是否已转完整流程而非直接停止。 | ||
| 2. 是否已做 **步骤 0**:V1 已停止执行并告知用户处理方式、**现行库(V2+)** 正常进入 `init` 流程。 | ||
@@ -355,0 +355,0 @@ 3. 是否在 **步骤 2 开始前** 记录了项目侧 `projectRev`(`projectRev`),并在 **步骤 2 的 `init` 之后** 重读 `pkgRev`、执行 **步骤 2c** 判定。 |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
866409
0.01%6167
0.03%