silvermoon 0.0.3 → 0.1.0
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 +32 -13
- package/README.zh-CN.md +19 -4
- package/docs/core-concepts.md +14 -12
- package/docs/getting-started.md +53 -27
- package/docs/maintaining.md +11 -2
- package/docs/operations.md +77 -30
- package/docs/reference.md +197 -37
- package/docs/repository-tasks.md +25 -13
- package/package.json +2 -2
- package/schema/v1/idea-status.schema.json +3 -3
- package/skills/silvermoon/SKILL.md +142 -187
- package/skills/silvermoon/references/adoption.md +34 -20
- package/src/adoption.js +136 -260
- package/src/cli.js +86 -113
- package/src/create-idea.js +222 -110
- package/src/dialogue.js +303 -0
- package/src/git.js +172 -97
- package/src/idea-layout.js +59 -123
- package/src/index.js +203 -170
- package/src/observation.js +305 -0
- package/src/trace.js +171 -0
- package/src/whatsnext.js +529 -378
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://raw.githubusercontent.com/shazhou-ww/silvermoon/
|
|
5
|
+
<img src="https://raw.githubusercontent.com/shazhou-ww/silvermoon/936bf4af71450499aebe4ccac7562ce583f34f8b/assets/silvermoon.svg" width="960" alt="Silvermoon, the artifact spirit of the project">
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
19
|
<p align="center">
|
|
20
|
-
English | <a href="https://github.com/shazhou-ww/silvermoon/blob/
|
|
20
|
+
English | <a href="https://github.com/shazhou-ww/silvermoon/blob/936bf4af71450499aebe4ccac7562ce583f34f8b/README.zh-CN.md">简体中文</a>
|
|
21
21
|
</p>
|
|
22
22
|
|
|
23
23
|
# Silvermoon
|
|
@@ -30,10 +30,16 @@ Silvermoon needs Node.js 22 or newer and Git access to the repository's primary
|
|
|
30
30
|
branch.
|
|
31
31
|
|
|
32
32
|
```sh
|
|
33
|
-
npm install --
|
|
34
|
-
|
|
33
|
+
npm install --global silvermoon
|
|
34
|
+
silvermoon whats-next
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
Silvermoon is ecosystem-neutral: the target repository does not need
|
|
38
|
+
`package.json`, a package manager, a Silvermoon dependency, or `node_modules`.
|
|
39
|
+
The first report lists every applicable setup step in order, including the
|
|
40
|
+
exact `npx skills add ... --agent universal` command that registers the
|
|
41
|
+
canonical skill at `.agents/skills/silvermoon`.
|
|
42
|
+
|
|
37
43
|
Create `.silvermoon/config.yaml`:
|
|
38
44
|
|
|
39
45
|
```yaml
|
|
@@ -52,14 +58,27 @@ Then create an idea and let the registered Silvermoon skill guide one safe
|
|
|
52
58
|
next action at a time:
|
|
53
59
|
|
|
54
60
|
```sh
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
silvermoon create-idea
|
|
62
|
+
silvermoon whats-next <idea>
|
|
57
63
|
```
|
|
58
64
|
|
|
59
65
|
Describe the desired world in the generated `Idea.md`, review it, and approve
|
|
60
66
|
that exact revision. From then on, Silvermoon keeps the goal, implementation,
|
|
61
67
|
repository state, and real-world result connected. See
|
|
62
|
-
[Getting Started](https://github.com/shazhou-ww/silvermoon/blob/
|
|
68
|
+
[Getting Started](https://github.com/shazhou-ww/silvermoon/blob/936bf4af71450499aebe4ccac7562ce583f34f8b/docs/getting-started.md) for the complete first workflow.
|
|
69
|
+
Default dialogue output uses lightweight Markdown headings for intent,
|
|
70
|
+
observation, and next instructions, plus actions and outcomes only when an
|
|
71
|
+
operation was attempted. Add `--json` only when a programmatic consumer needs
|
|
72
|
+
the `intention / observation / outcomes / instructions` envelope. For
|
|
73
|
+
pre-commit validation, run `silvermoon check --staged`: unlike the default
|
|
74
|
+
`check` (committed `HEAD`), it checks the index and exits `0` only when the
|
|
75
|
+
project snapshot is valid. See the [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/936bf4af71450499aebe4ccac7562ce583f34f8b/docs/reference.md)
|
|
76
|
+
for validation targets and exit codes. Add `--trace <file.trace.jsonl>` to any
|
|
77
|
+
command to write paired task and Git timing spans for performance analysis.
|
|
78
|
+
If the argument does not end with the exact lowercase `.trace.jsonl` suffix,
|
|
79
|
+
Silvermoon appends it. Repository-local `*.trace.jsonl` files are ignored.
|
|
80
|
+
Trace files are created only after the measured command work completes and
|
|
81
|
+
never overwrite an existing file.
|
|
63
82
|
|
|
64
83
|
## Why Silvermoon
|
|
65
84
|
|
|
@@ -89,7 +108,7 @@ sessions, Agents, and hosting platforms.
|
|
|
89
108
|
<tr>
|
|
90
109
|
<td width="160" align="center" valign="top">
|
|
91
110
|
<!-- markdownlint-disable-next-line MD013 -->
|
|
92
|
-
<img src="https://raw.githubusercontent.com/shazhou-ww/silvermoon/
|
|
111
|
+
<img src="https://raw.githubusercontent.com/shazhou-ww/silvermoon/936bf4af71450499aebe4ccac7562ce583f34f8b/docs/assets/silvermoon-avatar.svg" width="128" alt="Line portrait of Silvermoon, the project's artifact spirit">
|
|
93
112
|
</td>
|
|
94
113
|
<td valign="top">
|
|
95
114
|
Silvermoon is named after a character in <em>A Record of a Mortal's
|
|
@@ -137,13 +156,13 @@ the project, not to a fleeting conversation.
|
|
|
137
156
|
|
|
138
157
|
## Further Reading
|
|
139
158
|
|
|
140
|
-
- [Getting Started](https://github.com/shazhou-ww/silvermoon/blob/
|
|
159
|
+
- [Getting Started](https://github.com/shazhou-ww/silvermoon/blob/936bf4af71450499aebe4ccac7562ce583f34f8b/docs/getting-started.md) — installation, configuration,
|
|
141
160
|
and the first idea.
|
|
142
|
-
- [Core Concepts](https://github.com/shazhou-ww/silvermoon/blob/
|
|
161
|
+
- [Core Concepts](https://github.com/shazhou-ww/silvermoon/blob/936bf4af71450499aebe4ccac7562ce583f34f8b/docs/core-concepts.md) — project ownership, the three
|
|
143
162
|
worlds, revisions, and decision boundaries.
|
|
144
|
-
- [Operating Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/
|
|
163
|
+
- [Operating Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/936bf4af71450499aebe4ccac7562ce583f34f8b/docs/operations.md) — navigation, creation,
|
|
145
164
|
publication, hygiene, and continuation.
|
|
146
|
-
- [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/
|
|
165
|
+
- [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/936bf4af71450499aebe4ccac7562ce583f34f8b/docs/reference.md) — storage, derived state, CLI
|
|
147
166
|
reports, validation targets, and schemas.
|
|
148
|
-
- [Maintaining Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/
|
|
167
|
+
- [Maintaining Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/936bf4af71450499aebe4ccac7562ce583f34f8b/docs/maintaining.md) — development checks,
|
|
149
168
|
documentation ownership, and release guidance.
|
package/README.zh-CN.md
CHANGED
|
@@ -18,10 +18,15 @@
|
|
|
18
18
|
Silvermoon 需要 Node.js 22 或更高版本,并且能够通过 Git 访问仓库的 primary branch。
|
|
19
19
|
|
|
20
20
|
```sh
|
|
21
|
-
npm install --
|
|
22
|
-
|
|
21
|
+
npm install --global silvermoon
|
|
22
|
+
silvermoon whats-next
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
Silvermoon 不依赖目标仓库的技术栈:目标项目无需 `package.json`、package manager、
|
|
26
|
+
Silvermoon dependency 或 `node_modules`。首次报告会按顺序列出所有适用的整备步骤,
|
|
27
|
+
其中包括把 canonical skill 注册到 `.agents/skills/silvermoon` 的精确
|
|
28
|
+
`npx skills add ... --agent universal` 命令。
|
|
29
|
+
|
|
25
30
|
创建 `.silvermoon/config.yaml`:
|
|
26
31
|
|
|
27
32
|
```yaml
|
|
@@ -38,13 +43,23 @@ preferredLanguage: zh-CN
|
|
|
38
43
|
然后创建一个 idea,让已注册的 Silvermoon skill 每次引导一个安全的下一步行动:
|
|
39
44
|
|
|
40
45
|
```sh
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
silvermoon create-idea
|
|
47
|
+
silvermoon whats-next <idea>
|
|
43
48
|
```
|
|
44
49
|
|
|
45
50
|
在生成的 `Idea.md` 中描述想要抵达的世界,审阅并批准这个精确 revision。此后,
|
|
46
51
|
Silvermoon 会让目标、实现、仓库状态与现实结果始终相连。完整的首次工作流见英文
|
|
47
52
|
[Getting Started](./docs/getting-started.md)。
|
|
53
|
+
对话命令默认以轻量 Markdown 标题呈现意图、观察和下一步;只有实际尝试了操作,
|
|
54
|
+
才出现动作与结果段落。程序消费者可使用 `--json` 获取
|
|
55
|
+
`intention / observation / outcomes / instructions` envelope。提交前使用
|
|
56
|
+
`silvermoon check --staged` 验证 index;无参数 `check` 只验证已提交的 `HEAD`,
|
|
57
|
+
不能替代提交前检查。只有项目快照有效时检查才以退出码 `0` 放行,详见英文
|
|
58
|
+
[Technical Reference](./docs/reference.md)。任何命令都可以添加
|
|
59
|
+
`--trace <file.trace.jsonl>`,写出用于性能分析的成对任务与 Git 计时 span。参数若
|
|
60
|
+
没有以精确的小写 `.trace.jsonl` 结尾,Silvermoon 会自动追加;repository 内的
|
|
61
|
+
`*.trace.jsonl` 会被忽略。trace 文件只在待测命令工作完成后创建,并且绝不覆盖
|
|
62
|
+
已有文件。
|
|
48
63
|
|
|
49
64
|
## 为什么需要 Silvermoon
|
|
50
65
|
|
package/docs/core-concepts.md
CHANGED
|
@@ -27,16 +27,16 @@ the same primary history and continue from the same facts.
|
|
|
27
27
|
|
|
28
28
|
## Three Nested Worlds
|
|
29
29
|
|
|
30
|
-
**Ideal World (
|
|
31
|
-
outcome, scope, and constraints without prescribing
|
|
30
|
+
**Ideal World (理想世界)** is defined by the ideal contract in `Idea.md`. It
|
|
31
|
+
describes the outcome, scope, and constraints without prescribing
|
|
32
|
+
implementation.
|
|
32
33
|
|
|
33
|
-
**Inner World (
|
|
34
|
+
**Inner World (主体世界)** contains the inner implementation contract in
|
|
34
35
|
`Implementation.md` plus the repository deliverables that give the ideal form.
|
|
35
36
|
|
|
36
|
-
**Outer World (
|
|
37
|
-
plus evidence that the implementation is true where it must
|
|
38
|
-
|
|
39
|
-
> 道心立意,内景成形,现世验真。
|
|
37
|
+
**Outer World (现实世界)** contains the real-world deployment contract in
|
|
38
|
+
`Deployment.md` plus evidence that the implementation is true where it must
|
|
39
|
+
operate.
|
|
40
40
|
|
|
41
41
|
The directory structure makes the relationship concrete: the Inner World
|
|
42
42
|
contains the Ideal World, and the Outer World contains both. Each world is an
|
|
@@ -62,8 +62,10 @@ work, but a checked item is not approval or acceptance.
|
|
|
62
62
|
|
|
63
63
|
## One Project, Shared Facts
|
|
64
64
|
|
|
65
|
-
`whats-next`
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
`whats-next` first checks local worktree, HEAD, and upstream facts, then fetches
|
|
66
|
+
the configured remote primary only when local hygiene permits it. Its
|
|
67
|
+
observation and instructions report the exact local and remote commits used
|
|
68
|
+
for ancestry guidance. Writers use the reported remote commit as the expected
|
|
69
|
+
shared tip. If primary moves, they fetch and reobserve rather than replaying a
|
|
70
|
+
stale decision. This is coordination through ordinary Git, not a distributed
|
|
71
|
+
lock.
|
package/docs/getting-started.md
CHANGED
|
@@ -9,23 +9,28 @@ This guide is the authoritative setup and first-use path for Silvermoon.
|
|
|
9
9
|
- Permission to fetch that branch and to publish ordinary non-force commits
|
|
10
10
|
through the repository's normal collaboration path.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Run Silvermoon And Register Its Skill
|
|
13
13
|
|
|
14
|
-
Install Silvermoon
|
|
15
|
-
version:
|
|
14
|
+
Install Silvermoon independently of the target project's dependency graph, or
|
|
15
|
+
invoke a chosen version temporarily:
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
|
-
npm install --
|
|
18
|
+
npm install --global silvermoon
|
|
19
|
+
silvermoon whats-next
|
|
20
|
+
# or: npx silvermoon@<version> whats-next
|
|
19
21
|
```
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
The setup report gives the exact path for the running installation. Use it to
|
|
24
|
+
register the bundled canonical skill through the universal `skills` target:
|
|
22
25
|
|
|
23
26
|
```sh
|
|
24
|
-
npx skills add
|
|
27
|
+
npx skills add <path-to-running-silvermoon>/skills --skill silvermoon --agent universal --yes --copy
|
|
25
28
|
```
|
|
26
29
|
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
The registration lives only at `.agents/skills/silvermoon`. Silvermoon checks
|
|
31
|
+
that its content exactly matches the running installation. It does not require
|
|
32
|
+
the target repository to use Node, contain `package.json`, declare a
|
|
33
|
+
Silvermoon dependency, or have `node_modules`, and it never mutates skill
|
|
29
34
|
registration itself.
|
|
30
35
|
|
|
31
36
|
## Configure The Shared Primary
|
|
@@ -62,45 +67,66 @@ preferredLanguage: zh-CN
|
|
|
62
67
|
|
|
63
68
|
Inherited values remain dynamic and are not copied into an idea. Use
|
|
64
69
|
`create-idea --language <tag>` only when the new idea needs a stable override.
|
|
65
|
-
|
|
70
|
+
The shared observation reports the resolved non-empty language tag.
|
|
66
71
|
|
|
67
72
|
## Create The First Idea
|
|
68
73
|
|
|
69
74
|
Run:
|
|
70
75
|
|
|
71
76
|
```sh
|
|
72
|
-
|
|
73
|
-
|
|
77
|
+
silvermoon create-idea
|
|
78
|
+
silvermoon create-idea --language zh-cn
|
|
74
79
|
```
|
|
75
80
|
|
|
76
|
-
The command
|
|
77
|
-
|
|
78
|
-
idea scaffold with
|
|
79
|
-
`
|
|
80
|
-
human decision.
|
|
81
|
-
|
|
82
|
-
Replace the guidance in `Idea.md` with the desired outcome,
|
|
83
|
-
constraints. Keep
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
The command requires the configured primary branch and upstream plus a clean
|
|
82
|
+
local worktree. It does not fetch or require local HEAD to match the remote
|
|
83
|
+
tip. When those checks pass, it creates one untracked idea scaffold with
|
|
84
|
+
`Idea.md`, `Implementation.md`, `Deployment.md`, `ledger.md`, and
|
|
85
|
+
`status.yaml`. It never stages, commits, pushes, or records a human decision.
|
|
86
|
+
|
|
87
|
+
Replace the guidance in the `Idea.md` ideal contract with the desired outcome,
|
|
88
|
+
scope, and constraints. Keep the `Implementation.md` inner implementation
|
|
89
|
+
contract and `Deployment.md` real-world deployment contract placeholders
|
|
90
|
+
synchronized until their lifecycle phases. Review every generated path,
|
|
91
|
+
validate the complete candidate, and commit and publish the prepared idea to
|
|
92
|
+
the configured primary through the repository's normal non-force publication
|
|
93
|
+
path. Verify it is reachable from refreshed primary before asking the user to
|
|
94
|
+
review or approve the exact reported ideal revision. If publication requires a
|
|
95
|
+
pull request, wait until it reaches primary; never ask for approval of an
|
|
96
|
+
unpublished local candidate. Publication does not itself approve the idea.
|
|
86
97
|
|
|
87
98
|
Then ask what comes next with the generated ULID or an exact unique alias:
|
|
88
99
|
|
|
89
100
|
```sh
|
|
90
|
-
|
|
101
|
+
silvermoon whats-next <idea>
|
|
91
102
|
```
|
|
92
103
|
|
|
93
|
-
The
|
|
94
|
-
|
|
95
|
-
|
|
104
|
+
The default dialogue uses lightweight Markdown headings for intent,
|
|
105
|
+
observation, and ordered next instructions; actions and outcomes appear only
|
|
106
|
+
when an operation was attempted. Add `--json` only when a programmatic
|
|
107
|
+
consumer needs the `intention / observation / outcomes / instructions`
|
|
108
|
+
envelope. Execute the applicable instructions in order and run the same
|
|
109
|
+
command again only after an expected repository change, an unexpected input
|
|
110
|
+
change, or a newly arrived external result.
|
|
96
111
|
|
|
97
112
|
## Make Decisions Explicit
|
|
98
113
|
|
|
99
114
|
Silvermoon never infers approval or acceptance. After a person explicitly
|
|
100
115
|
approves the current ideal, accepts the current implementation, or accepts the
|
|
101
116
|
current deployment, record the exact revision reported by `whats-next` in the
|
|
102
|
-
corresponding `status.yaml` field. Validate the full candidate
|
|
103
|
-
|
|
117
|
+
corresponding `status.yaml` field. Validate the full candidate with
|
|
118
|
+
`silvermoon check --worktree`, stage it, then run `silvermoon check --staged`
|
|
119
|
+
to validate the index before publishing a normal non-force commit. Default
|
|
120
|
+
`check` validates committed `HEAD`, not the pending commit; only a successful
|
|
121
|
+
project validation exits `0`.
|
|
122
|
+
|
|
123
|
+
When requesting any approval or acceptance, include the idea's alias and ULID,
|
|
124
|
+
the decision and exact world revision, plus a clickable permalink to the
|
|
125
|
+
canonical world entry pinned to the published primary commit. Link to
|
|
126
|
+
`Idea.md`, `Implementation.md`, or `Deployment.md` as appropriate. Do not use
|
|
127
|
+
a local workspace path or a branch-floating link; if the host has no known
|
|
128
|
+
permalink format, provide the primary commit and repository-relative path and
|
|
129
|
+
explain the limitation.
|
|
104
130
|
|
|
105
131
|
Continue with [Core Concepts](./core-concepts.md) before changing lifecycle
|
|
106
132
|
contracts, or use [Operating Silvermoon](./operations.md) for the routine
|
package/docs/maintaining.md
CHANGED
|
@@ -14,7 +14,8 @@ pnpm install --frozen-lockfile
|
|
|
14
14
|
Use the smallest check that covers a change:
|
|
15
15
|
|
|
16
16
|
```sh
|
|
17
|
-
pnpm sync:skills # refresh the generated
|
|
17
|
+
pnpm sync:skills # refresh the generated universal skill copy
|
|
18
|
+
pnpm lint:markdown # Markdown lint and link checks
|
|
18
19
|
pnpm test # fast unit and repository contract tests
|
|
19
20
|
pnpm test:integration # real filesystem and Git behavior
|
|
20
21
|
pnpm test:e2e # packed and installed CLI behavior
|
|
@@ -22,10 +23,18 @@ pnpm check # complete release-grade validation
|
|
|
22
23
|
pnpm check:skills # skill discovery and structure
|
|
23
24
|
```
|
|
24
25
|
|
|
26
|
+
`pnpm check` runs the independent release-grade checks concurrently and waits
|
|
27
|
+
for all of them before reporting every failure. Run the narrower commands above
|
|
28
|
+
while iterating, then use `pnpm check` before delivery.
|
|
29
|
+
|
|
25
30
|
Edit the canonical skill only under `skills/silvermoon`, then run
|
|
26
|
-
`pnpm sync:skills`. The checked-in `.
|
|
31
|
+
`pnpm sync:skills`. The checked-in `.agents/skills/silvermoon` directory is a
|
|
27
32
|
generated copy so repository skill discovery works without symbolic-link
|
|
28
33
|
support. `pnpm check:skills` rejects a stale or manually edited copy.
|
|
34
|
+
The repository-only publish skill is maintained directly under
|
|
35
|
+
`.agents/skills/publish`; it is not part of the generated copy or npm package.
|
|
36
|
+
For documentation and skill changes, run `pnpm lint:markdown`,
|
|
37
|
+
`pnpm check:skills`, and `node --test test/contract/skill.test.mjs`.
|
|
29
38
|
|
|
30
39
|
Run `pnpm check` after CLI, schema, repository model, release, or skill changes.
|
|
31
40
|
Documentation work must also preserve Markdown links, package contents,
|
package/docs/operations.md
CHANGED
|
@@ -12,34 +12,42 @@ npx silvermoon whats-next publish-documentation --json
|
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Without a selector, Silvermoon asks for a choice among multiple active ideas,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
and the option to discuss and create a new idea. This remains true with zero,
|
|
16
|
+
one, or many active ideas: only a selector chooses work. Completed and abandoned
|
|
17
|
+
ideas are excluded from default candidates. A selector is either a canonical
|
|
18
|
+
uppercase ULID or an exact, unique, case-sensitive alias.
|
|
19
|
+
|
|
20
|
+
The shared observation includes a resolved non-empty `preferredLanguage`.
|
|
21
|
+
Instructions use it for world entries, same-world supporting artifacts, the
|
|
22
|
+
ledger, and user-facing explanations. Commands, identifiers, schema fields,
|
|
23
23
|
protocol markers, and verbatim tool output retain their original form.
|
|
24
24
|
|
|
25
|
-
Every invocation
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
Every invocation follows three strict layers. It first checks Git,
|
|
26
|
+
configuration compatibility, and `.agents/skills/silvermoon`. It then checks
|
|
27
|
+
local conflicts, changes, HEAD, and upstream identity before any remote access.
|
|
28
|
+
Only after those checks pass does it fetch primary, compare ancestry, and
|
|
29
|
+
route idea work. It never edits, checks out, merges, commits, stashes, deletes,
|
|
30
|
+
resets, fast-forwards, or pushes.
|
|
29
31
|
|
|
30
32
|
## Create An Idea
|
|
31
33
|
|
|
32
34
|
Explicit creation uses:
|
|
33
35
|
|
|
34
36
|
```sh
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
silvermoon create-idea
|
|
38
|
+
silvermoon create-idea --language zh-cn
|
|
37
39
|
```
|
|
38
40
|
|
|
39
41
|
Creation intent is distinct from active-idea selection. If hygiene blocks the
|
|
40
42
|
command, perform only the reported remediation and retry `create-idea`; do not
|
|
41
43
|
replace the request with selector-less navigation.
|
|
42
44
|
|
|
45
|
+
Creation checks project readiness, then requires the configured primary branch
|
|
46
|
+
and upstream plus a clean worktree. It does not fetch, compare ancestry, or
|
|
47
|
+
require local HEAD to be aligned with the remote tip. Its preparation reports
|
|
48
|
+
omit the active-idea inventory because existing work does not replace explicit
|
|
49
|
+
creation intent.
|
|
50
|
+
|
|
43
51
|
`--language` is the only command-level language override. It normalizes a valid
|
|
44
52
|
BCP 47 tag and writes it to the new idea's `status.yaml`. Without the option,
|
|
45
53
|
creation writes no language field and the idea dynamically inherits project,
|
|
@@ -47,26 +55,38 @@ user, or `en-US` defaults. `whats-next` and `check` do not accept the option.
|
|
|
47
55
|
|
|
48
56
|
The generated files remain untracked for review. Complete `Idea.md`, optionally
|
|
49
57
|
add a concise unique alias, inspect every path, and publish the initial idea
|
|
50
|
-
through ordinary Git.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
through ordinary Git. Validate and commit the complete prepared idea, then make
|
|
59
|
+
that commit reachable from configured primary using the repository's normal
|
|
60
|
+
non-force publication path before asking the user to review or approve it. If
|
|
61
|
+
publication requires a pull request, wait until it reaches primary. Reobserve
|
|
62
|
+
the exact `idealRevision` after publication; never ask for approval of an
|
|
63
|
+
unpublished local candidate, and never treat publication as approval.
|
|
64
|
+
|
|
65
|
+
## Follow One Observation
|
|
66
|
+
|
|
67
|
+
Treat `intention`, `observation`, `outcomes`, and `instructions` as one
|
|
68
|
+
immutable dialogue report for `whats-next` and `create-idea`. Default output
|
|
69
|
+
uses lightweight Markdown headings and lists for intent, observation, and
|
|
70
|
+
next instructions, including actions and outcomes only if an operation was
|
|
71
|
+
attempted. `--json` serializes the same model, retaining `outcomes: []` when
|
|
72
|
+
none were attempted.
|
|
73
|
+
|
|
74
|
+
Project setup takes precedence over repository synchronization, which takes
|
|
75
|
+
precedence over lifecycle work. Instructions include every known remediation
|
|
76
|
+
for the current layer in priority order. Large change sets report complete
|
|
77
|
+
counts, bounded path samples, omitted counts, and exact commands for the full
|
|
78
|
+
diff. Preserve unknown and concurrent work. Never force-push, use
|
|
79
|
+
`reset --hard`, broadly clean the worktree, or silently rewrite history.
|
|
61
80
|
|
|
62
81
|
After an observable change, run `whats-next` again. Do not poll an unchanged
|
|
63
82
|
observation.
|
|
64
83
|
|
|
65
84
|
## Author World Contracts
|
|
66
85
|
|
|
67
|
-
`Idea.md` is the Ideal World
|
|
68
|
-
|
|
69
|
-
|
|
86
|
+
`Idea.md` is the Ideal World's ideal contract. `Implementation.md` is the
|
|
87
|
+
Inner World's inner implementation contract, and `Deployment.md` is the Outer
|
|
88
|
+
World's real-world deployment contract. The latter two contain `## Steps` and
|
|
89
|
+
`## Acceptance criteria`. Every item uses a stable level-three heading:
|
|
70
90
|
|
|
71
91
|
- implementation steps: `I-Sxx`
|
|
72
92
|
- implementation criteria: `I-ACxx`
|
|
@@ -94,14 +114,41 @@ the current reported world revision. Edit only the corresponding status fact:
|
|
|
94
114
|
Validate the complete candidate:
|
|
95
115
|
|
|
96
116
|
```sh
|
|
97
|
-
|
|
117
|
+
silvermoon check --worktree
|
|
98
118
|
git add .silvermoon/ideas/<ULID>/status.yaml
|
|
99
|
-
|
|
119
|
+
silvermoon check --staged
|
|
100
120
|
```
|
|
101
121
|
|
|
122
|
+
`check` is a project-only validator, not a navigation command. It does not
|
|
123
|
+
check worktree hygiene, upstream, or ancestry and does not suggest next steps.
|
|
124
|
+
Without a target it validates committed `HEAD`, not the pending commit.
|
|
125
|
+
`--worktree` validates the full candidate, while `--staged` validates exactly
|
|
126
|
+
the index and is the pre-commit hook target. Its JSON has `intention` and
|
|
127
|
+
`observation` only; it has no `outcomes` or `instructions`. Exit status `0`
|
|
128
|
+
means the chosen project snapshot is valid; `1` means invalid or unavailable
|
|
129
|
+
and must block the commit; `2` means invalid CLI usage. Do not treat the
|
|
130
|
+
existence of a report as permission to commit.
|
|
131
|
+
|
|
132
|
+
`check` does not infer that a status field was newly written, prove who
|
|
133
|
+
authorized it, compare it with a commit parent, or search history for its
|
|
134
|
+
origin. Those are workflow responsibilities: match an explicit human decision
|
|
135
|
+
to the exact revision reported by `whats-next`, edit only the corresponding
|
|
136
|
+
status fact, review the candidate, and publish without rewriting concurrent
|
|
137
|
+
history. Old decision revisions may remain in status after a world changes;
|
|
138
|
+
their mismatch is what derives the idea's earlier lifecycle state.
|
|
139
|
+
|
|
102
140
|
Prefer a status-only decision commit, publish through the repository's normal
|
|
103
141
|
non-force path, and verify the commit is reachable from refreshed primary.
|
|
104
142
|
|
|
143
|
+
When asking for approval or acceptance, identify the idea by alias and ULID,
|
|
144
|
+
state the exact reported world revision, and link the corresponding canonical
|
|
145
|
+
entry at the published primary commit: `Idea.md` for ideal approval,
|
|
146
|
+
`Implementation.md` for implementation acceptance, or `Deployment.md` for
|
|
147
|
+
deployment acceptance. Use a commit-pinned web permalink rather than a local
|
|
148
|
+
workspace path or a branch name that can move. The linked revision and
|
|
149
|
+
publication are review context only; the user must still make the decision
|
|
150
|
+
explicitly.
|
|
151
|
+
|
|
105
152
|
## Publish Work
|
|
106
153
|
|
|
107
154
|
Before publication, compare with the observed primary tip, run checks focused
|