silvermoon 0.1.0 → 0.1.3-rc.1

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.
@@ -48,10 +48,39 @@ The repository URL is credential-free, canonical shared state. Credentials,
48
48
  named remotes, and URL rewrites remain local Git concerns. Silvermoon metadata
49
49
  paths are fixed and cannot be overridden by configuration.
50
50
 
51
- ## Configure Preferred Language
51
+ ## Add Optional Project Phase Guidance
52
+
53
+ Projects with additional lifecycle requirements may add any of these fixed
54
+ files:
55
+
56
+ ```text
57
+ .silvermoon/guidance/
58
+ |-- preparing.md
59
+ |-- implementing.md
60
+ `-- deploying.md
61
+ ```
62
+
63
+ Each file is optional, repository-owned Markdown for only its named phase.
64
+ `whats-next <idea>` returns the applicable file only after that actionable
65
+ phase becomes the highest-priority next action. A successful `create-idea`
66
+ returns only preparing guidance after local preflight and before relying on
67
+ the new scaffold. The report includes the fixed path, exact Git blob
68
+ `contentRevision`, and captured content, so consumers must not reread the file.
69
+
70
+ Keep each file at most 32 KiB of valid UTF-8 without a BOM or NUL byte, with at
71
+ least one non-whitespace character. Use regular files and no extra entries in
72
+ the directory. Lifecycle commands validate only the phase they are about to
73
+ return; every `check` target validates the complete directory.
74
+
75
+ Guidance is additive and lower priority than Silvermoon's canonical workflow.
76
+ Put every applicable idea-specific requirement into the current world contract
77
+ and matching ledger entries. The guidance itself is not a fourth contract,
78
+ approval, acceptance, status fact, or completion evidence.
79
+
80
+ ## Configure Content And Output Language
52
81
 
53
82
  All language values are canonical BCP 47 tags such as `en` or `zh-CN`.
54
- Silvermoon resolves natural-language output in this order:
83
+ Silvermoon resolves the language for project-owned content in this order:
55
84
 
56
85
  1. optional idea `status.yaml` `language`;
57
86
  2. optional project `.silvermoon/config.yaml` `preferredLanguage`;
@@ -67,7 +96,23 @@ preferredLanguage: zh-CN
67
96
 
68
97
  Inherited values remain dynamic and are not copied into an idea. Use
69
98
  `create-idea --language <tag>` only when the new idea needs a stable override.
70
- The shared observation reports the resolved non-empty language tag.
99
+ That command continues to accept any canonical BCP 47 tag.
100
+
101
+ For one invocation's Silvermoon-owned output, `whats-next` and `check` accept
102
+ only the built-in `en-US` and `zh-CN` locales. Input casing is normalized, so
103
+ `EN-us` and `zh-cn` are accepted. This override has higher display precedence
104
+ than idea, project, or user content language and is never persisted:
105
+
106
+ ```sh
107
+ silvermoon whats-next <idea> --language zh-CN
108
+ silvermoon check --worktree --language en-US
109
+ ```
110
+
111
+ Every observation reports the actual built-in locale as `outputLanguage`.
112
+ When configuration is available, `configuration.preferredLanguage` remains
113
+ the resolved content language and can therefore differ from `outputLanguage`.
114
+ Without a temporary override, Chinese content tags use `zh-CN` output and all
115
+ other content tags use the built-in `en-US` output.
71
116
 
72
117
  ## Create The First Idea
73
118
 
@@ -82,7 +127,10 @@ The command requires the configured primary branch and upstream plus a clean
82
127
  local worktree. It does not fetch or require local HEAD to match the remote
83
128
  tip. When those checks pass, it creates one untracked idea scaffold with
84
129
  `Idea.md`, `Implementation.md`, `Deployment.md`, `ledger.md`, and
85
- `status.yaml`. It never stages, commits, pushes, or records a human decision.
130
+ `status.yaml`. If valid preparing guidance exists, the success report includes
131
+ its snapshot-bound content. Invalid preparing guidance stops before any
132
+ scaffold path is written. The command never stages, commits, pushes, or records
133
+ a human decision.
86
134
 
87
135
  Replace the guidance in the `Idea.md` ideal contract with the desired outcome,
88
136
  scope, and constraints. Keep the `Implementation.md` inner implementation
@@ -62,4 +62,7 @@ Use [npm package releases](./npm-package-releases.md) for trusted publishing,
62
62
  tag rules, release validation, and failure recovery. Publishing occurs only
63
63
  through `.github/workflows/publish-npm.yml` from an immutable
64
64
  `npm/silvermoon/v<version>` tag whose commit is reachable from `origin/main`.
65
- Never publish locally or add an npm token.
65
+ The workflow generates both package READMEs in an isolated staging tree,
66
+ validates and publishes one tarball, then checks its registry integrity,
67
+ package-level README, provenance, and commit-pinned jsDelivr assets. Never
68
+ publish locally or add an npm token.
@@ -11,7 +11,7 @@ The current release mapping is:
11
11
  | --- | --- | --- |
12
12
  | `silvermoon` | `silvermoon` | `.` |
13
13
 
14
- A stable tag such as `npm/silvermoon/v0.1.1` publishes with the npm `latest`
14
+ A stable tag such as `npm/silvermoon/v0.1.3` publishes with the npm `latest`
15
15
  dist-tag. A named prerelease such as `npm/silvermoon/v0.2.0-beta.1` publishes
16
16
  with the `beta` dist-tag. Numeric-only prerelease channels are intentionally
17
17
  rejected.
@@ -76,12 +76,12 @@ the release namespace.
76
76
  5. Fetch the current primary branch and tags.
77
77
  6. Create the package-specific tag at `origin/main` and push that exact tag.
78
78
 
79
- For `silvermoon@0.1.1`:
79
+ For `silvermoon@0.1.3`:
80
80
 
81
81
  ```sh
82
82
  git fetch origin main --tags
83
- git tag npm/silvermoon/v0.1.1 origin/main
84
- git push origin refs/tags/npm/silvermoon/v0.1.1
83
+ git tag npm/silvermoon/v0.1.3 origin/main
84
+ git push origin refs/tags/npm/silvermoon/v0.1.3
85
85
  ```
86
86
 
87
87
  The tag version must exactly equal [`package.json`](../package.json). The
@@ -92,13 +92,27 @@ The [`publish-npm.yml`](../.github/workflows/publish-npm.yml) workflow then:
92
92
  1. verifies the tagged commit is reachable from refreshed `origin/main`;
93
93
  2. installs the frozen pnpm dependencies;
94
94
  3. runs the allowlisted release planner and confirms the version is absent
95
- from npm;
95
+ from npm, or records that an exact-version rerun must skip publication;
96
96
  4. runs `pnpm test:unit`, `pnpm test:contract`, `pnpm test:integration`, and
97
97
  `pnpm check:skills`;
98
- 5. runs the selected package's `npm run pack:check` and
99
- `npm run test:e2e`; and
100
- 6. publishes only the selected directory with provenance and the derived npm
101
- dist-tag.
98
+ 5. creates an isolated `git archive` staging tree and generates commit-pinned
99
+ English and Chinese package READMEs without changing the tagged checkout;
100
+ 6. records the tagged commit as `gitHead` in the isolated package manifest,
101
+ creates one tarball, records its path, SHA-256, npm shasum, registry
102
+ integrity, and complete file list, then passes that same file to
103
+ `npm run pack:check` and `npm run test:e2e`; the pre-publication check
104
+ requires the tarball manifest to contain that exact commit;
105
+ 7. publishes that exact tarball with provenance and the derived npm dist-tag
106
+ when the version was absent; and
107
+ 8. runs `verify-npm-release.mjs` until the registry is consistent or the
108
+ bounded retry window expires.
109
+
110
+ The post-publication verifier requires the exact version and dist-tag, matching
111
+ tarball and registry `gitHead`, registry integrity and tarball bytes,
112
+ package-level README, both tarball READMEs, npm publish and SLSA provenance
113
+ attestations, tagged Git commit, and commit-pinned jsDelivr SVG responses to
114
+ match the candidate. A successful run prints `VERIFY_NPM_RELEASE_OK` with the
115
+ verified identities.
102
116
 
103
117
  Release runs are serialized within this repository. The registry preflight and
104
118
  `npm publish` cannot form one cross-system transaction, so an external
@@ -110,13 +124,20 @@ duplicate publication without replacing the existing version.
110
124
  Publication stops before `npm publish` when the tag is malformed, the release
111
125
  key is unknown, the package is private, the package name or version differs
112
126
  from the mapping and tag, the npm publish configuration is not public npmjs,
113
- the commit is outside `origin/main`, the version already exists, registry state
114
- cannot be verified, or validation fails.
127
+ the commit is outside `origin/main`, registry state cannot be observed, or
128
+ validation fails. If the exact version already exists during a workflow rerun,
129
+ the publish step is skipped and the verifier must prove that registry content
130
+ is byte-identical to the rebuilt candidate and carries the expected provenance.
131
+ Any mismatch is a hard failure.
115
132
 
116
133
  For a transient GitHub or registry failure before publication, rerun the same
117
134
  workflow run. Do not move or recreate the tag. For a source, manifest, or
118
135
  validation failure, make a new commit on `main`, choose a new version, and push
119
136
  a new tag after the fix is merged. npm versions and release tags are immutable.
137
+ For a transient verification failure after publication, rerun only the failed
138
+ workflow job when GitHub offers that option; the planner recognizes the
139
+ existing version, skips `npm publish`, and performs the same complete
140
+ verification again.
120
141
 
121
142
  ## Add another package
122
143
 
@@ -9,6 +9,7 @@ publishing Silvermoon ideas.
9
9
  npx silvermoon whats-next
10
10
  npx silvermoon whats-next 01M36QGPNTXEPP61DA4KP4AVZF
11
11
  npx silvermoon whats-next publish-documentation --json
12
+ npx silvermoon whats-next publish-documentation --language zh-CN
12
13
  ```
13
14
 
14
15
  Without a selector, Silvermoon asks for a choice among multiple active ideas,
@@ -17,10 +18,13 @@ one, or many active ideas: only a selector chooses work. Completed and abandoned
17
18
  ideas are excluded from default candidates. A selector is either a canonical
18
19
  uppercase ULID or an exact, unique, case-sensitive alias.
19
20
 
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
- protocol markers, and verbatim tool output retain their original form.
21
+ The shared observation exposes the resolved content preference as
22
+ `configuration.preferredLanguage` and the built-in rendering locale as
23
+ `outputLanguage`. Instructions use the content preference for world entries,
24
+ same-world supporting artifacts, and the ledger. A caller may use
25
+ `--language en-US|zh-CN` to override only Silvermoon-owned output for one
26
+ `whats-next` invocation. Commands, identifiers, schema fields, protocol
27
+ markers, and verbatim tool output retain their original form.
24
28
 
25
29
  Every invocation follows three strict layers. It first checks Git,
26
30
  configuration compatibility, and `.agents/skills/silvermoon`. It then checks
@@ -29,6 +33,15 @@ Only after those checks pass does it fetch primary, compare ancestry, and
29
33
  route idea work. It never edits, checks out, merges, commits, stashes, deletes,
30
34
  resets, fast-forwards, or pushes.
31
35
 
36
+ When a selector resolves to an actionable phase and synchronization is ready,
37
+ Silvermoon reads only `.silvermoon/guidance/<phase>.md` from the same Git
38
+ snapshot. Missing guidance preserves the previous report shape. Valid guidance
39
+ appears as a separate `observation.guidance` value after canonical
40
+ instructions in text output. Invalid current-phase guidance returns a
41
+ `phase-guidance-invalid` observation with remediation instead of lifecycle
42
+ instructions. Bare navigation, unknown selectors, terminal ideas, and any
43
+ higher-priority setup, hygiene, fetch, or ancestry block do not read guidance.
44
+
32
45
  ## Create An Idea
33
46
 
34
47
  Explicit creation uses:
@@ -46,12 +59,16 @@ Creation checks project readiness, then requires the configured primary branch
46
59
  and upstream plus a clean worktree. It does not fetch, compare ancestry, or
47
60
  require local HEAD to be aligned with the remote tip. Its preparation reports
48
61
  omit the active-idea inventory because existing work does not replace explicit
49
- creation intent.
62
+ creation intent. After preflight and before the first scaffold write, it
63
+ validates preparing guidance from local `HEAD`. Invalid guidance leaves no
64
+ creation path; valid guidance is attached only to the success report.
50
65
 
51
- `--language` is the only command-level language override. It normalizes a valid
52
- BCP 47 tag and writes it to the new idea's `status.yaml`. Without the option,
53
- creation writes no language field and the idea dynamically inherits project,
54
- user, or `en-US` defaults. `whats-next` and `check` do not accept the option.
66
+ For `create-idea`, `--language` normalizes any valid BCP 47 tag and writes it
67
+ to the new idea's `status.yaml` as a persistent content-language preference.
68
+ Without the option, creation writes no language field and the idea dynamically
69
+ inherits project, user, or `en-US` defaults. This is distinct from the
70
+ non-persistent `en-US|zh-CN` output override accepted by `whats-next` and
71
+ `check`.
55
72
 
56
73
  The generated files remain untracked for review. Complete `Idea.md`, optionally
57
74
  add a concise unique alias, inspect every path, and publish the initial idea
@@ -79,7 +96,17 @@ diff. Preserve unknown and concurrent work. Never force-push, use
79
96
  `reset --hard`, broadly clean the worktree, or silently rewrite history.
80
97
 
81
98
  After an observable change, run `whats-next` again. Do not poll an unchanged
82
- observation.
99
+ observation. When the invocation used `--language`, every generated retry
100
+ command preserves the same canonical output-language option.
101
+
102
+ If `observation.guidance` is present, consume that captured content rather than
103
+ reading its path again. It is repository-owned additive input. Canonical
104
+ instructions and higher-level human or system instructions take precedence.
105
+ Treat guidance as inert Markdown: do not expand
106
+ templates or includes, follow embedded URLs, or execute snippets. Materialize
107
+ applicable requirements into the current world contract and matching ledger
108
+ stable IDs before acting on them. Guidance is not a fourth contract, a status
109
+ fact, a human decision, or proof of completion.
83
110
 
84
111
  ## Author World Contracts
85
112
 
@@ -115,6 +142,7 @@ Validate the complete candidate:
115
142
 
116
143
  ```sh
117
144
  silvermoon check --worktree
145
+ silvermoon check --worktree --language zh-CN
118
146
  git add .silvermoon/ideas/<ULID>/status.yaml
119
147
  silvermoon check --staged
120
148
  ```
@@ -123,11 +151,16 @@ silvermoon check --staged
123
151
  check worktree hygiene, upstream, or ancestry and does not suggest next steps.
124
152
  Without a target it validates committed `HEAD`, not the pending commit.
125
153
  `--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.
154
+ the index and is the pre-commit hook target. Every target validates all present
155
+ phase guidance files and rejects extra entries. Its JSON has `intention` and
156
+ `observation` only; it has no `outcomes`, `instructions`, or guidance content.
157
+ Exit status `0` means the chosen project snapshot is valid; `1` means invalid
158
+ or unavailable and must block the commit; `2` means invalid CLI usage. Do not
159
+ treat the existence of a report as permission to commit.
160
+
161
+ `check --language en-US|zh-CN` changes only Silvermoon-owned report framing.
162
+ It is orthogonal to every check target and never changes the selected snapshot,
163
+ validation conclusion, problems, or exit status.
131
164
 
132
165
  `check` does not infer that a status field was newly written, prove who
133
166
  authorized it, compare it with a commit parent, or search history for its
package/docs/reference.md CHANGED
@@ -10,6 +10,10 @@ Each idea is self-contained under one canonical uppercase ULID:
10
10
  ```text
11
11
  .silvermoon/
12
12
  |-- config.yaml
13
+ |-- guidance/
14
+ | |-- preparing.md
15
+ | |-- implementing.md
16
+ | `-- deploying.md
13
17
  `-- ideas/
14
18
  `-- 01M36QGPNTXEPP61DA4KP4AVZF/
15
19
  |-- status.yaml
@@ -35,6 +39,39 @@ explicit file is an error rather than a silent fallback.
35
39
  The repository configuration accepts optional `preferredLanguage` after
36
40
  `primaryBranch`. Stored language values are canonical BCP 47 tags.
37
41
 
42
+ ## Phase Guidance
43
+
44
+ The three files under `.silvermoon/guidance/` are optional fixed conventions,
45
+ not configuration fields. They are additive project input, not a fourth
46
+ contract, status fact, decision, or proof of completion:
47
+
48
+ | Phase | Repository-relative path |
49
+ | --- | --- |
50
+ | `preparing` | `.silvermoon/guidance/preparing.md` |
51
+ | `implementing` | `.silvermoon/guidance/implementing.md` |
52
+ | `deploying` | `.silvermoon/guidance/deploying.md` |
53
+
54
+ The directory must be a regular repository-owned directory and may contain
55
+ only those entries. Each present entry must be a regular file, not a symlink,
56
+ with at most 32 KiB of raw blob bytes. Content must be valid UTF-8 without a
57
+ BOM or NUL byte and must contain a non-whitespace character. CRLF is accepted
58
+ and report content is normalized to LF. Silvermoon treats the body as inert
59
+ Markdown: it does not parse frontmatter, interpolate values, resolve includes,
60
+ fetch URLs, execute snippets, translate content, or write it to traces.
61
+
62
+ Lifecycle commands use on-demand validation. Selected `whats-next` reads only
63
+ the selected actionable phase after project, local repository, fetch, and
64
+ ancestry readiness. `create-idea` reads only preparing guidance after local
65
+ preflight and before writing any scaffold path. Errors in another phase and
66
+ extra directory entries do not preempt those commands. Bare navigation,
67
+ selector misses, completed or abandoned ideas, and readiness blocks do not
68
+ read or return guidance.
69
+
70
+ All `check` targets use complete validation: they reject any invalid phase file
71
+ or extra entry in their selected HEAD, worktree, index, commit, or remote
72
+ snapshot. A missing directory or missing phase file is valid. Checks never
73
+ return guidance content.
74
+
38
75
  ## World Revisions
39
76
 
40
77
  Each world is an opaque Git tree:
@@ -67,13 +104,21 @@ world revision and does not change lifecycle decisions. Explicit
67
104
  `abandoned: false`, derived state, criteria mirrors, source locators, unknown
68
105
  keys, YAML aliases or anchors, comments, and noncanonical YAML are rejected.
69
106
 
70
- Effective language resolves as `idea language > project preferredLanguage >
71
- user preferredLanguage > en-US`. Every complete observation exposes the
72
- resolved non-empty tag as `configuration.preferredLanguage`. Missing idea
73
- language remains dynamically inherited and is never written back. Dialogue
74
- project status presents this effective value as `interaction language`
75
- (`交互语言`), meaning the language Silvermoon should use to interact with the
76
- user rather than a programming language used by the project.
107
+ Effective content language resolves as `idea language > project
108
+ preferredLanguage > user preferredLanguage > en-US`. Every complete
109
+ observation exposes the resolved non-empty tag as
110
+ `configuration.preferredLanguage`. Missing idea language remains dynamically
111
+ inherited and is never written back. Dialogue project status presents this
112
+ effective value as `content language` (`内容语言`).
113
+
114
+ Every command observation also exposes an independent `outputLanguage`.
115
+ Silvermoon's built-in output locales are exactly `en-US` and `zh-CN`.
116
+ `whats-next --language <tag>` and `check --language <tag>` normalize casing
117
+ before enforcing that allowlist, apply only to the current invocation, and
118
+ take display precedence over content language. Without an explicit output
119
+ override, content tags beginning with `zh` select `zh-CN`; every other content
120
+ tag selects `en-US`. Output selection never writes configuration or idea
121
+ status.
77
122
 
78
123
  State is derived in order:
79
124
 
@@ -88,9 +133,9 @@ State is derived in order:
88
133
  ## Public Commands
89
134
 
90
135
  ```sh
91
- silvermoon whats-next [idea] [--trace <file.trace.jsonl>]
136
+ silvermoon whats-next [idea] [--language <en-US|zh-CN>] [--trace <file.trace.jsonl>]
92
137
  silvermoon create-idea [--language <tag>] [--trace <file.trace.jsonl>]
93
- silvermoon check [--remote | --commit <revision> | --staged | --worktree] [--trace <file.trace.jsonl>]
138
+ silvermoon check [--remote | --commit <revision> | --staged | --worktree] [--language <en-US|zh-CN>] [--trace <file.trace.jsonl>]
94
139
  ```
95
140
 
96
141
  `whats-next` and `create-idea` build one dialogue envelope:
@@ -100,19 +145,24 @@ silvermoon check [--remote | --commit <revision> | --staged | --worktree] [--tra
100
145
  "intention": {
101
146
  "command": "whats-next",
102
147
  "args": {
103
- "idea": null
148
+ "idea": null,
149
+ "language": null
104
150
  }
105
151
  },
106
- "observation": {},
152
+ "observation": {
153
+ "outputLanguage": "en-US"
154
+ },
107
155
  "outcomes": [],
108
156
  "instructions": ""
109
157
  }
110
158
  ```
111
159
 
112
- - `intention` contains the command and normalized business arguments. Output
113
- format is not part of the intention.
160
+ - `intention` contains the command and normalized business arguments. For
161
+ `whats-next` and `check`, `args.language` is the canonical temporary output
162
+ override or `null`. Output format is not part of the intention.
114
163
  - `observation` describes the reliable facts for the requested command and
115
- intent, not a mandatory global idea inventory.
164
+ intent, not a mandatory global idea inventory. `outputLanguage` is present
165
+ even when Git, configuration, or a requested snapshot is unavailable.
116
166
  - `outcomes` records only high-level repository side effects actually
117
167
  attempted by this invocation. Each item has `type`, `status` (`success` or
118
168
  `failure`), and `summary`. An empty array means no side effect was attempted.
@@ -120,6 +170,25 @@ silvermoon check [--remote | --commit <revision> | --staged | --worktree] [--tra
120
170
  readiness layer. A single remediation is plain text; multiple remediations
121
171
  are numbered in priority order.
122
172
 
173
+ After readiness, an actionable selected idea or successful creation may add
174
+ `guidance` to the command-specific observation:
175
+
176
+ ```json
177
+ {
178
+ "guidance": {
179
+ "phase": "implementing",
180
+ "path": ".silvermoon/guidance/implementing.md",
181
+ "contentRevision": "<git-blob-object-id>",
182
+ "content": "Repository-owned Markdown captured from the snapshot.\n"
183
+ }
184
+ }
185
+ ```
186
+
187
+ `path`, `contentRevision`, and `content` come from one Git snapshot. The object
188
+ ID follows the repository's SHA-1 or SHA-256 object format. Guidance never
189
+ appears at the top level or inside canonical `instructions`, and an absent file
190
+ does not produce an empty field.
191
+
123
192
  Default dialogue output renders the same report with concise lists under
124
193
  `## Current instruction`, `## Project status`, and `## Suggested next steps`
125
194
  (in Chinese: `## 本次指示`, `## 项目现状`, `## 下一步建议`). The optional
@@ -132,10 +201,13 @@ second reasoning path. Within the project-status section, nonempty navigation
132
201
  candidates and observed problems appear under `### Ideas you can continue` and
133
202
  `### Issues to address` (in Chinese: `### 可继续推进的想法` and
134
203
  `### 需要处理的问题`). Suggested next steps refer to these candidates without
135
- repeating their inventory. Empty sections are omitted. Dialogue exit status
136
- `0` means a trustworthy report was formed, even when it reports readiness
137
- blocks or a failed operation; `1` means an internal failure prevented a
138
- trustworthy report; `2` means invalid CLI usage.
204
+ repeating their inventory. When guidance is present, a separate
205
+ `## Project phase guidance` section follows suggested next steps, identifies
206
+ its project provenance and metadata, and blockquotes every content line.
207
+ Empty sections are omitted. Dialogue exit status `0` means a trustworthy
208
+ report was formed, even when it reports readiness blocks or a failed
209
+ operation; `1` means an internal failure prevented a trustworthy report; `2`
210
+ means invalid CLI usage.
139
211
 
140
212
  All commands accept `--trace <file.trace.jsonl>`. If the supplied path does not
141
213
  end with the exact lowercase `.trace.jsonl` suffix, Silvermoon appends it while
@@ -150,7 +222,11 @@ stdout, or stderr. The path is relative to the caller's working directory when
150
222
  not absolute. Events are buffered so a trace inside the repository cannot
151
223
  affect that invocation's worktree observation. The file is written after the
152
224
  measured command work finishes and uses exclusive creation, so an existing
153
- normalized target is never overwritten.
225
+ normalized target is never overwritten. The top command span records the
226
+ canonical output-language override or `null` for `whats-next` and `check`.
227
+
228
+ Unsupported output locales, empty values, and invalid BCP 47 tags are usage
229
+ errors with exit status `2`, before repository inspection or fetch.
154
230
 
155
231
  Observations are discriminated by command intent and `state`:
156
232
 
@@ -167,12 +243,18 @@ Observations are discriminated by command intent and `state`:
167
243
  - Selected `whats-next` returns `idea-selected` with only `selectedIdea`
168
244
  (`id`, optional `alias`, lifecycle `state`), including terminal ideas.
169
245
  Unknown selectors return `idea-not-found` with `candidates`, not a
170
- fabricated selected idea.
246
+ fabricated selected idea. An actionable selection may also contain
247
+ snapshot-bound `guidance`.
248
+ - `phase-guidance-invalid` means command readiness reached the current
249
+ actionable phase, but that phase's optional file exists and is invalid. It
250
+ contains problems and repair instructions, not lifecycle instructions or
251
+ guidance content.
171
252
  - After a successful `create-idea` preflight, `idea-created` carries
172
253
  `createdIdea` (`id`, `path`, `state: "preparing"`). This confirms
173
- pre-creation readiness, not a clean post-creation worktree. An attempted but
174
- failed scaffold returns `idea-create-failed` without `createdIdea`; preflight
175
- failures retain their setup or local preparation state.
254
+ pre-creation readiness, not a clean post-creation worktree, and may also
255
+ contain captured preparing `guidance`. An attempted but failed scaffold
256
+ returns `idea-create-failed` without `createdIdea`; preflight failures retain
257
+ their setup or local preparation state.
176
258
 
177
259
  Dialogue versions have `version.type: "worktree"`. When present, `ideas.counts` has
178
260
  `preparing`, `implementing`, `deploying`, `completed`, and `abandoned`;
@@ -196,11 +278,12 @@ never selects an idea: it always lists every active idea alongside the option
196
278
  to discuss and run `create-idea`.
197
279
 
198
280
  `create-idea` requires the configured primary branch and upstream plus a clean
199
- worktree, then creates one canonical scaffold. It does not fetch, compare
200
- remote ancestry, or require local HEAD to match the remote tip. Its optional
201
- language override is normalized before preflight and is the only command
202
- override; without it the status remains dynamically inherited. It does not
203
- stage, commit, push, or record approval.
281
+ worktree, validates optional preparing guidance from the same local `HEAD`,
282
+ then creates one canonical scaffold. It does not fetch, compare remote
283
+ ancestry, or require local HEAD to match the remote tip. Its optional
284
+ content-language choice accepts any canonical BCP 47 tag, is normalized before
285
+ preflight, and is persisted to the new idea; without it the status remains
286
+ dynamically inherited. It does not stage, commit, push, or record approval.
204
287
 
205
288
  ## Validation Targets
206
289
 
@@ -218,7 +301,8 @@ stage, commit, push, or record approval.
218
301
  Targets are mutually exclusive and never change the caller's branch, index, or
219
302
  worktree. `--remote` may fetch Git objects, but it does not produce dialogue
220
303
  outcomes. `check` validates the selected snapshot's project contract only:
221
- Git, configuration, canonical skill, idea layout, world revisions, and status.
304
+ Git, configuration, canonical skill, idea layout, world revisions, status, and
305
+ the complete optional phase guidance directory.
222
306
  Its result depends on the materialized tree, not commit parents, parent order,
223
307
  branch, merge/cherry-pick path, or retained decision reachability. A canonical
224
308
  decision revision that differs from the current world is a valid historical
@@ -233,12 +317,16 @@ Unlike dialogue commands, `check --json` contains **only** `intention` and
233
317
  {
234
318
  "intention": {
235
319
  "command": "check",
236
- "args": { "target": { "type": "staged" } }
320
+ "args": {
321
+ "target": { "type": "staged" },
322
+ "language": null
323
+ }
237
324
  },
238
325
  "observation": {
239
326
  "state": "project-ready",
240
327
  "root": "D:\\Code\\silvermoon",
241
328
  "version": { "type": "staged" },
329
+ "outputLanguage": "en-US",
242
330
  "configuration": {
243
331
  "primaryRepository": "https://example.com/owner/repository.git",
244
332
  "primaryBranch": "main",
@@ -267,6 +355,10 @@ Unlike dialogue commands, `check --json` contains **only** `intention` and
267
355
  reports `commit: null` and a problem. Staged and worktree versions only
268
356
  contain `type`.
269
357
 
358
+ `--language en-US|zh-CN` is orthogonal to every target. It changes only
359
+ Silvermoon-owned natural-language framing and leaves the target, snapshot,
360
+ validation state, problems, and exit status unchanged.
361
+
270
362
  The `check` observation has its own discriminated states:
271
363
 
272
364
  - `project-ready` has root, version, resolved configuration, idea summary,
@@ -286,9 +378,10 @@ internal failure and must fail closed; `2` means invalid CLI usage. Do not
286
378
  infer success merely from a rendered report or empty-looking output.
287
379
 
288
380
  Runtime checks verify canonical YAML, fixed paths, the three world entries,
289
- unique aliases, Git object format, current world tree resolution, and lifecycle
290
- derivation from the selected snapshot. They do not infer newly made decisions
291
- from a parent diff or audit decision provenance through history.
381
+ unique aliases, Git object format, current world tree resolution, phase
382
+ guidance structure and content, and lifecycle derivation from the selected
383
+ snapshot. They do not infer newly made decisions from a parent diff or audit
384
+ decision provenance through history.
292
385
 
293
386
  ## Schemas
294
387
 
@@ -296,3 +389,6 @@ from a parent diff or audit decision provenance through history.
296
389
  - [User configuration](../schema/v1/user-config.schema.json)
297
390
  - [Idea status](../schema/v1/idea-status.schema.json)
298
391
  - [Shared definitions](../schema/v1/definitions.schema.json)
392
+
393
+ Phase guidance has no schema or configuration key. Its fixed filenames,
394
+ Git-entry constraints, and Markdown byte rules are the complete contract.
@@ -11,8 +11,10 @@ optional transport and are not protocol state.
11
11
 
12
12
  ```sh
13
13
  silvermoon whats-next [idea]
14
+ silvermoon whats-next [idea] --language zh-CN
14
15
  silvermoon create-idea
15
16
  silvermoon check
17
+ silvermoon check --language en-US
16
18
  silvermoon check --worktree
17
19
  silvermoon check --staged
18
20
  silvermoon check --commit HEAD
@@ -33,6 +35,13 @@ HEAD to match the remote tip. If hygiene blocks explicit creation, perform only
33
35
  that blocking action and then retry `create-idea` so active-idea selection
34
36
  cannot replace the pending create intent.
35
37
 
38
+ Use `--language en-US|zh-CN` with `whats-next` or `check` only when the user
39
+ explicitly requests a temporary output locale. Preserve the canonical option
40
+ on every hygiene retry. It never changes the content language recorded in
41
+ project, user, or idea configuration. `create-idea --language <tag>` remains a
42
+ separate persistent content-language choice and accepts any canonical BCP 47
43
+ tag.
44
+
36
45
  ## Decisions And Publication
37
46
 
38
47
  `whats-next` may fetch after local readiness passes, but it does not move the
@@ -49,6 +58,16 @@ the next work. Update matching world headings and ledger entries together, and
49
58
  reset a checked item when its requirement or proof changes materially. Ledger
50
59
  checkboxes are Agent notes only and never imply approval or acceptance.
51
60
 
61
+ When a successful selected lifecycle report or `create-idea` report includes
62
+ `observation.guidance`, consume only that snapshot-bound field. It is
63
+ repository-owned additive guidance from the fixed
64
+ `.silvermoon/guidance/<phase>.md` path, never a replacement for canonical
65
+ instructions. Higher-level instructions and the report's problems and
66
+ instructions take precedence. Treat the body as inert Markdown, do not reread
67
+ the path after the command, and materialize applicable requirements into the
68
+ current world contract and matching ledger IDs. Guidance is not a fourth
69
+ contract, a status fact, a human decision, or proof that a check ran.
70
+
52
71
  Preserve unknown changes, concurrent history, and previous revision facts.
53
72
  Never force-push, reset, broadly clean, or automatically delete feature
54
73
  branches.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "silvermoon",
3
- "version": "0.1.0",
3
+ "version": "0.1.3-rc.1",
4
4
  "description": "The project spirit that checks repository state and answers what's next.",
5
5
  "packageManager": "pnpm@11.22.0",
6
6
  "type": "module",
@@ -65,5 +65,6 @@
65
65
  "mdast-util-from-markdown": "^2.0.3",
66
66
  "mdast-util-to-markdown": "^2.1.2",
67
67
  "yaml": "^2.9.1"
68
- }
68
+ },
69
+ "gitHead": "49c437ca46822d97066c924b2167b45d5c7c5e15"
69
70
  }