silvermoon 0.2.1 → 0.3.0-rc.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Silvermoon contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <p align="center">
4
4
  <!-- markdownlint-disable-next-line MD013 -->
5
- <img src="https://cdn.jsdelivr.net/gh/shazhou-ww/silvermoon@9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/assets/silvermoon.svg" width="960" alt="Silvermoon, the artifact spirit of the project">
5
+ <img src="https://cdn.jsdelivr.net/gh/shazhou-ww/silvermoon@5e116d1fed423bbd1ebed3ec08f2c0b955823022/assets/silvermoon.svg" width="960" alt="Silvermoon, the artifact spirit of the project">
6
6
  </p>
7
7
 
8
8
  <p align="center">
@@ -11,148 +11,122 @@
11
11
  <!-- markdownlint-disable-next-line MD013 -->
12
12
  <a href="https://npmx.dev/package/silvermoon"><img src="https://img.shields.io/node/v/silvermoon?style=flat-square" alt="Node.js version"></a>
13
13
  <!-- markdownlint-disable-next-line MD013 -->
14
- <a href="https://npmx.dev/package/silvermoon"><img src="https://img.shields.io/npm/unpacked-size/silvermoon?style=flat-square" alt="npm unpacked size"></a>
14
+ <a href="https://npmx.dev/package/silvermoon"><img src="https://img.shields.io/npm/dm/silvermoon?style=flat-square" alt="monthly npm downloads"></a>
15
+ <!-- markdownlint-disable-next-line MD013 -->
16
+ <a href="https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/LICENSE"><img src="https://img.shields.io/github/license/shazhou-ww/silvermoon?style=flat-square" alt="MIT license"></a>
15
17
  <!-- markdownlint-disable-next-line MD013 -->
16
18
  <a href="https://github.com/shazhou-ww/silvermoon/actions/workflows/ci.yml?query=branch%3Amain"><img src="https://img.shields.io/github/actions/workflow/status/shazhou-ww/silvermoon/ci.yml?branch=main&style=flat-square&label=CI" alt="CI status"></a>
17
19
  </p>
18
20
 
19
21
  <p align="center">
20
- English | <a href="https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/README.zh-CN.md">简体中文</a>
22
+ English | <a href="https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/README.zh-CN.md">简体中文</a>
21
23
  </p>
22
24
 
23
25
  # Silvermoon
24
26
 
25
- **The artifact spirit of the project.**
27
+ > Fellow cultivator, you wouldn't want your lifebound project to be without an
28
+ > artifact spirit, would you?
26
29
 
27
30
  ## Quick Start
28
31
 
29
- Silvermoon needs Node.js 22 or newer and Git access to the repository's primary
30
- branch.
32
+ ### Setup
31
33
 
32
- ```sh
33
- npm install --global silvermoon
34
- silvermoon whats-next
35
- silvermoon list-ideas
34
+ Silvermoon requires Node.js 22 or later, along with Git access to the
35
+ repository's primary branch.
36
+
37
+ From the project directory, send this prompt to your coding agent:
38
+
39
+ ```text
40
+ In this project, run:
41
+ `npx silvermoon whats-next --audience agent`
42
+
43
+ Follow its highest-priority instruction and preserve existing work.
44
+ After each observable change, run it again until it reports: `navigation-ready`
45
+ ```
46
+
47
+ ### Talk to Silvermoon
48
+
49
+ Use the Silvermoon skill in your coding agent:
50
+
51
+ ```text
52
+ /silvermoon
53
+ What should I work on next in this project?
36
54
  ```
37
55
 
38
- Silvermoon remains ecosystem-neutral when the repository root has no
39
- `package.json`: non-npm projects do not need a package manager, a Silvermoon
40
- dependency, or `node_modules`. If a root `package.json` exists, it must be valid
41
- JSON and declare `devDependencies.silvermoon` as exactly `^<running-version>`.
42
- The report supplies a package-manager-aware repair command. After installing
43
- that root dependency, register its canonical skill from
44
- `./node_modules/silvermoon/skills`; non-npm projects use the skill bundled with
45
- the running installation. Readiness checks inspect the selected repository
46
- snapshot and do not install dependencies or require `node_modules`.
47
-
48
- Create `.silvermoon/config.yaml`:
49
-
50
- ```yaml
51
- version: 1
52
- primaryRepository: https://github.com/example/repository.git
53
- primaryBranch: main
54
- preferredLanguage: en
56
+ Or continue an idea directly:
57
+
58
+ ```text
59
+ /silvermoon
60
+ Continue working on `<idea-alias>` in this project.
61
+ Follow the `whats-next` guidance.
62
+ Keep going until you need a decision from me.
55
63
  ```
56
64
 
57
- `preferredLanguage` is optional. A specific idea can override it with
58
- `language` in `status.yaml`, and `create-idea --language <tag>` can set that
59
- override when the idea is created. Otherwise Silvermoon checks
60
- `~/.config/silvermoon/config.yaml` and finally defaults to `en-US`.
61
- These stored values choose the language for project-owned content. To change
62
- only one command's built-in output, use `whats-next --language en-US|zh-CN` or
63
- `check --language en-US|zh-CN`; the temporary override is never persisted.
65
+ Or start a new idea:
64
66
 
65
- Use `list-ideas` when you only need the current local inventory. It defaults to
66
- active ideas and supports repeatable `--state`, `--all`, literal `--query`,
67
- RFC 3339 `--created-since` / `--created-before`, `--sort`, and `--limit`.
68
- Unlike lifecycle navigation, this read-only query uses the valid worktree
69
- snapshot without checking branch, upstream, cleanliness, network, or primary
70
- synchronization.
67
+ ```text
68
+ /silvermoon
69
+ I have an idea:
70
+ Add an optional cultivation-style copy mode,
71
+ independent of the selected language.
72
+ ```
71
73
 
72
- Then create an idea and let the registered Silvermoon skill guide one safe
73
- next action at a time:
74
+ Or run Silvermoon straight from a terminal:
74
75
 
75
76
  ```sh
76
- silvermoon create-idea
77
- silvermoon whats-next <idea>
78
- silvermoon whats-next <idea> --language zh-CN
77
+ npx silvermoon whats-next
78
+ npx silvermoon whats-next <ULID-or-alias>
79
+ npx silvermoon create-idea
80
+ npx silvermoon list-ideas
79
81
  ```
80
82
 
81
- Describe the desired world in the generated `Idea.md`, review it, and approve
82
- that exact revision. From then on, Silvermoon keeps the goal, implementation,
83
- repository state, and real-world result connected. See
84
- [Getting Started](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/getting-started.md) for the complete first workflow.
85
- Every command processes one ordered, versioned domain-message stream. Add
86
- `--json` when a programmatic consumer needs its four deterministic projections:
87
- `intention`, `observation`, `actions`, and `response`. Actions are side effects
88
- already attempted; future work belongs only to `response.nextSteps`. Default
89
- Markdown renders only the self-contained response instead of exposing the
90
- internal projections. For pre-commit validation, run
91
- `silvermoon check --staged`: unlike the default `check` (committed `HEAD`), it
92
- checks the index and exits `0` only when the project snapshot is valid. See the
93
- [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/reference.md) for validation targets and exit
94
- codes.
95
-
96
- Add `--trace <file.trace.jsonl>` to any command to write one schema-versioned
97
- JSONL timeline. Its `domain` channel contains allowlisted message summaries,
98
- and its `telemetry` channel contains paired performance spans; both share one
99
- trace ID and global sequence. Trace output never includes guidance or file
100
- content, Git arguments/output, environment data, or credentials. If the
101
- argument does not end with the exact lowercase `.trace.jsonl` suffix,
102
- Silvermoon appends it. Repository-local `*.trace.jsonl` files are ignored.
103
- Trace files are buffered, created only after command work completes, and never
104
- overwrite an existing file.
105
-
106
- Projects may optionally add `.silvermoon/guidance/preparing.md`,
107
- `implementing.md`, and `deploying.md`. Silvermoon returns only the current
108
- actionable phase's snapshot-bound, repository-owned Markdown in
109
- `response.guidance`; `observation.guidance` carries its provenance without
110
- content. `create-idea` can return preparing guidance. This guidance is
111
- additive, never a fourth contract or decision fact, and `check` validates the
112
- complete fixed directory. See [Core Concepts](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/core-concepts.md).
83
+ > **Note:** We recommend `npx silvermoon` over a global install. It avoids
84
+ > maintaining a separate global version; in Node.js projects, the lockfile keeps
85
+ > the project-installed version consistent.
86
+
87
+ For workflows, see [Operating Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/docs/operations.md); for command
88
+ details, see the [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/docs/reference.md).
113
89
 
114
90
  ## Why Silvermoon
115
91
 
116
- Long-running Agent work usually asks people to carry too much invisible state.
117
- Someone must remember what was intended, whether the code still matches the
118
- task, and which conversation or machine knows the latest truth. Silvermoon
119
- makes those concerns part of the project instead.
92
+ Long-running Agent work tends to make people carry too much invisible state.
93
+ Someone has to remember what was originally intended, whether the code still
94
+ matches the task, and which conversation or machine holds the latest truth.
95
+ Silvermoon moves those concerns into the project itself.
120
96
 
121
- It lets people step back from continuous supervision and return at the
122
- decisions that belong to them: approving the intended outcome, accepting the
123
- implementation, and accepting that the result is true in the outside world.
124
- Between those boundaries, an Agent can inspect repository facts and continue
125
- the highest-priority safe action.
97
+ It lets people step away from continuous supervision and return only for the
98
+ decisions that are theirs: approving the intended outcome, accepting the
99
+ implementation, and accepting that the result holds in the outside world.
100
+ Between those boundaries, an Agent can inspect repository facts and carry on
101
+ with the highest-priority safe action.
126
102
 
127
- It also refuses to let a detached task card declare success. Current artifacts
128
- and explicit decisions jointly determine state, so a changed goal or
129
- implementation naturally invalidates conclusions that depended on the older
130
- revision. Because those facts live in Git, work can continue across devices,
131
- sessions, Agents, and hosting platforms.
103
+ It also refuses to let a detached task card declare success. State is derived
104
+ jointly from current artifacts and explicit decisions, so once a goal or an
105
+ implementation changes, conclusions that rested on the older revision are
106
+ invalidated as a matter of course. And because those facts live in Git, work
107
+ continues across devices, sessions, Agents, and hosting platforms.
132
108
 
133
109
  ## The Project's Artifact Spirit
134
110
 
135
- > Fellow Daoist, you wouldn't want your lifebound project to be without an
136
- > artifact spirit, would you?
137
-
138
111
  <table>
139
112
  <tr>
140
113
  <td width="160" align="center" valign="top">
141
114
  <!-- markdownlint-disable-next-line MD013 -->
142
- <img src="https://cdn.jsdelivr.net/gh/shazhou-ww/silvermoon@9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/assets/silvermoon-avatar.svg" width="128" alt="Line portrait of Silvermoon, the project's artifact spirit">
115
+ <img src="https://cdn.jsdelivr.net/gh/shazhou-ww/silvermoon@5e116d1fed423bbd1ebed3ec08f2c0b955823022/assets/silvermoon-mascot.png" width="160" alt="Full-body portrait of Silvermoon, the project's artifact spirit">
143
116
  </td>
144
117
  <td valign="top">
145
118
  Silvermoon is named after a character in <em>A Record of a Mortal's
146
119
  Journey to Immortality</em>. She comes from the Silvermoon Wolf Clan in
147
- the Spirit Realm and is one of the split souls of Ling Long. After losing
148
- part of her memory in the human realm, she lives as an artifact spirit
149
- first in a wolf-headed jade scepter and later in Han Li's Bamboo
150
- Cloudswarm Swords.
120
+ the Spirit Realm, and is one of the two souls split from Ling Long.
121
+ Adrift in the human realm, she became the artifact spirit of a
122
+ wolf-headed jade scepter — and in that long service lost part of her
123
+ memory, taking the name Silvermoon. She later became the artifact spirit
124
+ of Han Li's Bamboo Cloudswarm Swords.
151
125
  <br><br>
152
- That image fits this project: Silvermoon does not belong to one operator
153
- or one chat. It lives with the project's artifacts, understands their
154
- state, and helps each companion find what comes next. The biography is
155
- inspiration, not a prerequisite for using the tool.
126
+ That image suits this project: Silvermoon belongs to no single operator
127
+ and no single chat. It lives alongside the project's artifacts,
128
+ understands their state, and helps every companion see what comes next.
129
+ The backstory is inspiration, not a prerequisite for using the tool.
156
130
  </td>
157
131
  </tr>
158
132
  </table>
@@ -164,36 +138,56 @@ Watch *A Record of a Mortal's Journey to Immortality*:
164
138
  <!-- markdownlint-disable-next-line MD013 -->
165
139
  - Bilibili: [Episode 150: Overseas Turmoil 26](https://www.bilibili.com/bangumi/play/ep1231558 "A Record of a Mortal's Journey to Immortality — Episode 150: Overseas Turmoil 26")
166
140
 
167
- ## From Ideal To Real
141
+ ## From Ideal to Real
168
142
 
169
143
  A project is more than a task list or a transcript. It is an ideal becoming
170
- real through three nested worlds.
144
+ real across three nested worlds.
171
145
 
172
- **Ideal World (道心)** names the outcome worth pursuing. **Inner World (内景)**
173
- gives that intent shape in repository artifacts. **Outer World (现世)** asks
174
- whether the shaped work is true where it must actually operate.
146
+ **Ideal World (道心)** is the world of ideals, **Inner World (内景)** the
147
+ subjective world, and **Outer World (现世)** the world of reality.
175
148
 
176
- > 道心立意,内景成形,现世验真。
149
+ > 道心立志,内景化形,现世求真。
177
150
 
178
- The worlds nest from the inside out. Implementation contains the ideal it
179
- serves, and deployment contains both. This is an engineering relationship, not
180
- just a metaphor: when an inner world changes, conclusions from an outer world
181
- no longer have the same foundation and must be proven again.
151
+ The worlds nest from the inside out: the subjective world contains the ideal it
152
+ serves, and is itself part of the real world — just as a person holds ideals yet
153
+ must live in reality.
154
+
155
+ So the ideal is first argued out in the Ideal World, then given form in the
156
+ Inner World, and finally deployed into the Outer World. That is consciousness
157
+ acting back upon matter.
182
158
 
183
159
  Humans own approval and acceptance. Agents own continuation: they read the
184
- contracts, the ledger, and Git facts; preserve concurrent work; execute one
185
- safe action; and reobserve only after something changes. The context belongs to
186
- the project, not to a fleeting conversation.
160
+ contracts, the ledger, and the facts in Git; preserve concurrent work; carry
161
+ out one safe action; and re-observe only once something has changed. Context
162
+ belongs to the project, not to a fleeting conversation.
187
163
 
188
164
  ## Further Reading
189
165
 
190
- - [Getting Started](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/getting-started.md) — installation, configuration,
166
+ - [Getting Started](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/docs/getting-started.md) — installation, configuration,
191
167
  and the first idea.
192
- - [Core Concepts](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/core-concepts.md) — project ownership, the three
168
+ - [Core Concepts](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/docs/core-concepts.md) — project ownership, the three
193
169
  worlds, revisions, and decision boundaries.
194
- - [Operating Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/operations.md) — navigation, creation,
170
+ - [Operating Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/docs/operations.md) — navigation, creation,
195
171
  publication, hygiene, and continuation.
196
- - [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/reference.md) — storage, derived state, CLI
172
+ - [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/docs/reference.md) — storage, derived state, CLI
197
173
  reports, validation targets, and schemas.
198
- - [Maintaining Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/maintaining.md) — development checks,
174
+ - [Maintaining Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/docs/maintaining.md) — development checks,
199
175
  documentation ownership, and release guidance.
176
+
177
+ ## Community
178
+
179
+ - [Contributing](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/CONTRIBUTING.md)
180
+ - [Code of Conduct](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/CODE_OF_CONDUCT.md)
181
+ - [Security Policy](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/SECURITY.md)
182
+ - [Support](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/SUPPORT.md)
183
+ - [Changelog](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/CHANGELOG.md)
184
+ - [MIT License](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/LICENSE)
185
+
186
+ ## Image Copyright Disclaimer
187
+
188
+ The Silvermoon character images in this project are AI-generated derivative
189
+ works based on the animated adaptation of *A Record of a Mortal's Journey to
190
+ Immortality*. Rights in the original character and animation belong to their
191
+ respective holders, and these images fall outside this project's
192
+ [MIT License](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/LICENSE). If any rights holder believes an image infringes
193
+ their rights, please contact the author and the image will be replaced.
package/README.zh-CN.md CHANGED
@@ -2,122 +2,105 @@
2
2
 
3
3
  <p align="center">
4
4
  <!-- markdownlint-disable-next-line MD013 -->
5
- <img src="https://cdn.jsdelivr.net/gh/shazhou-ww/silvermoon@9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/assets/silvermoon.svg" width="960" alt="Silvermoon,项目的器灵">
5
+ <img src="https://cdn.jsdelivr.net/gh/shazhou-ww/silvermoon@5e116d1fed423bbd1ebed3ec08f2c0b955823022/assets/silvermoon.svg" width="960" alt="Silvermoon,项目的器灵">
6
6
  </p>
7
7
 
8
8
  <p align="center">
9
- <a href="https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/README.md">English</a> | 简体中文
9
+ <a href="https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/README.md">English</a> | 简体中文
10
10
  </p>
11
11
 
12
12
  # Silvermoon(银月)
13
13
 
14
- **项目的器灵。**
14
+ > 道友也不想自己的本命项目没有器灵吧?
15
15
 
16
16
  ## 快速开始
17
17
 
18
- Silvermoon 需要 Node.js 22 或更高版本,并且能够通过 Git 访问仓库的 primary branch。
18
+ ### Setup
19
19
 
20
- ```sh
21
- npm install --global silvermoon
22
- silvermoon whats-next
23
- silvermoon list-ideas
20
+ Silvermoon 需要 Node.js 22 或更高版本,并且能通过 Git 访问仓库的 primary branch。
21
+
22
+ 在项目目录下,把这段提示词发给你的 coding agent:
23
+
24
+ ```text
25
+ 请在本项目中运行:
26
+ `npx silvermoon whats-next --audience agent`
27
+
28
+ 遵循最高优先级指示并保留已有工作。
29
+ 每次产生可观察变更后重新运行,直到报告显示:
30
+ `navigation-ready`
24
31
  ```
25
32
 
26
- Silvermoon 对非 npm 仓库保持生态中立:当仓库根目录没有 `package.json` 时,无需
27
- package manager、Silvermoon dependency 或 `node_modules`。如果根目录存在
28
- `package.json`,它必须是有效 JSON,并在 `devDependencies.silvermoon` 中逐字声明
29
- `^<当前运行版本>`。首次报告会按项目 package manager 提供修复命令。安装根依赖后,
30
- 从 `./node_modules/silvermoon/skills` 注册 canonical skill;非 npm 项目继续使用当前
31
- 运行实例随附的 skill。整备检查只读取所选 repository snapshot,不会安装依赖,也不要求
32
- 存在 `node_modules`。
33
-
34
- 创建 `.silvermoon/config.yaml`:
35
-
36
- ```yaml
37
- version: 1
38
- primaryRepository: https://github.com/example/repository.git
39
- primaryBranch: main
40
- preferredLanguage: zh-CN
33
+ ### Talk to Silvermoon
34
+
35
+ 在 coding agent 中使用 Silvermoon skill:
36
+
37
+ ```text
38
+ /silvermoon
39
+ 这个项目接下来应该做什么?
41
40
  ```
42
41
 
43
- `preferredLanguage` 可省略。具体 idea 可以通过 `status.yaml` 的 `language`
44
- 覆盖它,创建时也可以使用 `create-idea --language <tag>` 设置该值。否则 Silvermoon 会继续
45
- 读取 `~/.config/silvermoon/config.yaml`,最后稳定回退到 `en-US`。
46
- 这些持久化值决定项目内容所用语言。若只需改变单次命令的内置输出语言,可使用
47
- `whats-next --language en-US|zh-CN` 或 `check --language en-US|zh-CN`;该临时覆盖
48
- 不会写入任何配置或 idea。
42
+ 或者直接继续推进一个 idea:
49
43
 
50
- 只想查看当前本地 inventory 时使用 `list-ideas`。它默认返回 active ideas,并支持
51
- 可重复的 `--state`、`--all`、literal `--query`、RFC 3339
52
- `--created-since` / `--created-before`、`--sort` 和 `--limit`。与 lifecycle
53
- 导航不同,这个只读查询使用有效的 worktree snapshot,不检查 branch、upstream、
54
- cleanliness、网络或 primary 同步。
44
+ ```text
45
+ /silvermoon
46
+ 请继续推进这个项目中的 `<idea-alias>`。
47
+ 遵循 `whats-next` 的指引持续工作。
48
+ 直到需要我做决定时再停下来。
49
+ ```
55
50
 
56
- 然后创建一个 idea,让已注册的 Silvermoon skill 每次引导一个安全的下一步行动:
51
+ 或者提出一个新想法:
52
+
53
+ ```text
54
+ /silvermoon
55
+ 我有个想法:
56
+ 增加一个独立于语言选择的修仙风格文案开关。
57
+ ```
58
+
59
+ 也可以直接在终端运行 Silvermoon:
57
60
 
58
61
  ```sh
59
- silvermoon create-idea
60
- silvermoon whats-next <idea>
61
- silvermoon whats-next <idea> --language zh-CN
62
+ npx silvermoon whats-next
63
+ npx silvermoon whats-next <ULID-or-alias>
64
+ npx silvermoon create-idea
65
+ npx silvermoon list-ideas
62
66
  ```
63
67
 
64
- 在生成的 `Idea.md` 中描述想要抵达的世界,审阅并批准这个精确 revision。此后,
65
- Silvermoon 会让目标、实现、仓库状态与现实结果始终相连。完整的首次工作流见英文
66
- [Getting Started](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/getting-started.md)。
67
- 每个命令都处理一条有序且带版本的 domain-message stream。程序消费者可使用
68
- `--json` 获取四个确定性 projection:`intention`、`observation`、`actions` 与
69
- `response`。`actions` 只记录已经尝试的副作用,未来工作只位于
70
- `response.nextSteps`。默认 Markdown 只渲染自足的 response,不暴露内部
71
- projection。提交前使用 `silvermoon check --staged` 验证 index;无参数 `check`
72
- 只验证已提交的 `HEAD`,不能替代提交前检查。只有项目快照有效时检查才以退出码
73
- `0` 放行,详见英文 [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/reference.md)。
74
-
75
- 任何命令都可以添加 `--trace <file.trace.jsonl>`,写出一条 schema-versioned
76
- JSONL timeline。`domain` channel 保存经过 allowlist 的 message 摘要,
77
- `telemetry` channel 保存成对 performance span;两者共享同一个 trace ID 和全局
78
- sequence。Trace 不记录 guidance/文件正文、Git 参数或输出、环境数据或
79
- credential。参数若没有以精确的小写 `.trace.jsonl` 结尾,Silvermoon 会自动追加;
80
- repository 内的 `*.trace.jsonl` 会被忽略。trace 文件采用缓冲写入,只在命令工作
81
- 完成后创建,并且绝不覆盖已有文件。
82
-
83
- 项目可按需添加 `.silvermoon/guidance/preparing.md`、`implementing.md` 与
84
- `deploying.md`。Silvermoon 只会在 `response.guidance` 中返回当前可行动阶段里
85
- 与 snapshot 绑定的 repository-owned Markdown;`observation.guidance` 仅保留
86
- provenance。`create-idea` 可返回 preparing guidance。这些 guidance 只能追加
87
- 约束,不是第四份 contract 或 decision fact;`check` 会验证完整的固定目录。详见英文
88
- [Core Concepts](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/core-concepts.md)。
68
+ > **备注**:建议使用 `npx silvermoon`,而不是全局安装。这样无需单独维护全局版本;
69
+ > 在 Node.js 项目中,lock file 会固定项目使用的版本。
70
+
71
+ 工作流见 [Operating Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/docs/operations.md),
72
+ 命令详情见 [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/docs/reference.md)。
89
73
 
90
74
  ## 为什么需要 Silvermoon
91
75
 
92
- 长期运行的 Agent 工作往往让人背负太多不可见状态:有人必须记住原本想做什么、代码是否
93
- 仍与任务一致,以及最新事实究竟留在哪次对话或哪台机器上。Silvermoon 把这些问题变成
94
- 项目自身的一部分。
76
+ 长期运行的 Agent 工作,往往让人背负太多看不见的状态:总得有人记住最初想做什么、
77
+ 代码是否仍与任务一致,以及最新的事实究竟留在哪次对话、哪台机器上。
78
+ Silvermoon 把这些变成项目自身的一部分。
95
79
 
96
- 它让人不必持续看守,只在真正属于人的决策点回来:批准目标、验收实现,以及确认结果在
97
- 现世成立。在这些边界之间,Agent 可以检查仓库事实,并继续最高优先级的安全行动。
80
+ 它让人不必时刻盯守,只在真正属于人的决策点回来:批准目标、验收实现,
81
+ 以及确认结果在现世成立。在这些边界之间,Agent 可以查阅仓库事实,
82
+ 推进优先级最高的安全行动。
98
83
 
99
- 它也不允许一张脱离代码的任务卡自行宣告成功。当前产物与明确决定共同派生状态,因此目标
100
- 或实现一旦改变,依赖旧 revision 的结论自然失效。事实保存在 Git 中,工作便能跨设备、
101
- 跨 session、跨 Agent、跨托管平台延续。
84
+ 它也不允许一张脱离代码的任务卡自行宣告成功。状态由当前产物与明确决定共同派生,
85
+ 因此目标或实现一旦改变,依赖旧 revision 的结论自然失效。
86
+ 这些事实存在 Git 里,工作便能跨设备、跨 session、跨 Agent、跨托管平台延续下去。
102
87
 
103
88
  ## 项目的器灵
104
89
 
105
- > 道友也不想自己的本命项目没有器灵吧?
106
-
107
90
  <table>
108
91
  <tr>
109
92
  <td width="160" align="center" valign="top">
110
93
  <!-- markdownlint-disable-next-line MD013 -->
111
- <img src="https://cdn.jsdelivr.net/gh/shazhou-ww/silvermoon@9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/assets/silvermoon-avatar.svg" width="128" alt="项目器灵银月的线稿头像">
94
+ <img src="https://cdn.jsdelivr.net/gh/shazhou-ww/silvermoon@5e116d1fed423bbd1ebed3ec08f2c0b955823022/assets/silvermoon-mascot.png" width="160" alt="项目器灵银月的全身立绘">
112
95
  </td>
113
96
  <td valign="top">
114
- Silvermoon 得名于《凡人修仙传》中的银月。她来自灵界的银月狼族,是玲珑公主分裂出的
115
- 两道元神之一。她在人界失去部分记忆后成为器灵,先后寄居于狼首玉如意和韩立的
116
- 青竹蜂云剑。
97
+ Silvermoon 得名于《凡人修仙传》中的银月。
98
+ 她是灵界银月狼族玲珑公主分裂出的两道元神之一;流落人界后成为狼首玉如意的器灵,
99
+ 又在漫长的岁月里失去部分记忆,从此自称银月,后来才成为韩立青竹蜂云剑的器灵。
117
100
  <br><br>
118
- 这个意象与项目相合:Silvermoon 不属于某位操作者或某次对话。它与项目产物共存,
119
- 理解它们的状态,并帮助每位同行者判断下一步。人物小传只是灵感来源,不是使用工具的
120
- 知识门槛。
101
+ 这个意象与本项目相合:Silvermoon 不属于某位操作者,也不属于某次对话。
102
+ 它与项目产物共存,理解它们的状态,并帮每位同行者看清下一步。
103
+ 人物小传只是灵感来源,不是使用这道工具的门槛。
121
104
  </td>
122
105
  </tr>
123
106
  </table>
@@ -131,25 +114,43 @@ provenance。`create-idea` 可返回 preparing guidance。这些 guidance 只能
131
114
 
132
115
  ## 从理想到现实
133
116
 
134
- 项目不只是一张任务列表,也不是一份对话记录。它是理想经过三个嵌套世界逐渐进入现实的
135
- 过程。
117
+ 项目不只是一张任务列表,也不是一份对话记录。
118
+ 它是理想穿过三个嵌套世界、逐渐落进现实的过程。
119
+
120
+ **Ideal World(道心)**——理想世界,**Inner World(内景)**——主体世界,
121
+ **Outer World(现世)**——现实世界。
136
122
 
137
- **Ideal World(道心)**确定值得追求的结果,**Inner World(内景)**让意图在仓库产物中
138
- 成形,**Outer World(现世)**则验证这些产物在真正需要运行的地方是否成立。
123
+ > 道心立志,内景化形,现世求真。
139
124
 
140
- > 道心立意,内景成形,现世验真。
125
+ 三个世界由内向外层层包含:主体世界包含它所服务的理想世界,又是现实世界的一部分。
126
+ 正如人会有理想,却又必须活在现实之中。
141
127
 
142
- 三个世界由内向外层层包含:实现包含它所服务的理想,部署又包含二者。这不只是比喻,也是
143
- 工程关系。内层变化时,外层旧结论便失去原有依据,必须重新证明。
128
+ 先在理想世界里把理想讨论清楚,再在主体世界中让它成形,
129
+ 最后部署到现实世界去——这正是意识反作用于物质的过程。
144
130
 
145
- 人负责 approval 与 acceptance,Agent 负责 continuation:读取 contract、ledger 与 Git
146
- 事实,保留并发工作,执行一个安全行动,并只在发生变化后重新观察。上下文属于项目,而不
147
- 属于转瞬即逝的某次对话。
131
+ 人负责 approval 与 acceptance,Agent 负责 continuation:
132
+ 读取 contract、ledger 与 Git 事实,保留并发工作,执行一个安全行动,
133
+ 并且只在发生变化之后重新观察。上下文属于项目,而不属于某次转瞬即逝的对话。
148
134
 
149
135
  ## 延伸阅读
150
136
 
151
- - [Getting Started](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/getting-started.md) — 安装、配置与第一个 idea。
152
- - [Core Concepts](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/core-concepts.md) — 项目归属、三重世界、revision 与决策边界。
153
- - [Operating Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/operations.md) — 导航、创建、发布、仓库卫生与持续推进。
154
- - [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/reference.md) — 存储、派生状态、CLI report、验证 target 与 schema。
155
- - [Maintaining Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/9f6b61b1dfb05a0fb1e5c3eb77ad0a16105ffd0c/docs/maintaining.md) — 开发检查、文档职责与发布指南。
137
+ - [Getting Started](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/docs/getting-started.md) — 安装、配置与第一个 idea。
138
+ - [Core Concepts](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/docs/core-concepts.md) — 项目归属、三重世界、revision 与决策边界。
139
+ - [Operating Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/docs/operations.md) — 导航、创建、发布、仓库卫生与持续推进。
140
+ - [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/docs/reference.md) — 存储、派生状态、CLI report、验证 target 与 schema。
141
+ - [Maintaining Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/docs/maintaining.md) — 开发检查、文档职责与发布指南。
142
+
143
+ ## 社区
144
+
145
+ - [贡献指南](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/CONTRIBUTING.md)
146
+ - [行为准则](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/CODE_OF_CONDUCT.md)
147
+ - [安全策略](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/SECURITY.md)
148
+ - [支持说明](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/SUPPORT.md)
149
+ - [变更记录](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/CHANGELOG.md)
150
+ - [MIT License](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/LICENSE)
151
+
152
+ ## 图片版权声明
153
+
154
+ 本项目使用的银月(Silvermoon)形象,均为基于《凡人修仙传》动画二次生成的 AI 图片。
155
+ 原角色与动画的相关权利归各自版权方所有,这些图片不在本项目 [MIT License](https://github.com/shazhou-ww/silvermoon/blob/5e116d1fed423bbd1ebed3ec08f2c0b955823022/LICENSE) 的授权范围内。
156
+ 若版权方认为其中任何图片构成侵权,请联系作者,作者会替换相关图片。
package/bin/silvermoon.js CHANGED
@@ -1,5 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { runCli } from "../src/cli.js";
3
+ const bootstrapStartedAt = process.hrtime.bigint();
4
+ const { runCli } = await import("../src/cli.js");
4
5
 
5
- process.exitCode = await runCli(process.argv.slice(2));
6
+ process.exitCode = await runCli(
7
+ process.argv.slice(2),
8
+ console,
9
+ { bootstrapStartedAt },
10
+ );