silvermoon 0.0.1 → 0.0.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/README.md +0 -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
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/shazhou-ww/silvermoon/raw/refs/heads/main/schema/v1/definitions.schema.json",
|
|
4
|
-
"title": "Silvermoon shared definitions v1",
|
|
5
|
-
"description": "Shared value definitions for Silvermoon version 1 storage contracts.",
|
|
6
|
-
"$defs": {
|
|
7
|
-
"branch": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"pattern": "^(?!-)(?!/)(?!@$)(?!refs/)(?!remotes/)(?!.*\\.\\.)(?!.*@\\{)(?!.*[ ~^:?*\\[\\\\])(?!.*(?:^|/)\\.)(?!.*(?:^|/)[^/]*\\.lock(?:/|$))(?!.*//$)(?!.*//)(?!.*\\.$)(?!.*\/$).+$"
|
|
10
|
-
},
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"format": "uri",
|
|
14
|
-
"pattern": "^https://(?:[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?|\\[[0-9a-f:.]+\\])(?::(?!443(?:/|$))[0-9]+)?/(?!/)(?!.*//)(?!.*\\\\)(?!.*(?:/\\.{1,2})(?:/|$))(?!.*%(?:2[eEfF]|5[cC]))(?!.*[?#])[^/](?:.*[^/])?$"
|
|
15
|
-
},
|
|
16
|
-
"ulid": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
|
|
19
|
-
},
|
|
20
|
-
"objectId": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/shazhou-ww/silvermoon/raw/refs/heads/main/schema/v1/definitions.schema.json",
|
|
4
|
+
"title": "Silvermoon shared definitions v1",
|
|
5
|
+
"description": "Shared value definitions for Silvermoon version 1 storage contracts.",
|
|
6
|
+
"$defs": {
|
|
7
|
+
"branch": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"pattern": "^(?!-)(?!/)(?!@$)(?!refs/)(?!remotes/)(?!.*\\.\\.)(?!.*@\\{)(?!.*[ ~^:?*\\[\\\\])(?!.*(?:^|/)\\.)(?!.*(?:^|/)[^/]*\\.lock(?:/|$))(?!.*//$)(?!.*//)(?!.*\\.$)(?!.*\/$).+$"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"format": "uri",
|
|
14
|
+
"pattern": "^https://(?:[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?|\\[[0-9a-f:.]+\\])(?::(?!443(?:/|$))[0-9]+)?/(?!/)(?!.*//)(?!.*\\\\)(?!.*(?:/\\.{1,2})(?:/|$))(?!.*%(?:2[eEfF]|5[cC]))(?!.*[?#])[^/](?:.*[^/])?$"
|
|
15
|
+
},
|
|
16
|
+
"ulid": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
|
|
19
|
+
},
|
|
20
|
+
"objectId": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
|
|
23
|
+
},
|
|
24
|
+
"languageTag": {
|
|
25
|
+
"description": "Canonical BCP 47 language tag.",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"pattern": "^(?:[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}|[0-9]{3}))?|[a-z]{4,8})(?:-[A-Za-z0-9]{5,8}|-[0-9][A-Za-z0-9]{3})*(?:-[0-9A-WY-Za-wy-z](?:-[A-Za-z0-9]{2,8})+)*(?:-x(?:-[A-Za-z0-9]{1,8})+)?$"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -1,41 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/shazhou-ww/silvermoon/raw/refs/heads/main/schema/v1/idea-status.schema.json",
|
|
4
|
-
"title": "Silvermoon idea status v1",
|
|
5
|
-
"description": "The repository-owned .silvermoon/ideas/<IDEA_ID>/status.yaml contract.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"required": [
|
|
9
|
-
"version",
|
|
10
|
-
"id"
|
|
11
|
-
],
|
|
12
|
-
"properties": {
|
|
13
|
-
"version": {
|
|
14
|
-
"const": 1
|
|
15
|
-
},
|
|
16
|
-
"id": {
|
|
17
|
-
"$ref": "definitions.schema.json#/$defs/ulid"
|
|
18
|
-
},
|
|
19
|
-
"alias": {
|
|
20
|
-
"type": "string",
|
|
21
|
-
"minLength": 1,
|
|
22
|
-
"maxLength": 120,
|
|
23
|
-
"pattern": "^(?!\\s)(?!.*\\s$)[^\\u0000-\\u001f\\u007f-\\u009f]+$"
|
|
24
|
-
},
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
},
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/shazhou-ww/silvermoon/raw/refs/heads/main/schema/v1/idea-status.schema.json",
|
|
4
|
+
"title": "Silvermoon idea status v1",
|
|
5
|
+
"description": "The repository-owned .silvermoon/ideas/<IDEA_ID>/status.yaml contract.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"version",
|
|
10
|
+
"id"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"version": {
|
|
14
|
+
"const": 1
|
|
15
|
+
},
|
|
16
|
+
"id": {
|
|
17
|
+
"$ref": "definitions.schema.json#/$defs/ulid"
|
|
18
|
+
},
|
|
19
|
+
"alias": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1,
|
|
22
|
+
"maxLength": 120,
|
|
23
|
+
"pattern": "^(?!\\s)(?!.*\\s$)[^\\u0000-\\u001f\\u007f-\\u009f]+$"
|
|
24
|
+
},
|
|
25
|
+
"language": {
|
|
26
|
+
"$ref": "definitions.schema.json#/$defs/languageTag"
|
|
27
|
+
},
|
|
28
|
+
"abandoned": {
|
|
29
|
+
"const": true
|
|
30
|
+
},
|
|
31
|
+
"approvedRevision": {
|
|
32
|
+
"description": "Accepted Ideal World (道心) tree object ID.",
|
|
33
|
+
"$ref": "definitions.schema.json#/$defs/objectId"
|
|
34
|
+
},
|
|
35
|
+
"implementationAcceptedRevision": {
|
|
36
|
+
"description": "Accepted Inner World (内景) tree object ID.",
|
|
37
|
+
"$ref": "definitions.schema.json#/$defs/objectId"
|
|
38
|
+
},
|
|
39
|
+
"deploymentAcceptedRevision": {
|
|
40
|
+
"description": "Accepted Outer World (现世) tree object ID.",
|
|
41
|
+
"$ref": "definitions.schema.json#/$defs/objectId"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/shazhou-ww/silvermoon/raw/refs/heads/main/schema/v1/user-config.schema.json",
|
|
4
|
+
"title": "Silvermoon user configuration v1",
|
|
5
|
+
"description": "The user-owned ~/.config/silvermoon/config.yaml contract.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"version"
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"version": {
|
|
13
|
+
"const": 1
|
|
14
|
+
},
|
|
15
|
+
"preferredLanguage": {
|
|
16
|
+
"$ref": "definitions.schema.json#/$defs/languageTag"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,209 +1,216 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: silvermoon
|
|
3
|
-
description: "Navigate or create repository-owned ideas, execute one safe action, and reobserve only after an observable delta."
|
|
4
|
-
argument-hint: "[new | idea ULID or alias]"
|
|
5
|
-
user-invocable: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Silvermoon
|
|
9
|
-
|
|
10
|
-
Use Silvermoon to navigate or explicitly create ideas against the configured
|
|
11
|
-
remote primary. The CLI derives idea state and checks repository hygiene; the
|
|
12
|
-
Agent performs suggested repository or external actions through ordinary tools
|
|
13
|
-
and Git.
|
|
14
|
-
|
|
15
|
-
## Start From Primary
|
|
16
|
-
|
|
17
|
-
1. Preserve the user's intent when choosing the entry command:
|
|
18
|
-
- For `/silvermoon new` or any other explicit request to create a new idea,
|
|
19
|
-
run `silvermoon create-idea --json`.
|
|
20
|
-
- Otherwise run `silvermoon whats-next [idea] --json`. Pass the selector only
|
|
21
|
-
when the user supplied or previously selected one.
|
|
22
|
-
2. Treat the command, request, `observedPrimaryCommit`, `selectedIdea`,
|
|
23
|
-
action or created idea as one immutable
|
|
24
|
-
from different reports.
|
|
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
|
-
|
|
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
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
###
|
|
156
|
-
|
|
157
|
-
- [
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
the
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
1
|
+
---
|
|
2
|
+
name: silvermoon
|
|
3
|
+
description: "Navigate or create repository-owned ideas, execute one safe action, and reobserve only after an observable delta."
|
|
4
|
+
argument-hint: "[new | idea ULID or alias]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Silvermoon
|
|
9
|
+
|
|
10
|
+
Use Silvermoon to navigate or explicitly create ideas against the configured
|
|
11
|
+
remote primary. The CLI derives idea state and checks repository hygiene; the
|
|
12
|
+
Agent performs suggested repository or external actions through ordinary tools
|
|
13
|
+
and Git.
|
|
14
|
+
|
|
15
|
+
## Start From Primary
|
|
16
|
+
|
|
17
|
+
1. Preserve the user's intent when choosing the entry command:
|
|
18
|
+
- For `/silvermoon new` or any other explicit request to create a new idea,
|
|
19
|
+
run `silvermoon create-idea --json`.
|
|
20
|
+
- Otherwise run `silvermoon whats-next [idea] --json`. Pass the selector only
|
|
21
|
+
when the user supplied or previously selected one.
|
|
22
|
+
2. Treat the command, request, `observedPrimaryCommit`, `selectedIdea`,
|
|
23
|
+
effective `language`, and action or created idea as one immutable
|
|
24
|
+
observation. Do not combine guidance from different reports. Use the
|
|
25
|
+
reported language for natural-language world content, supporting artifacts,
|
|
26
|
+
ledger text, and user-facing explanations; preserve commands, identifiers,
|
|
27
|
+
schema fields, protocol markers, and verbatim tool output.
|
|
28
|
+
3. Read the complete `onboarding` doctor report. It lists every requirement,
|
|
29
|
+
status, blocking flag, dependency, structured remediation, recommended
|
|
30
|
+
action, and recheck command. For `adopt-silvermoon`, execute only the
|
|
31
|
+
recommended explicit remediation (or safely resolve its conflict), then
|
|
32
|
+
recheck; do not route idea work while blocking findings remain.
|
|
33
|
+
4. Execute only the highest-priority action. Do not skip worktree, conflict,
|
|
34
|
+
sync, or selection guidance to reach a later idea-state action. An explicit
|
|
35
|
+
create request is not idea selection: after resolving a blocking hygiene
|
|
36
|
+
action, retry `create-idea`, not selector-less `whats-next`.
|
|
37
|
+
|
|
38
|
+
`whats-next` may fetch and inspect. It never checkout, merges, edits, commits,
|
|
39
|
+
stashes, deletes, resets, fast-forwards, or pushes. `create-idea` runs the same
|
|
40
|
+
hygiene preflight and, only when it passes, creates the structured idea scaffold.
|
|
41
|
+
Dependency installation and skill registration are separate explicit
|
|
42
|
+
operations. The packaged skill is canonical, while registration and updates
|
|
43
|
+
belong to the supported `npx skills add` interface. Silvermoon reports
|
|
44
|
+
configuration and skill findings but owns no onboarding mutation command.
|
|
45
|
+
|
|
46
|
+
## Preserve Work
|
|
47
|
+
|
|
48
|
+
- Read exact staged, unstaged, and untracked diffs before deciding ownership.
|
|
49
|
+
- Preserve unknown, unrelated, or user-authored changes. Isolate them in
|
|
50
|
+
another worktree or use an explicitly described stash only when needed.
|
|
51
|
+
- Delete only paths created by the current operation or paths the user names
|
|
52
|
+
after reviewing the current diff.
|
|
53
|
+
- Never use force-push, `reset --hard`, broad clean commands, or silent history
|
|
54
|
+
rewrites to satisfy guidance.
|
|
55
|
+
- Publish with the observed primary tip as the expected remote tip. On rejection
|
|
56
|
+
or concurrent movement, fetch and call `whats-next` again; never replay a stale
|
|
57
|
+
approval or acceptance automatically.
|
|
58
|
+
|
|
59
|
+
## Execute Actions
|
|
60
|
+
|
|
61
|
+
- `select-active-idea`: show the ordered candidates and obtain one explicit
|
|
62
|
+
ULID or alias selection.
|
|
63
|
+
- `continue-active-idea`: call `whats-next <id>` to obtain state guidance.
|
|
64
|
+
- `create-idea`: this action is internal to the explicit `create-idea` command's
|
|
65
|
+
preflight; do not replace the user's create intent with active-idea
|
|
66
|
+
selection. After hygiene passes, the command creates one self-contained idea
|
|
67
|
+
with structured `Idea.md`, `Implementation.md`, `Deployment.md`, and
|
|
68
|
+
`ledger.md` entries plus alias-less `status.yaml`. It never stages, commits,
|
|
69
|
+
pushes, or records a decision. Review every generated path before
|
|
70
|
+
publication. During initial preparation, replace the `Idea.md` guidance with
|
|
71
|
+
the requested Ideal World contract, but keep the Implementation, Deployment,
|
|
72
|
+
and matching ledger placeholders synchronized until their lifecycle actions.
|
|
73
|
+
An Agent may add a concise, unique alias derived from the user's request;
|
|
74
|
+
do not interrupt the user only to ask them to name it.
|
|
75
|
+
When the user explicitly requests a stable language for the new idea, pass
|
|
76
|
+
`--language <tag>`; otherwise omit it so the idea dynamically inherits the
|
|
77
|
+
project, user, or `en-US` default. Never add a language override to
|
|
78
|
+
`whats-next` or `check`.
|
|
79
|
+
- `switch-to-primary`, `resolve-conflicts`, `inspect-worktree-changes`,
|
|
80
|
+
`fast-forward-primary`, `integrate-primary`, `publish-primary`: perform the
|
|
81
|
+
exact Git hygiene step without discarding either history or unknown work.
|
|
82
|
+
- `prepare-idea`: edit `Idea.md` and supporting files in the Ideal World
|
|
83
|
+
(道心). Supporting files must serve `Idea.md`, never replace it as a second
|
|
84
|
+
contract. After lifecycle hygiene, use the reported `ledgerPath` to resume
|
|
85
|
+
relevant unfinished work. After explicit approval, write the reported
|
|
86
|
+
`idealRevision` to `approvedRevision`.
|
|
87
|
+
- `implement-idea`: edit `Implementation.md`, its supporting Inner World
|
|
88
|
+
(内景) files, and repository deliverables. Do not change the nested Ideal
|
|
89
|
+
World unless the ideal truly changed and should return to preparing. After
|
|
90
|
+
lifecycle hygiene, use the reported `ledgerPath` to resume relevant
|
|
91
|
+
unfinished work. After explicit acceptance, write the reported
|
|
92
|
+
`implementationRevision` to `implementationAcceptedRevision`.
|
|
93
|
+
- `deploy-idea`: use `Deployment.md` and its supporting Outer World (现世)
|
|
94
|
+
files to drive and verify the external world. Do not change repository
|
|
95
|
+
deliverables as deployment work or modify a nested world unless that earlier
|
|
96
|
+
contract truly changed. Publish a newly authored or materially changed
|
|
97
|
+
deployment contract first, reobserve its stable `deploymentRevision`, then
|
|
98
|
+
execute external checks against that revision and record their completion in
|
|
99
|
+
the ledger. After lifecycle hygiene, use the reported `ledgerPath` to resume
|
|
100
|
+
relevant unfinished work. After explicit acceptance, write the reported
|
|
101
|
+
`deploymentRevision` to `deploymentAcceptedRevision`.
|
|
102
|
+
- `review-abandoned`: keep `abandoned: true`, remove it after an explicit human
|
|
103
|
+
decision, or create a different idea.
|
|
104
|
+
- `review-completed`: revise the existing idea definition or create a new idea.
|
|
105
|
+
|
|
106
|
+
## Author The Three Worlds
|
|
107
|
+
|
|
108
|
+
Every idea uses this fixed structure:
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
.silvermoon/ideas/<ULID>/
|
|
112
|
+
├── status.yaml
|
|
113
|
+
├── ledger.md
|
|
114
|
+
└── outer/
|
|
115
|
+
├── Deployment.md
|
|
116
|
+
└── inner/
|
|
117
|
+
├── Implementation.md
|
|
118
|
+
└── ideal/
|
|
119
|
+
└── Idea.md
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
`Idea.md` is the canonical Ideal World (道心) entry, `Implementation.md` is the
|
|
123
|
+
canonical Inner World (内景) entry, and `Deployment.md` is the canonical Outer
|
|
124
|
+
World (现世) entry: 道心立意,内景成形,现世验真. Each world may contain
|
|
125
|
+
additional files and nested directories, but those artifacts support their
|
|
126
|
+
same-world entry and do not define a second contract.
|
|
127
|
+
|
|
128
|
+
In `Implementation.md` and `Deployment.md`, put plans under `## Steps` and
|
|
129
|
+
outcome contracts under `## Acceptance criteria`. Give every step and criterion
|
|
130
|
+
a stable level-three heading: `I-Sxx`, `I-ACxx`, `D-Sxx`, or `D-ACxx`. A
|
|
131
|
+
criterion must describe both its observable outcome and the method that proves
|
|
132
|
+
it; do not add a separate validation section. Keep checkboxes out of world
|
|
133
|
+
contracts. World content changes its world revision and every containing world
|
|
134
|
+
revision; `status.yaml` and `ledger.md` stay outside all three world trees.
|
|
135
|
+
|
|
136
|
+
## Continue From The Ledger
|
|
137
|
+
|
|
138
|
+
Every idea has an Agent-owned `ledger.md` at the path reported by `whats-next`.
|
|
139
|
+
It is operational state, not a fourth world, normative contract, or human
|
|
140
|
+
decision. Silvermoon requires the regular file but does not parse its body or
|
|
141
|
+
derive lifecycle state from it.
|
|
142
|
+
|
|
143
|
+
Mirror stable IDs and short titles from both world contracts:
|
|
144
|
+
|
|
145
|
+
```markdown
|
|
146
|
+
# Ledger
|
|
147
|
+
|
|
148
|
+
## Implementation
|
|
149
|
+
|
|
150
|
+
### Implementation steps
|
|
151
|
+
|
|
152
|
+
- [x] **I-S01:** Completed step
|
|
153
|
+
- [ ] **I-S02:** Remaining step
|
|
154
|
+
|
|
155
|
+
### Implementation acceptance criteria
|
|
156
|
+
|
|
157
|
+
- [x] **I-AC01:** Proven criterion
|
|
158
|
+
- [ ] **I-AC02:** Unproven criterion
|
|
159
|
+
|
|
160
|
+
## Deployment
|
|
161
|
+
|
|
162
|
+
### Deployment steps
|
|
163
|
+
|
|
164
|
+
- [ ] **D-S01:** Deployment step
|
|
165
|
+
|
|
166
|
+
### Deployment acceptance criteria
|
|
167
|
+
|
|
168
|
+
- [ ] **D-AC01:** Deployment criterion
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
When adding or removing a world step or criterion, update the matching ledger
|
|
172
|
+
entry in the same change. Keep its stable ID when only the title or details are
|
|
173
|
+
refined. Add new entries unchecked. If a completed item's requirement or proof
|
|
174
|
+
method changes materially, reset its checkbox and re-run the work or proof.
|
|
175
|
+
Infer the next action from `whats-next`, the world contracts, and unchecked
|
|
176
|
+
ledger entries; do not maintain duplicate Current or Next summaries.
|
|
177
|
+
If relevant ledger entries remain unchecked, continue the reported world
|
|
178
|
+
action. If all relevant entries are checked, their evidence remains valid, and
|
|
179
|
+
the candidate is published, stop editing and request explicit acceptance for
|
|
180
|
+
the exact revision reported by `whats-next`.
|
|
181
|
+
|
|
182
|
+
`[x]` means only that the Agent recorded work or a check as complete. It never
|
|
183
|
+
approves an Ideal World, accepts implementation or deployment, changes
|
|
184
|
+
`status.yaml`, or authorizes publication. Record test names, commands,
|
|
185
|
+
artifacts, and results in the corresponding world criterion or concise ledger
|
|
186
|
+
notes without creating a separate evidence schema or public API contract.
|
|
187
|
+
|
|
188
|
+
## Write Status Facts
|
|
189
|
+
|
|
190
|
+
Silvermoon has no approval, acceptance, or abandonment mutation commands.
|
|
191
|
+
Update the idea's `status.yaml` with ordinary file editing:
|
|
192
|
+
|
|
193
|
+
1. Reconfirm the decision applies to the selected idea and current
|
|
194
|
+
world revision reported by `whats-next`.
|
|
195
|
+
2. Add or update only the corresponding revision field, or add/remove canonical
|
|
196
|
+
`abandoned: true` after an explicit human decision.
|
|
197
|
+
3. Run `silvermoon check --worktree --json` while reviewing the complete
|
|
198
|
+
candidate, then stage it and run `silvermoon check --staged --json`.
|
|
199
|
+
4. Commit the status decision separately when practical, then non-force push
|
|
200
|
+
with the observation's `observedPrimaryCommit` as expected tip.
|
|
201
|
+
|
|
202
|
+
Never infer a human decision from silence, prose, Git activity, or an outer
|
|
203
|
+
command. Old revision values remain as history and become inactive naturally
|
|
204
|
+
when the idea folder changes.
|
|
205
|
+
|
|
206
|
+
## Advance The Loop
|
|
207
|
+
|
|
208
|
+
Re-run the intent-preserving entry command only after an expected repository
|
|
209
|
+
delta, an unexpected input change, or a newly arrived external result: use
|
|
210
|
+
`create-idea` for a pending explicit creation and `whats-next` otherwise. End
|
|
211
|
+
the current turn when waiting for human/external input. Report an actionable
|
|
212
|
+
error with its recovery condition, or report no progress and stop if guidance
|
|
213
|
+
completed without a delta. Never poll the same observation.
|
|
214
|
+
|
|
215
|
+
Follow [adoption.md](./references/adoption.md) when creating or explicitly
|
|
216
|
+
converting a repository to Silvermoon.
|