
Research
/Security News
Popular npm Packages in the keyv and Cacheable Namespaces Compromised in Active Supply Chain Attack
Popular npm packages keyv and cacheable compromised.
@double-codeing/flow2spec
Advanced tools
在业务仓库初始化「文档驱动、可写回知识库」的 AI 协作骨架:项目根 .Knowledge 承载 stock-docs/req-docs 与机读路由,.cursor/.claude/.codex 写入 f2s-* 规则与技能(含 Karpathy 式编码行为准则,init 同步 rules / Codex topics / skills);init 只落结构与模板,业务内容由各 f2s-* 技能在对话中维护。
Cures the "amnesia" of Cursor / Claude Code — with one
initcommand, AI remembers project context across sessions. No more re-explaining every time.🌐 中文 · EN / 中
🎬 Live Demo (13-slide HTML PPT, ← → to navigate, S for presenter mode)
🔧 Quick start:
npx @double-codeing/flow2spec@latest init
The exact same request, two conversations:
> Update the batch re-scoring of the review template library
Without Flow2Spec:
AI: Which module has this table?
AI: Is batchReScore sync or async?
AI: Is there a lock? What's the idempotency key?
AI: What's the response format? What's the error code?
AI: (Digging through 416 APIs, 796 files, 4.7 MB of source code…)
Repeated introductions · Repeated code searches · Repeated mistakes
With Flow2Spec:
[matcher hit] m-product-review-template-library
[loading deps] 4 topics · ~300 lines
AI: Known — fire-and-forget
Redis lock smp:product-review:template-library:batch-rescore:lock (TTL 10 min)
Max 100 items per batch · error code 101
AI: Starting implementation, 3 files affected.
4.7 MB → 300 lines · Pinpoint accuracy in seconds
① Remembers project context across sessions
.Knowledge/ structured knowledge base: routing manifest (manifest-routing.json) + keyword indices (matchers) + topic shards (topics). AI only loads what's relevant — 4.7 MB of source code compressed to ~300 lines of precise context.
② Routing manifest means AI doesn't dig through your repo Each task hits 1–4 topics, ~300 lines. Business constraints — Redis lock keys, error codes, batch limits — are all in the topics. AI doesn't have to guess from source code.
③ f2s- skills update knowledge as you code*
/f2s-kb-feat writes topics while writing features, /f2s-kb-fix corrects topics while fixing bugs, /f2s-git-commit checks topic coverage before committing. Changing code == updating knowledge. No separate "documentation maintenance."
④ Full pipeline from requirements to code
/f2s-req-clarify asks questions until requirements are unambiguous. /f2s-req-tech generates a ready-to-implement technical proposal into req-docs/. AI implements from the proposal — no relying on verbal agreements.
⑤ Task checklists track progress across sessions
When changeTracking is enabled, skills like f2s-kb-feat / f2s-kb-fix automatically create a task.md with checkboxes. Each step is checked off immediately to disk. New sessions auto-load the remaining checklist — no relying on memory. User-side todos (run SQL, set env vars, click approvals) go into user-todos.md, separate from AI steps.
⑥ Document-driven: PDF / MD straight into the knowledge base
/f2s-kb-add aggregates source files into draft → final → topics. /f2s-doc-final converts any PDF or MD into the canonical final-draft format. External docs and legacy proposals all become routable knowledge.
Minimum viable setup is an empty skeleton.
npx @double-codeing/flow2spec@latest init
1 minute generates the directory structure + routing config. Empty, ready to use. Next requirement hits whichever area → you document that area. No upfront investment needed.
Real data from a production repo running for 3 months:
| Metric | Value |
|---|---|
| Public APIs | 416 |
| Source code | 796 files / 4.7 MB / ~100K lines |
| Flow2Spec per-task load | ≈ 300 lines (99% noise removed) |
npx @double-codeing/flow2spec@latest init
Follow the prompts to completion — generates the .Knowledge/ directory structure and routing config skeleton.
In your Agent tool (Cursor / Claude Code):
/f2s-doc-arch — Scan your project architecture, generate an architecture draft, and follow the flow until topics are createdThis step is done once. You won't need to repeat it for daily development.
/f2s-kb-add <folder path> — Import any feature modules that haven't been added yetDo this selectively before starting development when you notice a module's knowledge is missing from the knowledge base.
Large features:
/f2s-req-clarify one-line description or paste PRD ← clarify requirements
/f2s-req-tech ← generate technical proposal
natural language: implement the proposal above ← AI starts coding (task checklist auto-created when changeTracking is on)
(debug and verify)
/f2s-kb-feat add xxx capability ← if something's missing
/f2s-kb-fix fix xxx ← if there's a bug
/f2s-kb-sync ← sync knowledge base
/f2s-git-commit ← check and commit
Small changes / quick fixes:
/f2s-kb-feat add xxx capability ← missing feature
/f2s-kb-fix fix xxx ← bug fix
| Command | Purpose |
|---|---|
/f2s-req-clarify | Clarify requirements |
/f2s-req-tech | Generate technical proposal |
/f2s-kb-feat | Add a new capability |
/f2s-kb-fix | Fix a bug |
/f2s-kb-sync | Sync knowledge base |
/f2s-git-commit | Commit code; "quick commit" skips KB coverage check |
/f2s-kb-add <path> | Import API module into knowledge base |
For the full command list, see Usage Guide · Commands Reference
MIT. Copyright © 2026 兰涛
FAQs
在业务仓库初始化「文档驱动、可写回知识库」的 AI 协作骨架:项目根 .Knowledge 承载 stock-docs/req-docs 与机读路由,.cursor/.claude/.codex 写入 f2s-* 规则与技能(含 Karpathy 式编码行为准则,init 同步 rules / Codex topics / skills);init 只落结构与模板,业务内容由各 f2s-* 技能在对话中维护。
The npm package @double-codeing/flow2spec receives a total of 144 weekly downloads. As such, @double-codeing/flow2spec popularity was classified as not popular.
We found that @double-codeing/flow2spec demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.

Security News
/Company News
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.