DeepSHPlugins
file-planning 项目预览
GITHUB / COMMUNITY PROJECT

file-planning

Agent 与自动化JavaScriptMIT

磁盘持久化的执行规划插件:以 .trail 目录承载里程碑/步骤状态机、依赖标注、审计事件与复盘纪要,提供 dsh 工具、CLI 与技能三种接口。

0 StarsJohnXu22786 更新时间 2026-08-17
访问 GitHub 仓库
file-planning 项目预览

项目介绍

中文

磁盘持久化的执行规划插件:以 .trail 目录承载里程碑/步骤状态机、依赖标注、审计事件与复盘纪要,提供 dsh 工具、CLI 与技能三种接口。

English

Disk-persisted execution planning for DSH: milestone/step state machines, dependency gating, an audit event stream, and a deterministic completion gate via dsh tools, CLI, or skill.

项目信息与收录信号

快照 2026-09-11
作者 / 组织
JohnXu22786
仓库
JohnXu22786/file-planning
GitHub Stars
0
Forks
0
开发语言
JavaScript
许可证
MIT
最近推送
2026-08-17
Manifest
数据中检测到声明

公开仓库不自动等于可商用;许可证与当前兼容性以原项目文档为准。Manifest 和数据评分不构成安装安全认证。

数据评分

37/ 100
维护活跃
83
文档与实用信息
85
生态关注度
0
安装便捷信号
100
项目声明信号
100

README 含完整安装与使用说明;标准命令一键安装。

评分来自已有数据快照的五维模型,仅作浏览参考,不是实际使用评测或安全检测结论。

安装与使用

所有项目资料与许可均以对应 GitHub 仓库为准。

dsh plugin --profile web add github:JohnXu22786/file-planning

复制命令不会自动执行。请先阅读仓库文档,确认环境要求与许可证。

项目截图

仓库 README

GitHub 原文

已保存的仓库文档快照;文档抓取时间未记录,可能与上方目录介绍处于不同版本。安装前请核对当前仓库说明。

简体中文

trailmap (Trail Map)

A disk-persisted execution-planning plugin: it stores the plan, execution state, field notes, and debrief of multi-step tasks entirely in the workspace .trail/ directory. Interrupted sessions, context compression, or restarting in a new session won't lose your bearings — just read the state and continue after resuming.

  • State-machine driven: steps go todo → in progress → done (cancellable/revivable); steps whose dependencies are unmet are automatically marked "blocked"; milestones and plan status derive from steps, no manual bookkeeping.
  • Plan template generator: generate a milestone skeleton in one shot by task kind (research/development/docs/blank), with step dependencies wired up automatically; still editable at any time after creation.
  • Dependency annotation: steps can declare dependencies; start is gated by dependencies; circular dependencies are detected and blocked.
  • Audit event stream: every advancement is written to an append-only event log; retros reference it automatically and the process stays traceable.
  • Debrief notes: at wrap-up, milestones/steps/cancellations/timeline are summarized automatically; hand-written retro sections persist across runs.
  • Deterministic completion gate: check verifies all steps are closed and the structure is sound, preventing "thought it was done".
  • Three interfaces: dsh tools (10 trailmap_*), a standalone CLI (trail), and a skill (SKILL.md), all sharing one core.

Quick start (CLI, zero dependencies)

node bin/trail.js init "Add regression tests to the toolchain" --kind blank
node bin/trail.js status
node bin/trail.js start m1-1
# …do the work…
node bin/trail.js finish m1-1
node bin/trail.js check        # completion gate (passes once the step is closed)
node bin/trail.js debrief --close   # debrief + archive

(--kind blank keeps a single step so the whole loop runs end to end; --kind build generates the full milestone skeleton — see the command reference and docs/format.md.)

(Or npm link and use the trail command directly; the TRAILMAP_DIR environment variable selects the workspace, defaulting to the current directory.)

Installing in DSH

dsh plugin --profile demo add github:JohnXu22786/file-planning

Integrating with dsh (pluginized harness)

dsh plugin --profile demo add ./file-planning
dsh --profile demo --dump-config   # should show the dsh-plugin-trailmap patch layer
dsh --profile demo

The harness inserts the plugin line via cordis.patch.yml; Cordis injects ctx.tools and registers all tools; the model can then call trailmap_* to create plans, advance, and debrief end to end. The skill lives in skill/trailmap/. See docs/integration.md.

Workspace files

<workspace>/.trail/
├── map.json          # single source of truth (plan + state + audit events)
├── map.md            # rendered view: status lines / next steps / checklists
├── fieldnotes.md     # field notes
├── journal.md        # trip log
├── debrief.md        # debrief notes
├── .active           # active plan pointer (multi-plan)
└── plans/<alias>/    # parallel plans

.trail/ is excluded from version control by default. File format and state machine are documented in docs/format.md.

Command reference

CommandPurpose
trail init <goal> [--kind …] [--name alias]Create a trail (template skeleton + dependency wiring)
trail status [--history] [--json]Status overview
trail start/finish/drop/reopen <stepId>Step state machine (drop requires --reason)
trail amend …Amend the plan structure mid-flight
trail note <text> [--section name]Field notes
trail journal <text>Trip log
trail check [--json]Completion gate (exit code 1 on failure; --json mode always exits 0, rely on the ok field)
trail debrief [--close] / trail closeDebrief (+archive)
trail renderRegenerate the view after hand-editing map.json
trail plans / switch <alias> / switch rootMulti-plan management

Development

node --test          # all unit tests (Node's built-in test runner, zero dependencies)
  • lib/machine.js: pure state machine (transitions/derivation/validation/cycle detection)
  • lib/ops.js: operation layer (shared by the CLI and the dsh adapter)
  • adapter/index.js: dsh tool plugin entry
  • scripts/adapter-smoke.mjs: smoke test against the real @deepseek-ai/dsh-tools.

To run: create a temp directory, npm init -y && npm pkg set type=module, npm i @deepseek-ai/dsh-tools @deepseek-ai/cordis, copy this script to the temp directory root, also copy the lib/ and adapter/ directories over, then run node adapter-smoke.mjs

Directory structure

file-planning/
├── adapter/            # dsh plugin entry (Cordis plugin)
├── lib/                # core library (zero deps): machine/store/render/templates/ops/cli
├── bin/trail.js        # CLI entry
├── skill/trailmap/     # skill (SKILL.md)
├── scripts/            # smoke test scripts
├── test/               # unit tests (node --test)
├── docs/               # integration docs / file format conventions
├── examples/           # example workspaces (fully executed trails)
├── cordis.patch.yml    # bundle patch layer
└── package.json        # bundle manifest (dsh.bundle)

License

MIT, see LICENSE.

使用前核对

安装步骤、兼容版本与授权范围以原项目当前文档为准。Stars 和评分是快照中的导航信号。

安装与排错 · 项目问题反馈

同类项目