silvermoon 0.2.2 → 0.3.0-rc.2
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 +21 -0
- package/README.md +115 -121
- package/README.zh-CN.md +96 -95
- package/bin/silvermoon.js +7 -2
- package/docs/getting-started.md +21 -9
- package/docs/maintaining.md +83 -6
- package/docs/npm-package-releases.md +33 -4
- package/docs/operations.md +11 -7
- package/docs/reference.md +131 -32
- package/docs/repository-tasks.md +43 -15
- package/package.json +46 -8
- package/skills/silvermoon/SKILL.md +224 -123
- package/src/adoption.js +30 -16
- package/src/cli.js +148 -39
- package/src/config.js +76 -16
- package/src/create-idea.js +22 -10
- package/src/git-snapshot.js +212 -0
- package/src/git.js +209 -18
- package/src/guidance.js +65 -23
- package/src/idea-layout.js +59 -23
- package/src/idea-metadata.js +48 -0
- package/src/idea-templates.js +133 -0
- package/src/index.js +64 -53
- package/src/language.js +4 -0
- package/src/list-ideas.js +118 -55
- package/src/observation.js +9 -1
- package/src/repository.js +2 -8
- package/src/response.js +93 -95
- package/src/subprocess.js +27 -0
- package/src/trace.js +37 -2
- package/src/tui-table.js +71 -0
- package/src/tui.js +205 -0
- package/src/whatsnext.js +71 -18
- package/assets/silvermoon-avatar.svg +0 -395
- package/assets/silvermoon.svg +0 -176
- package/docs/assets/silvermoon-avatar.svg +0 -395
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@
|
|
5
|
+
<img src="https://cdn.jsdelivr.net/gh/shazhou-ww/silvermoon@84860fea52d1af6cdf4968b403f337844779cb21/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/
|
|
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/84860fea52d1af6cdf4968b403f337844779cb21/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/
|
|
22
|
+
English | <a href="https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/README.zh-CN.md">简体中文</a>
|
|
21
23
|
</p>
|
|
22
24
|
|
|
23
25
|
# Silvermoon
|
|
24
26
|
|
|
25
|
-
|
|
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
|
-
|
|
30
|
-
branch.
|
|
32
|
+
### Setup
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
73
|
-
next action at a time:
|
|
74
|
+
Or run Silvermoon straight from a terminal:
|
|
74
75
|
|
|
75
76
|
```sh
|
|
76
|
-
silvermoon
|
|
77
|
-
silvermoon whats-next <
|
|
78
|
-
silvermoon
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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/ace5dfb36e775f8a2628ee81aa87a04ef1e154b5/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/ace5dfb36e775f8a2628ee81aa87a04ef1e154b5/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/84860fea52d1af6cdf4968b403f337844779cb21/docs/operations.md); for command
|
|
88
|
+
details, see the [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/docs/reference.md).
|
|
113
89
|
|
|
114
90
|
## Why Silvermoon
|
|
115
91
|
|
|
116
|
-
Long-running Agent work
|
|
117
|
-
Someone
|
|
118
|
-
task, and which conversation or machine
|
|
119
|
-
|
|
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
|
|
122
|
-
decisions that
|
|
123
|
-
implementation, and accepting that the result
|
|
124
|
-
Between those boundaries, an Agent can inspect repository facts and
|
|
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.
|
|
128
|
-
and explicit decisions
|
|
129
|
-
implementation
|
|
130
|
-
|
|
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@
|
|
115
|
+
<img src="https://cdn.jsdelivr.net/gh/shazhou-ww/silvermoon@84860fea52d1af6cdf4968b403f337844779cb21/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
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
|
153
|
-
|
|
154
|
-
state, and helps
|
|
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
|
|
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
|
|
144
|
+
real across three nested worlds.
|
|
171
145
|
|
|
172
|
-
**Ideal World (道心)**
|
|
173
|
-
|
|
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
|
|
179
|
-
serves, and
|
|
180
|
-
|
|
181
|
-
|
|
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
|
|
185
|
-
safe action; and
|
|
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/
|
|
166
|
+
- [Getting Started](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/docs/getting-started.md) — installation, configuration,
|
|
191
167
|
and the first idea.
|
|
192
|
-
- [Core Concepts](https://github.com/shazhou-ww/silvermoon/blob/
|
|
168
|
+
- [Core Concepts](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/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/
|
|
170
|
+
- [Operating Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/docs/operations.md) — navigation, creation,
|
|
195
171
|
publication, hygiene, and continuation.
|
|
196
|
-
- [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/
|
|
172
|
+
- [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/docs/reference.md) — storage, derived state, CLI
|
|
197
173
|
reports, validation targets, and schemas.
|
|
198
|
-
- [Maintaining Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/
|
|
174
|
+
- [Maintaining Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/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/84860fea52d1af6cdf4968b403f337844779cb21/CONTRIBUTING.md)
|
|
180
|
+
- [Code of Conduct](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/CODE_OF_CONDUCT.md)
|
|
181
|
+
- [Security Policy](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/SECURITY.md)
|
|
182
|
+
- [Support](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/SUPPORT.md)
|
|
183
|
+
- [Changelog](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/CHANGELOG.md)
|
|
184
|
+
- [MIT License](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/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/84860fea52d1af6cdf4968b403f337844779cb21/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@
|
|
5
|
+
<img src="https://cdn.jsdelivr.net/gh/shazhou-ww/silvermoon@84860fea52d1af6cdf4968b403f337844779cb21/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/
|
|
9
|
+
<a href="https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/README.md">English</a> | 简体中文
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
# Silvermoon(银月)
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
> 道友也不想自己的本命项目没有器灵吧?
|
|
15
15
|
|
|
16
16
|
## 快速开始
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
### Setup
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
```text
|
|
45
|
+
/silvermoon
|
|
46
|
+
请继续推进这个项目中的 `<idea-alias>`。
|
|
47
|
+
遵循 `whats-next` 的指引持续工作。
|
|
48
|
+
直到需要我做决定时再停下来。
|
|
49
|
+
```
|
|
55
50
|
|
|
56
|
-
|
|
51
|
+
或者提出一个新想法:
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
/silvermoon
|
|
55
|
+
我有个想法:
|
|
56
|
+
增加一个独立于语言选择的修仙风格文案开关。
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
也可以直接在终端运行 Silvermoon:
|
|
57
60
|
|
|
58
61
|
```sh
|
|
59
|
-
silvermoon
|
|
60
|
-
silvermoon whats-next <
|
|
61
|
-
silvermoon
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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/ace5dfb36e775f8a2628ee81aa87a04ef1e154b5/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/ace5dfb36e775f8a2628ee81aa87a04ef1e154b5/docs/core-concepts.md)。
|
|
68
|
+
> **备注**:建议使用 `npx silvermoon`,而不是全局安装。这样无需单独维护全局版本;
|
|
69
|
+
> 在 Node.js 项目中,lock file 会固定项目使用的版本。
|
|
70
|
+
|
|
71
|
+
工作流见 [Operating Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/docs/operations.md),
|
|
72
|
+
命令详情见 [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/docs/reference.md)。
|
|
89
73
|
|
|
90
74
|
## 为什么需要 Silvermoon
|
|
91
75
|
|
|
92
|
-
长期运行的 Agent
|
|
93
|
-
|
|
94
|
-
|
|
76
|
+
长期运行的 Agent 工作,往往让人背负太多看不见的状态:总得有人记住最初想做什么、
|
|
77
|
+
代码是否仍与任务一致,以及最新的事实究竟留在哪次对话、哪台机器上。
|
|
78
|
+
Silvermoon 把这些变成项目自身的一部分。
|
|
95
79
|
|
|
96
|
-
|
|
97
|
-
|
|
80
|
+
它让人不必时刻盯守,只在真正属于人的决策点回来:批准目标、验收实现,
|
|
81
|
+
以及确认结果在现世成立。在这些边界之间,Agent 可以查阅仓库事实,
|
|
82
|
+
推进优先级最高的安全行动。
|
|
98
83
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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@
|
|
94
|
+
<img src="https://cdn.jsdelivr.net/gh/shazhou-ww/silvermoon@84860fea52d1af6cdf4968b403f337844779cb21/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
|
-
|
|
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
|
-
|
|
138
|
-
成形,**Outer World(现世)**则验证这些产物在真正需要运行的地方是否成立。
|
|
123
|
+
> 道心立志,内景化形,现世求真。
|
|
139
124
|
|
|
140
|
-
|
|
125
|
+
三个世界由内向外层层包含:主体世界包含它所服务的理想世界,又是现实世界的一部分。
|
|
126
|
+
正如人会有理想,却又必须活在现实之中。
|
|
141
127
|
|
|
142
|
-
|
|
143
|
-
|
|
128
|
+
先在理想世界里把理想讨论清楚,再在主体世界中让它成形,
|
|
129
|
+
最后部署到现实世界去——这正是意识反作用于物质的过程。
|
|
144
130
|
|
|
145
|
-
人负责 approval 与 acceptance,Agent 负责 continuation
|
|
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/
|
|
152
|
-
- [Core Concepts](https://github.com/shazhou-ww/silvermoon/blob/
|
|
153
|
-
- [Operating Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/
|
|
154
|
-
- [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/
|
|
155
|
-
- [Maintaining Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/
|
|
137
|
+
- [Getting Started](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/docs/getting-started.md) — 安装、配置与第一个 idea。
|
|
138
|
+
- [Core Concepts](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/docs/core-concepts.md) — 项目归属、三重世界、revision 与决策边界。
|
|
139
|
+
- [Operating Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/docs/operations.md) — 导航、创建、发布、仓库卫生与持续推进。
|
|
140
|
+
- [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/docs/reference.md) — 存储、派生状态、CLI report、验证 target 与 schema。
|
|
141
|
+
- [Maintaining Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/docs/maintaining.md) — 开发检查、文档职责与发布指南。
|
|
142
|
+
|
|
143
|
+
## 社区
|
|
144
|
+
|
|
145
|
+
- [贡献指南](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/CONTRIBUTING.md)
|
|
146
|
+
- [行为准则](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/CODE_OF_CONDUCT.md)
|
|
147
|
+
- [安全策略](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/SECURITY.md)
|
|
148
|
+
- [支持说明](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/SUPPORT.md)
|
|
149
|
+
- [变更记录](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/CHANGELOG.md)
|
|
150
|
+
- [MIT License](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/LICENSE)
|
|
151
|
+
|
|
152
|
+
## 图片版权声明
|
|
153
|
+
|
|
154
|
+
本项目使用的银月(Silvermoon)形象,均为基于《凡人修仙传》动画二次生成的 AI 图片。
|
|
155
|
+
原角色与动画的相关权利归各自版权方所有,这些图片不在本项目 [MIT License](https://github.com/shazhou-ww/silvermoon/blob/84860fea52d1af6cdf4968b403f337844779cb21/LICENSE) 的授权范围内。
|
|
156
|
+
若版权方认为其中任何图片构成侵权,请联系作者,作者会替换相关图片。
|
package/bin/silvermoon.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const bootstrapStartedAt = process.hrtime.bigint();
|
|
4
|
+
const { runCli } = await import("../src/cli.js");
|
|
4
5
|
|
|
5
|
-
process.exitCode = await runCli(
|
|
6
|
+
process.exitCode = await runCli(
|
|
7
|
+
process.argv.slice(2),
|
|
8
|
+
console,
|
|
9
|
+
{ bootstrapStartedAt },
|
|
10
|
+
);
|