silvermoon 0.0.2 → 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 CHANGED
@@ -0,0 +1,168 @@
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/936bf4af71450499aebe4ccac7562ce583f34f8b/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/936bf4af71450499aebe4ccac7562ce583f34f8b/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 --global silvermoon
34
+ silvermoon whats-next
35
+ ```
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
+
43
+ Create `.silvermoon/config.yaml`:
44
+
45
+ ```yaml
46
+ version: 1
47
+ primaryRepository: https://github.com/example/repository.git
48
+ primaryBranch: main
49
+ preferredLanguage: en
50
+ ```
51
+
52
+ `preferredLanguage` is optional. A specific idea can override it with
53
+ `language` in `status.yaml`, and `create-idea --language <tag>` can set that
54
+ override when the idea is created. Otherwise Silvermoon checks
55
+ `~/.config/silvermoon/config.yaml` and finally defaults to `en-US`.
56
+
57
+ Then create an idea and let the registered Silvermoon skill guide one safe
58
+ next action at a time:
59
+
60
+ ```sh
61
+ silvermoon create-idea
62
+ silvermoon whats-next <idea>
63
+ ```
64
+
65
+ Describe the desired world in the generated `Idea.md`, review it, and approve
66
+ that exact revision. From then on, Silvermoon keeps the goal, implementation,
67
+ repository state, and real-world result connected. See
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.
82
+
83
+ ## Why Silvermoon
84
+
85
+ Long-running Agent work usually asks people to carry too much invisible state.
86
+ Someone must remember what was intended, whether the code still matches the
87
+ task, and which conversation or machine knows the latest truth. Silvermoon
88
+ makes those concerns part of the project instead.
89
+
90
+ It lets people step back from continuous supervision and return at the
91
+ decisions that belong to them: approving the intended outcome, accepting the
92
+ implementation, and accepting that the result is true in the outside world.
93
+ Between those boundaries, an Agent can inspect repository facts and continue
94
+ the highest-priority safe action.
95
+
96
+ It also refuses to let a detached task card declare success. Current artifacts
97
+ and explicit decisions jointly determine state, so a changed goal or
98
+ implementation naturally invalidates conclusions that depended on the older
99
+ revision. Because those facts live in Git, work can continue across devices,
100
+ sessions, Agents, and hosting platforms.
101
+
102
+ ## The Project's Artifact Spirit
103
+
104
+ > Fellow Daoist, you wouldn't want your lifebound project to be without an
105
+ > artifact spirit, would you?
106
+
107
+ <table>
108
+ <tr>
109
+ <td width="160" align="center" valign="top">
110
+ <!-- markdownlint-disable-next-line MD013 -->
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">
112
+ </td>
113
+ <td valign="top">
114
+ Silvermoon is named after a character in <em>A Record of a Mortal's
115
+ Journey to Immortality</em>. She comes from the Silvermoon Wolf Clan in
116
+ the Spirit Realm and is one of the split souls of Ling Long. After losing
117
+ part of her memory in the human realm, she lives as an artifact spirit
118
+ first in a wolf-headed jade scepter and later in Han Li's Bamboo
119
+ Cloudswarm Swords.
120
+ <br><br>
121
+ That image fits this project: Silvermoon does not belong to one operator
122
+ or one chat. It lives with the project's artifacts, understands their
123
+ state, and helps each companion find what comes next. The biography is
124
+ inspiration, not a prerequisite for using the tool.
125
+ </td>
126
+ </tr>
127
+ </table>
128
+
129
+ Watch *A Record of a Mortal's Journey to Immortality*:
130
+
131
+ <!-- markdownlint-disable-next-line MD013 -->
132
+ - 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")
133
+ <!-- markdownlint-disable-next-line MD013 -->
134
+ - 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")
135
+
136
+ ## From Ideal To Real
137
+
138
+ A project is more than a task list or a transcript. It is an ideal becoming
139
+ real through three nested worlds.
140
+
141
+ **Ideal World (道心)** names the outcome worth pursuing. **Inner World (内景)**
142
+ gives that intent shape in repository artifacts. **Outer World (现世)** asks
143
+ whether the shaped work is true where it must actually operate.
144
+
145
+ > 道心立意,内景成形,现世验真。
146
+
147
+ The worlds nest from the inside out. Implementation contains the ideal it
148
+ serves, and deployment contains both. This is an engineering relationship, not
149
+ just a metaphor: when an inner world changes, conclusions from an outer world
150
+ no longer have the same foundation and must be proven again.
151
+
152
+ Humans own approval and acceptance. Agents own continuation: they read the
153
+ contracts, the ledger, and Git facts; preserve concurrent work; execute one
154
+ safe action; and reobserve only after something changes. The context belongs to
155
+ the project, not to a fleeting conversation.
156
+
157
+ ## Further Reading
158
+
159
+ - [Getting Started](https://github.com/shazhou-ww/silvermoon/blob/936bf4af71450499aebe4ccac7562ce583f34f8b/docs/getting-started.md) — installation, configuration,
160
+ and the first idea.
161
+ - [Core Concepts](https://github.com/shazhou-ww/silvermoon/blob/936bf4af71450499aebe4ccac7562ce583f34f8b/docs/core-concepts.md) — project ownership, the three
162
+ worlds, revisions, and decision boundaries.
163
+ - [Operating Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/936bf4af71450499aebe4ccac7562ce583f34f8b/docs/operations.md) — navigation, creation,
164
+ publication, hygiene, and continuation.
165
+ - [Technical Reference](https://github.com/shazhou-ww/silvermoon/blob/936bf4af71450499aebe4ccac7562ce583f34f8b/docs/reference.md) — storage, derived state, CLI
166
+ reports, validation targets, and schemas.
167
+ - [Maintaining Silvermoon](https://github.com/shazhou-ww/silvermoon/blob/936bf4af71450499aebe4ccac7562ce583f34f8b/docs/maintaining.md) — development checks,
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 --save-dev silvermoon
22
- npx skills add ./node_modules/silvermoon/skills --skill silvermoon --agent github-copilot --yes --copy
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
- npx silvermoon create-idea --json
42
- npx silvermoon whats-next <idea> --json
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
 
@@ -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 (道心)** is the canonical intent in `Idea.md`. It defines the
31
- outcome, scope, and constraints without prescribing implementation.
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 (内景)** is the canonical implementation contract in
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 (现世)** is the canonical deployment contract in `Deployment.md`
37
- plus evidence that the implementation is true where it must operate.
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` observes the configured remote primary and returns the exact
66
- `observedPrimaryCommit` used for its guidance. Writers use that commit as the
67
- expected shared tip. If primary moves, they fetch and reobserve rather than
68
- replaying a stale decision. This is coordination through ordinary Git, not a
69
- distributed lock.
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.
@@ -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
- ## Install The Project Dependency
12
+ ## Run Silvermoon And Register Its Skill
13
13
 
14
- Install Silvermoon in the repository so every collaborator uses the declared
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 --save-dev silvermoon
18
+ npm install --global silvermoon
19
+ silvermoon whats-next
20
+ # or: npx silvermoon@<version> whats-next
19
21
  ```
20
22
 
21
- Register the canonical packaged skill through the supported `skills` interface:
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 ./node_modules/silvermoon/skills --skill silvermoon --agent github-copilot --yes --copy
27
+ npx skills add <path-to-running-silvermoon>/skills --skill silvermoon --agent universal --yes --copy
25
28
  ```
26
29
 
27
- Silvermoon diagnoses whether the project dependency, installed package, and
28
- repository-local skill match. It does not install dependencies or mutate skill
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
- `whats-next` reports both the effective tag and its source.
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
- npx silvermoon create-idea --json
73
- npx silvermoon create-idea --language zh-cn --json
77
+ silvermoon create-idea
78
+ silvermoon create-idea --language zh-cn
74
79
  ```
75
80
 
76
- The command first applies the same repository, worktree, conflict, and ancestry
77
- hygiene used by navigation. When those checks pass, it creates one untracked
78
- idea scaffold with `Idea.md`, `Implementation.md`, `Deployment.md`,
79
- `ledger.md`, and `status.yaml`. It never stages, commits, pushes, or records a
80
- human decision.
81
-
82
- Replace the guidance in `Idea.md` with the desired outcome, scope, and
83
- constraints. Keep implementation and deployment placeholders synchronized
84
- until their lifecycle phases. Review every generated path and publish the
85
- prepared idea through ordinary Git.
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
- npx silvermoon whats-next <idea> --json
101
+ silvermoon whats-next <idea>
91
102
  ```
92
103
 
93
- The report contains one highest-priority action. Execute only that action. Run
94
- the same command again only after an expected repository change, an unexpected
95
- input change, or a newly arrived external result.
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, stage it,
103
- validate the staged snapshot, and publish a normal non-force commit.
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
@@ -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 GitHub Copilot skill copy
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 `.github/skills/silvermoon` directory is a
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,
@@ -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
- continues a single active idea, or reports that a new idea can be created. A
16
- selector is either a canonical uppercase ULID or an exact, unique,
17
- case-sensitive alias.
18
-
19
- Each successful report includes the effective `language` tag and its `idea`,
20
- `project`, `global`, or `default` source. Its action guidance requires the
21
- Agent to use that language for world entries, same-world supporting artifacts,
22
- the ledger, and user-facing explanations. Commands, identifiers, schema fields,
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 first checks the configured primary branch, merge conflicts,
26
- worktree changes, and local/remote primary ancestry. It may fetch and inspect,
27
- but it never edits, checks out, merges, commits, stashes, deletes, resets,
28
- fast-forwards, or pushes.
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
- npx silvermoon create-idea --json
36
- npx silvermoon create-idea --language zh-cn --json
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
- ## Execute One Action
53
-
54
- Treat the command, request, `observedPrimaryCommit`, selected idea, and action
55
- as one immutable observation. Execute only the highest-priority action.
56
-
57
- Repository hygiene actions take precedence over lifecycle work. Inspect exact
58
- staged, unstaged, untracked, and conflicted paths; preserve unknown and
59
- concurrent work. Never force-push, use `reset --hard`, broadly clean the
60
- worktree, or silently rewrite history to satisfy guidance.
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 entry. `Implementation.md` and `Deployment.md`
68
- contain `## Steps` and `## Acceptance criteria`. Every item uses a stable
69
- level-three heading:
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
- npx silvermoon check --worktree --json
117
+ silvermoon check --worktree
98
118
  git add .silvermoon/ideas/<ULID>/status.yaml
99
- npx silvermoon check --staged --json
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