silvermoon 0.0.1 → 0.0.3
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/README.md +149 -236
- package/README.zh-CN.md +114 -199
- package/assets/silvermoon.svg +176 -175
- package/bin/silvermoon.js +0 -0
- package/docs/assets/silvermoon-avatar.svg +395 -0
- package/docs/core-concepts.md +69 -0
- package/docs/getting-started.md +115 -0
- package/docs/maintaining.md +56 -0
- package/docs/npm-package-releases.md +139 -0
- package/docs/operations.md +110 -0
- package/docs/reference.md +138 -0
- package/docs/repository-tasks.md +61 -0
- package/package.json +69 -65
- package/schema/v1/config.schema.json +27 -24
- package/schema/v1/definitions.schema.json +30 -25
- package/schema/v1/idea-status.schema.json +44 -41
- package/schema/v1/user-config.schema.json +19 -0
- package/skills/silvermoon/SKILL.md +216 -209
- package/skills/silvermoon/references/adoption.md +122 -122
- package/src/adoption.js +313 -313
- package/src/cli.js +200 -196
- package/src/config.js +193 -176
- package/src/create-idea.js +272 -235
- package/src/git.js +284 -284
- package/src/idea-layout.js +439 -439
- package/src/idea-templates.js +109 -109
- package/src/ideas.js +140 -131
- package/src/index.js +260 -260
- package/src/language.js +29 -0
- package/src/layout.js +21 -21
- package/src/repository.js +87 -87
- package/src/user-config.js +135 -0
- package/src/whatsnext.js +453 -378
- package/src/yaml.js +66 -66
package/README.md
CHANGED
|
@@ -1,236 +1,149 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
the
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
```sh
|
|
152
|
-
silvermoon whats-next
|
|
153
|
-
silvermoon whats-next 01M36QGPNTXEPP61DA4KP4AVZF
|
|
154
|
-
silvermoon whats-next publish-documentation --json
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
Without a selector, Silvermoon asks you to choose among multiple active ideas,
|
|
158
|
-
continue one active idea, or create a new idea. With a ULID or exact unique
|
|
159
|
-
alias, it renders state guidance. Every invocation first checks the configured
|
|
160
|
-
primary branch, conflicts, dirty worktree, and local/remote primary ancestry.
|
|
161
|
-
|
|
162
|
-
JSON reports contain `observedPrimaryCommit`, `selectedIdea`, and exactly one
|
|
163
|
-
`action`. They also contain `onboarding`, whose requirements carry stable IDs,
|
|
164
|
-
statuses, blocking flags, dependencies, observed facts, structured remediation,
|
|
165
|
-
a recommended action, and a recheck command. Execution source is
|
|
166
|
-
`source-checkout`, `project-local`, `temporary`, `global`, or `unknown`.
|
|
167
|
-
Temporary execution can bootstrap diagnosis; normal idea work requires the
|
|
168
|
-
exact project dependency, installed package, and matching repository skill.
|
|
169
|
-
Use the observed commit as the expected remote tip for later writes.
|
|
170
|
-
If primary moves, fetch and reobserve rather than replaying a stale decision.
|
|
171
|
-
|
|
172
|
-
## Create An Idea
|
|
173
|
-
|
|
174
|
-
```sh
|
|
175
|
-
silvermoon create-idea --json
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
After branch, conflict, dirty-worktree, and primary-ancestry hygiene passes, the
|
|
179
|
-
command generates a canonical ULID, structured `Idea.md`, `Implementation.md`,
|
|
180
|
-
`Deployment.md`, and `ledger.md` documents, plus a canonical `status.yaml`
|
|
181
|
-
containing only `version` and `id`. It does not require or invent an alias. The
|
|
182
|
-
new files are intentionally untracked, so the next `whats-next <ULID>` reports
|
|
183
|
-
`inspect-worktree-changes` until you complete the initial `Idea.md`, review the
|
|
184
|
-
candidate, and publish it through ordinary Git. An Agent may add a concise,
|
|
185
|
-
unique alias derived from the user's request while preparing the idea; users
|
|
186
|
-
need not stop to name it.
|
|
187
|
-
|
|
188
|
-
Silvermoon has no approval or acceptance mutation commands. After an explicit
|
|
189
|
-
decision, edit the idea's status file, run `silvermoon check --staged`, commit
|
|
190
|
-
the status fact, and non-force push through ordinary Git.
|
|
191
|
-
|
|
192
|
-
## Validate
|
|
193
|
-
|
|
194
|
-
- `check` validates only the committed `HEAD` snapshot and reads primary
|
|
195
|
-
coordinates from that snapshot.
|
|
196
|
-
- `check --worktree` validates the hypothetical commit containing HEAD, the
|
|
197
|
-
index, unstaged changes, and nonignored untracked files. It reads primary
|
|
198
|
-
coordinates from that complete candidate.
|
|
199
|
-
- `check --staged` validates the index snapshot.
|
|
200
|
-
- `check --commit <revision>` validates one local commit snapshot.
|
|
201
|
-
- `check --remote` uses committed HEAD coordinates to fetch primary, validates
|
|
202
|
-
its immutable tip, and proves retained revision facts against complete
|
|
203
|
-
reachable primary history.
|
|
204
|
-
|
|
205
|
-
Targets are mutually exclusive and never change the caller's branch, index, or
|
|
206
|
-
worktree. Exit status `0` means success, `1` means validation or operational
|
|
207
|
-
failure, and `2` means invalid CLI usage. Use `--json` for the complete stable
|
|
208
|
-
report envelope.
|
|
209
|
-
|
|
210
|
-
The repository configuration schema is
|
|
211
|
-
[schema/v1/config.schema.json](schema/v1/config.schema.json), and the idea
|
|
212
|
-
status schema is
|
|
213
|
-
[schema/v1/idea-status.schema.json](schema/v1/idea-status.schema.json). Both
|
|
214
|
-
use the shared definitions in
|
|
215
|
-
[schema/v1/definitions.schema.json](schema/v1/definitions.schema.json).
|
|
216
|
-
Runtime checks additionally verify canonical YAML, regular fixed metadata
|
|
217
|
-
paths, three world entries, unique aliases, current Git object format, tree
|
|
218
|
-
object types, per-world candidate revision binding, and acceptance history.
|
|
219
|
-
|
|
220
|
-
## Adopt Silvermoon
|
|
221
|
-
|
|
222
|
-
Silvermoon is a direct breaking cutover from the previous product. It recognizes
|
|
223
|
-
only `.silvermoon/config.yaml` version 1 and does not read, convert, or diagnose
|
|
224
|
-
previous layouts. Preserve Git history and record only acceptance facts
|
|
225
|
-
supported by explicit review. See the installed skill's `references/adoption.md` for
|
|
226
|
-
the adoption sequence.
|
|
227
|
-
|
|
228
|
-
## Development
|
|
229
|
-
|
|
230
|
-
```sh
|
|
231
|
-
pnpm install --frozen-lockfile
|
|
232
|
-
pnpm test # fast unit and repository contract tests
|
|
233
|
-
pnpm test:integration # real filesystem and Git behavior
|
|
234
|
-
pnpm test:e2e # packed and installed CLI behavior
|
|
235
|
-
pnpm check # complete release-grade validation
|
|
236
|
-
```
|
|
1
|
+
<!-- markdownlint-disable-file MD041 -->
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<!-- markdownlint-disable-next-line MD013 -->
|
|
5
|
+
<img src="https://raw.githubusercontent.com/shazhou-ww/silvermoon/95f48bd2cd07fd43267f7b6a0c9471d2a8d0ca95/assets/silvermoon.svg" width="960" alt="Silvermoon, the artifact spirit of the project">
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<!-- markdownlint-disable-next-line MD013 -->
|
|
10
|
+
<a href="https://npmx.dev/package/silvermoon"><img src="https://img.shields.io/npm/v/silvermoon?style=flat-square" alt="npm version"></a>
|
|
11
|
+
<!-- markdownlint-disable-next-line MD013 -->
|
|
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
|
+
<!-- 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>
|
|
15
|
+
<!-- markdownlint-disable-next-line MD013 -->
|
|
16
|
+
<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
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
English | <a href="https://github.com/shazhou-ww/silvermoon/blob/95f48bd2cd07fd43267f7b6a0c9471d2a8d0ca95/README.zh-CN.md">简体中文</a>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
# Silvermoon
|
|
24
|
+
|
|
25
|
+
**The artifact spirit of the project.**
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
Silvermoon needs Node.js 22 or newer and Git access to the repository's primary
|
|
30
|
+
branch.
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
npm install --save-dev silvermoon
|
|
34
|
+
npx skills add ./node_modules/silvermoon/skills --skill silvermoon --agent github-copilot --yes --copy
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Create `.silvermoon/config.yaml`:
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
version: 1
|
|
41
|
+
primaryRepository: https://github.com/example/repository.git
|
|
42
|
+
primaryBranch: main
|
|
43
|
+
preferredLanguage: en
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`preferredLanguage` is optional. A specific idea can override it with
|
|
47
|
+
`language` in `status.yaml`, and `create-idea --language <tag>` can set that
|
|
48
|
+
override when the idea is created. Otherwise Silvermoon checks
|
|
49
|
+
`~/.config/silvermoon/config.yaml` and finally defaults to `en-US`.
|
|
50
|
+
|
|
51
|
+
Then create an idea and let the registered Silvermoon skill guide one safe
|
|
52
|
+
next action at a time:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
npx silvermoon create-idea --json
|
|
56
|
+
npx silvermoon whats-next <idea> --json
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Describe the desired world in the generated `Idea.md`, review it, and approve
|
|
60
|
+
that exact revision. From then on, Silvermoon keeps the goal, implementation,
|
|
61
|
+
repository state, and real-world result connected. See
|
|
62
|
+
[Getting Started](https://github.com/shazhou-ww/silvermoon/blob/95f48bd2cd07fd43267f7b6a0c9471d2a8d0ca95/docs/getting-started.md) for the complete first workflow.
|
|
63
|
+
|
|
64
|
+
## Why Silvermoon
|
|
65
|
+
|
|
66
|
+
Long-running Agent work usually asks people to carry too much invisible state.
|
|
67
|
+
Someone must remember what was intended, whether the code still matches the
|
|
68
|
+
task, and which conversation or machine knows the latest truth. Silvermoon
|
|
69
|
+
makes those concerns part of the project instead.
|
|
70
|
+
|
|
71
|
+
It lets people step back from continuous supervision and return at the
|
|
72
|
+
decisions that belong to them: approving the intended outcome, accepting the
|
|
73
|
+
implementation, and accepting that the result is true in the outside world.
|
|
74
|
+
Between those boundaries, an Agent can inspect repository facts and continue
|
|
75
|
+
the highest-priority safe action.
|
|
76
|
+
|
|
77
|
+
It also refuses to let a detached task card declare success. Current artifacts
|
|
78
|
+
and explicit decisions jointly determine state, so a changed goal or
|
|
79
|
+
implementation naturally invalidates conclusions that depended on the older
|
|
80
|
+
revision. Because those facts live in Git, work can continue across devices,
|
|
81
|
+
sessions, Agents, and hosting platforms.
|
|
82
|
+
|
|
83
|
+
## The Project's Artifact Spirit
|
|
84
|
+
|
|
85
|
+
> Fellow Daoist, you wouldn't want your lifebound project to be without an
|
|
86
|
+
> artifact spirit, would you?
|
|
87
|
+
|
|
88
|
+
<table>
|
|
89
|
+
<tr>
|
|
90
|
+
<td width="160" align="center" valign="top">
|
|
91
|
+
<!-- markdownlint-disable-next-line MD013 -->
|
|
92
|
+
<img src="https://raw.githubusercontent.com/shazhou-ww/silvermoon/95f48bd2cd07fd43267f7b6a0c9471d2a8d0ca95/docs/assets/silvermoon-avatar.svg" width="128" alt="Line portrait of Silvermoon, the project's artifact spirit">
|
|
93
|
+
</td>
|
|
94
|
+
<td valign="top">
|
|
95
|
+
Silvermoon is named after a character in <em>A Record of a Mortal's
|
|
96
|
+
Journey to Immortality</em>. She comes from the Silvermoon Wolf Clan in
|
|
97
|
+
the Spirit Realm and is one of the split souls of Ling Long. After losing
|
|
98
|
+
part of her memory in the human realm, she lives as an artifact spirit
|
|
99
|
+
first in a wolf-headed jade scepter and later in Han Li's Bamboo
|
|
100
|
+
Cloudswarm Swords.
|
|
101
|
+
<br><br>
|
|
102
|
+
That image fits this project: Silvermoon does not belong to one operator
|
|
103
|
+
or one chat. It lives with the project's artifacts, understands their
|
|
104
|
+
state, and helps each companion find what comes next. The biography is
|
|
105
|
+
inspiration, not a prerequisite for using the tool.
|
|
106
|
+
</td>
|
|
107
|
+
</tr>
|
|
108
|
+
</table>
|
|
109
|
+
|
|
110
|
+
Watch *A Record of a Mortal's Journey to Immortality*:
|
|
111
|
+
|
|
112
|
+
<!-- markdownlint-disable-next-line MD013 -->
|
|
113
|
+
- YouTube: [Episode 150: Overseas Turmoil 26](https://www.youtube.com/watch?v=GJgezoCBIHM "A Record of a Mortal's Journey to Immortality — Episode 150: Overseas Turmoil 26")
|
|
114
|
+
<!-- markdownlint-disable-next-line MD013 -->
|
|
115
|
+
- 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")
|
|
116
|
+
|
|
117
|
+
## From Ideal To Real
|
|
118
|
+
|
|
119
|
+
A project is more than a task list or a transcript. It is an ideal becoming
|
|
120
|
+
real through three nested worlds.
|
|
121
|
+
|
|
122
|
+
**Ideal World (道心)** names the outcome worth pursuing. **Inner World (内景)**
|
|
123
|
+
gives that intent shape in repository artifacts. **Outer World (现世)** asks
|
|
124
|
+
whether the shaped work is true where it must actually operate.
|
|
125
|
+
|
|
126
|
+
> 道心立意,内景成形,现世验真。
|
|
127
|
+
|
|
128
|
+
The worlds nest from the inside out. Implementation contains the ideal it
|
|
129
|
+
serves, and deployment contains both. This is an engineering relationship, not
|
|
130
|
+
just a metaphor: when an inner world changes, conclusions from an outer world
|
|
131
|
+
no longer have the same foundation and must be proven again.
|
|
132
|
+
|
|
133
|
+
Humans own approval and acceptance. Agents own continuation: they read the
|
|
134
|
+
contracts, the ledger, and Git facts; preserve concurrent work; execute one
|
|
135
|
+
safe action; and reobserve only after something changes. The context belongs to
|
|
136
|
+
the project, not to a fleeting conversation.
|
|
137
|
+
|
|
138
|
+
## Further Reading
|
|
139
|
+
|
|
140
|
+
- [Getting Started](https://github.com/shazhou-ww/silvermoon/blob/95f48bd2cd07fd43267f7b6a0c9471d2a8d0ca95/docs/getting-started.md) — installation, configuration,
|
|
141
|
+
and the first idea.
|
|
142
|
+
- [Core Concepts](https://github.com/shazhou-ww/silvermoon/blob/95f48bd2cd07fd43267f7b6a0c9471d2a8d0ca95/docs/core-concepts.md) — project ownership, the three
|
|
143
|
+
worlds, revisions, and decision boundaries.
|
|
144
|
+
- [Operating Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/95f48bd2cd07fd43267f7b6a0c9471d2a8d0ca95/docs/operations.md) — navigation, creation,
|
|
145
|
+
publication, hygiene, and continuation.
|
|
146
|
+
- [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/95f48bd2cd07fd43267f7b6a0c9471d2a8d0ca95/docs/reference.md) — storage, derived state, CLI
|
|
147
|
+
reports, validation targets, and schemas.
|
|
148
|
+
- [Maintaining Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/95f48bd2cd07fd43267f7b6a0c9471d2a8d0ca95/docs/maintaining.md) — development checks,
|
|
149
|
+
documentation ownership, and release guidance.
|