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.
@@ -1,111 +1,106 @@
1
1
  ---
2
2
  name: silvermoon
3
- description: "Navigate or create repository-owned ideas, execute one safe action, and reobserve only after an observable delta."
3
+ description: "Navigate or create repository-owned ideas from layered observations and ordered safe instructions."
4
4
  argument-hint: "[new | idea ULID or alias]"
5
5
  user-invocable: true
6
6
  ---
7
7
 
8
8
  # Silvermoon
9
9
 
10
- Use Silvermoon to navigate or explicitly create ideas against the configured
11
- remote primary. The CLI derives idea state and checks repository hygiene; the
12
- Agent performs suggested repository or external actions through ordinary tools
13
- and Git.
14
-
15
- ## Start From Primary
16
-
17
- 1. Preserve the user's intent when choosing the entry command:
18
- - For `/silvermoon new` or any other explicit request to create a new idea,
19
- run `silvermoon create-idea --json`.
20
- - Otherwise run `silvermoon whats-next [idea] --json`. Pass the selector only
21
- when the user supplied or previously selected one.
22
- 2. Treat the command, request, `observedPrimaryCommit`, `selectedIdea`,
23
- effective `language`, and action or created idea as one immutable
24
- observation. Do not combine guidance from different reports. Use the
25
- reported language for natural-language world content, supporting artifacts,
26
- ledger text, and user-facing explanations; preserve commands, identifiers,
27
- schema fields, protocol markers, and verbatim tool output.
28
- 3. Read the complete `onboarding` doctor report. It lists every requirement,
29
- status, blocking flag, dependency, structured remediation, recommended
30
- action, and recheck command. For `adopt-silvermoon`, execute only the
31
- recommended explicit remediation (or safely resolve its conflict), then
32
- recheck; do not route idea work while blocking findings remain.
33
- 4. Execute only the highest-priority action. Do not skip worktree, conflict,
34
- sync, or selection guidance to reach a later idea-state action. An explicit
35
- create request is not idea selection: after resolving a blocking hygiene
36
- action, retry `create-idea`, not selector-less `whats-next`.
37
-
38
- `whats-next` may fetch and inspect. It never checkout, merges, edits, commits,
39
- stashes, deletes, resets, fast-forwards, or pushes. `create-idea` runs the same
40
- hygiene preflight and, only when it passes, creates the structured idea scaffold.
41
- Dependency installation and skill registration are separate explicit
42
- operations. The packaged skill is canonical, while registration and updates
43
- belong to the supported `npx skills add` interface. Silvermoon reports
44
- configuration and skill findings but owns no onboarding mutation command.
10
+ Use Silvermoon to navigate or create ideas against the configured primary.
11
+ The CLI observes repository and lifecycle state; the Agent performs instructed
12
+ repository or external actions with ordinary tools and Git.
13
+
14
+ ## Choose And Run The Command
15
+
16
+ - `/silvermoon new` and other explicit new-idea requests use
17
+ `silvermoon create-idea`. Otherwise use `silvermoon whats-next [idea]`, passing
18
+ a selector only when the user supplied or previously selected it.
19
+ - Bare `whats-next` lists active ideas and offers creation, even when exactly one idea is active.
20
+ Never infer selection; require an explicit ULID or alias.
21
+ - Use `--json` only when a programmatic consumer needs the envelope.
22
+ - Treat each command's `intention`, `observation`, `outcomes`, and `instructions`
23
+ as one report. Read every problem and all ordered instructions; never combine
24
+ reports.
25
+ `project-setup-required` blocks repository work, `repository-sync-required`
26
+ blocks idea routing, and `repository-preparation-required` blocks creation.
27
+ Reobserve after resolving a blocker or making an expected change.
28
+ - Markdown is a rendering of the report, not a second decision model. A
29
+ selected idea reports its lifecycle state; creation reports its new identity.
30
+
31
+ `whats-next` may fetch and inspect but never changes files, branches, index, or
32
+ refs. `create-idea` requires the configured primary branch and upstream plus a
33
+ clean worktree; it does not fetch or compare ancestry. The target does not need
34
+ a package manifest, package manager, Silvermoon dependency, or `node_modules`.
35
+ The packaged skill is canonical; register it at `.agents/skills/silvermoon`
36
+ with the supported `npx skills add` universal target. Silvermoon reports setup
37
+ problems but does not repair them.
38
+
39
+ `check` validates only a project snapshot; it does not navigate ideas or check
40
+ repository synchronization. Default `check` validates committed `HEAD`;
41
+ `--worktree` validates the full candidate and `--staged` the index. Its JSON
42
+ contains `intention` and `observation` only. Exit `0` means valid, `1` invalid
43
+ or unavailable, and `2` invalid usage. Never commit unless the relevant check
44
+ exits `0`.
45
45
 
46
46
  ## Preserve Work
47
47
 
48
- - Read exact staged, unstaged, and untracked diffs before deciding ownership.
49
- - Preserve unknown, unrelated, or user-authored changes. Isolate them in
50
- another worktree or use an explicitly described stash only when needed.
51
- - Delete only paths created by the current operation or paths the user names
52
- after reviewing the current diff.
53
- - Never use force-push, `reset --hard`, broad clean commands, or silent history
54
- rewrites to satisfy guidance.
55
- - Publish with the observed primary tip as the expected remote tip. On rejection
56
- or concurrent movement, fetch and call `whats-next` again; never replay a stale
57
- approval or acceptance automatically.
58
-
59
- ## Execute Actions
60
-
61
- - `select-active-idea`: show the ordered candidates and obtain one explicit
62
- ULID or alias selection.
63
- - `continue-active-idea`: call `whats-next <id>` to obtain state guidance.
64
- - `create-idea`: this action is internal to the explicit `create-idea` command's
65
- preflight; do not replace the user's create intent with active-idea
66
- selection. After hygiene passes, the command creates one self-contained idea
67
- with structured `Idea.md`, `Implementation.md`, `Deployment.md`, and
68
- `ledger.md` entries plus alias-less `status.yaml`. It never stages, commits,
69
- pushes, or records a decision. Review every generated path before
70
- publication. During initial preparation, replace the `Idea.md` guidance with
71
- the requested Ideal World contract, but keep the Implementation, Deployment,
72
- and matching ledger placeholders synchronized until their lifecycle actions.
73
- An Agent may add a concise, unique alias derived from the user's request;
74
- do not interrupt the user only to ask them to name it.
75
- When the user explicitly requests a stable language for the new idea, pass
76
- `--language <tag>`; otherwise omit it so the idea dynamically inherits the
77
- project, user, or `en-US` default. Never add a language override to
78
- `whats-next` or `check`.
79
- - `switch-to-primary`, `resolve-conflicts`, `inspect-worktree-changes`,
80
- `fast-forward-primary`, `integrate-primary`, `publish-primary`: perform the
81
- exact Git hygiene step without discarding either history or unknown work.
82
- - `prepare-idea`: edit `Idea.md` and supporting files in the Ideal World
83
- (道心). Supporting files must serve `Idea.md`, never replace it as a second
84
- contract. After lifecycle hygiene, use the reported `ledgerPath` to resume
85
- relevant unfinished work. After explicit approval, write the reported
86
- `idealRevision` to `approvedRevision`.
87
- - `implement-idea`: edit `Implementation.md`, its supporting Inner World
88
- (内景) files, and repository deliverables. Do not change the nested Ideal
89
- World unless the ideal truly changed and should return to preparing. After
90
- lifecycle hygiene, use the reported `ledgerPath` to resume relevant
91
- unfinished work. After explicit acceptance, write the reported
92
- `implementationRevision` to `implementationAcceptedRevision`.
93
- - `deploy-idea`: use `Deployment.md` and its supporting Outer World (现世)
94
- files to drive and verify the external world. Do not change repository
95
- deliverables as deployment work or modify a nested world unless that earlier
96
- contract truly changed. Publish a newly authored or materially changed
97
- deployment contract first, reobserve its stable `deploymentRevision`, then
98
- execute external checks against that revision and record their completion in
99
- the ledger. After lifecycle hygiene, use the reported `ledgerPath` to resume
100
- relevant unfinished work. After explicit acceptance, write the reported
101
- `deploymentRevision` to `deploymentAcceptedRevision`.
102
- - `review-abandoned`: keep `abandoned: true`, remove it after an explicit human
103
- decision, or create a different idea.
104
- - `review-completed`: revise the existing idea definition or create a new idea.
105
-
106
- ## Author The Three Worlds
107
-
108
- Every idea uses this fixed structure:
48
+ - Inspect all staged, unstaged, and untracked changes before acting. Preserve
49
+ unknown, unrelated, or user-authored work; isolate it or use only an
50
+ explicitly described stash when necessary.
51
+ - Never use force-push, reset, broad clean, or silent history rewrites. Delete
52
+ only operation-owned paths or paths the user explicitly names.
53
+ - Follow reported synchronization steps in order and use the reported primary
54
+ tip as the expected remote tip. On rejection or concurrent movement, preserve
55
+ both histories and reobserve; never replay a stale decision.
56
+
57
+ ## Create And Publish An Idea
58
+
59
+ `create-idea` creates only the scaffold: `Idea.md`, `Implementation.md`,
60
+ `Deployment.md`, `ledger.md`, and `status.yaml`. It never stages, commits,
61
+ pushes, or records a decision. Preserve explicit creation intent through
62
+ hygiene retries: retry `create-idea`, not bare `whats-next`.
63
+
64
+ During preparation, complete the `Idea.md` ideal contract. Keep the
65
+ Implementation, Deployment, and matching ledger placeholders synchronized
66
+ until their lifecycle actions. Review every generated path and validate the
67
+ candidate, then commit and publish it to configured primary through the normal
68
+ non-force path before asking the user to review or approve it. Verify the commit
69
+ is reachable from refreshed primary and reobserve the exact `idealRevision`.
70
+ If publication requires a pull request, wait until it reaches primary. If
71
+ publication is blocked, say the candidate is not yet available for cross-device
72
+ review; never ask for approval of unpublished content. Publication is not
73
+ approval and must not change `status.yaml`.
74
+
75
+ An Agent may derive a concise, unique alias; do not ask for a name solely for
76
+ the alias. Pass `--language <tag>` only when the user explicitly requests a
77
+ stable language override. Do not use that option with `whats-next` or `check`.
78
+
79
+ ## Continue The Selected Idea
80
+
81
+ Use the reported `ledgerPath` after lifecycle hygiene and continue only the
82
+ selected world's unfinished work:
83
+
84
+ - **Preparing:** Edit `Idea.md` and supporting Ideal World (理想世界) files.
85
+ Supporting files serve the contract, not replace it. After explicit approval,
86
+ record the reported `idealRevision` as `approvedRevision`.
87
+ - **Implementing:** Edit `Implementation.md`, supporting Inner World (主体世界)
88
+ files, and repository deliverables. Change the ideal only if it truly changed
89
+ and the idea must return to preparing. After explicit acceptance, record the
90
+ reported `implementationRevision` as `implementationAcceptedRevision`.
91
+ - **Deploying:** Use `Deployment.md` and supporting Outer World (现实世界) files
92
+ to drive and verify external outcomes; do not change repository deliverables.
93
+ Publish a new or materially changed deployment contract first, reobserve its
94
+ stable `deploymentRevision`, then run checks against it and record evidence
95
+ in the ledger. After explicit acceptance, record the reported
96
+ `deploymentRevision` as `deploymentAcceptedRevision`.
97
+ - **Abandoned:** Keep canonical `abandoned: true`, remove it only after an
98
+ explicit reversal, or choose another idea.
99
+ - **Completed:** Revise its definition or create a different idea.
100
+
101
+ ## Author Contracts And Continue From The Ledger
102
+
103
+ Each idea has three canonical entries:
109
104
 
110
105
  ```text
111
106
  .silvermoon/ideas/<ULID>/
@@ -119,98 +114,58 @@ Every idea uses this fixed structure:
119
114
  └── Idea.md
120
115
  ```
121
116
 
122
- `Idea.md` is the canonical Ideal World (道心) entry, `Implementation.md` is the
123
- canonical Inner World (内景) entry, and `Deployment.md` is the canonical Outer
124
- World (现世) entry: 道心立意,内景成形,现世验真. Each world may contain
125
- additional files and nested directories, but those artifacts support their
126
- same-world entry and do not define a second contract.
117
+ `Idea.md` is the Ideal World (理想世界) ideal contract, `Implementation.md` is
118
+ the Inner World (主体世界) inner implementation contract, and `Deployment.md`
119
+ is the Outer World (现实世界) real-world deployment contract. Each world may
120
+ contain supporting files, but those artifacts serve the same-world entry and
121
+ never define a second contract.
127
122
 
128
123
  In `Implementation.md` and `Deployment.md`, put plans under `## Steps` and
129
- outcome contracts under `## Acceptance criteria`. Give every step and criterion
130
- a stable level-three heading: `I-Sxx`, `I-ACxx`, `D-Sxx`, or `D-ACxx`. A
131
- criterion must describe both its observable outcome and the method that proves
132
- it; do not add a separate validation section. Keep checkboxes out of world
133
- contracts. World content changes its world revision and every containing world
134
- revision; `status.yaml` and `ledger.md` stay outside all three world trees.
135
-
136
- ## Continue From The Ledger
137
-
138
- Every idea has an Agent-owned `ledger.md` at the path reported by `whats-next`.
139
- It is operational state, not a fourth world, normative contract, or human
140
- decision. Silvermoon requires the regular file but does not parse its body or
141
- derive lifecycle state from it.
142
-
143
- Mirror stable IDs and short titles from both world contracts:
144
-
145
- ```markdown
146
- # Ledger
147
-
148
- ## Implementation
149
-
150
- ### Implementation steps
151
-
152
- - [x] **I-S01:** Completed step
153
- - [ ] **I-S02:** Remaining step
154
-
155
- ### Implementation acceptance criteria
156
-
157
- - [x] **I-AC01:** Proven criterion
158
- - [ ] **I-AC02:** Unproven criterion
159
-
160
- ## Deployment
161
-
162
- ### Deployment steps
163
-
164
- - [ ] **D-S01:** Deployment step
165
-
166
- ### Deployment acceptance criteria
167
-
168
- - [ ] **D-AC01:** Deployment criterion
169
- ```
170
-
171
- When adding or removing a world step or criterion, update the matching ledger
172
- entry in the same change. Keep its stable ID when only the title or details are
173
- refined. Add new entries unchecked. If a completed item's requirement or proof
174
- method changes materially, reset its checkbox and re-run the work or proof.
175
- Infer the next action from `whats-next`, the world contracts, and unchecked
176
- ledger entries; do not maintain duplicate Current or Next summaries.
177
- If relevant ledger entries remain unchecked, continue the reported world
178
- action. If all relevant entries are checked, their evidence remains valid, and
179
- the candidate is published, stop editing and request explicit acceptance for
180
- the exact revision reported by `whats-next`.
181
-
182
- `[x]` means only that the Agent recorded work or a check as complete. It never
183
- approves an Ideal World, accepts implementation or deployment, changes
184
- `status.yaml`, or authorizes publication. Record test names, commands,
185
- artifacts, and results in the corresponding world criterion or concise ledger
186
- notes without creating a separate evidence schema or public API contract.
187
-
188
- ## Write Status Facts
189
-
190
- Silvermoon has no approval, acceptance, or abandonment mutation commands.
191
- Update the idea's `status.yaml` with ordinary file editing:
192
-
193
- 1. Reconfirm the decision applies to the selected idea and current
194
- world revision reported by `whats-next`.
195
- 2. Add or update only the corresponding revision field, or add/remove canonical
196
- `abandoned: true` after an explicit human decision.
197
- 3. Run `silvermoon check --worktree --json` while reviewing the complete
198
- candidate, then stage it and run `silvermoon check --staged --json`.
199
- 4. Commit the status decision separately when practical, then non-force push
200
- with the observation's `observedPrimaryCommit` as expected tip.
201
-
202
- Never infer a human decision from silence, prose, Git activity, or an outer
203
- command. Old revision values remain as history and become inactive naturally
204
- when the idea folder changes.
205
-
206
- ## Advance The Loop
207
-
208
- Re-run the intent-preserving entry command only after an expected repository
209
- delta, an unexpected input change, or a newly arrived external result: use
210
- `create-idea` for a pending explicit creation and `whats-next` otherwise. End
211
- the current turn when waiting for human/external input. Report an actionable
212
- error with its recovery condition, or report no progress and stop if guidance
213
- completed without a delta. Never poll the same observation.
124
+ outcomes under `## Acceptance criteria`. Use stable level-three IDs: `I-Sxx`,
125
+ `I-ACxx`, `D-Sxx`, and `D-ACxx`. Each criterion states an observable outcome
126
+ and how to prove it. Do not put checkboxes in world contracts. World content
127
+ changes its world revision and containing revisions; `status.yaml` and
128
+ `ledger.md` are outside those trees.
129
+
130
+ The required idea-root `ledger.md` is operational memory, not a fourth world,
131
+ contract, or human decision. Mirror the stable IDs and short titles for
132
+ Implementation and Deployment steps and criteria. Update ledger entries with
133
+ their contract changes; add new items unchecked and reset completed items when
134
+ requirements or proof change materially. If relevant entries remain unchecked,
135
+ continue the reported work. If they are all checked, evidence remains valid,
136
+ and the candidate is published, stop and request the appropriate explicit
137
+ acceptance. A checked box records Agent work only; it never approves, accepts,
138
+ changes status, or authorizes publication.
139
+
140
+ ## Record Decisions And Request Review
141
+
142
+ Silvermoon has no approval, acceptance, or abandonment mutation commands. After
143
+ an explicit human decision, reconfirm it applies to the selected idea and exact
144
+ revision from `whats-next`; change only the corresponding status fact. Never
145
+ infer a decision from silence, prose, Git activity, ledger checkboxes, or an
146
+ outer command.
147
+
148
+ Before requesting approval or acceptance, identify the idea by alias and ULID,
149
+ state the decision and exact reported world revision, and include a clickable
150
+ permalink to the canonical entry at the published primary commit: `Idea.md`
151
+ for ideal approval, `Implementation.md` for implementation acceptance, or
152
+ `Deployment.md` for deployment acceptance. Prefer a commit-pinned web URL (for
153
+ GitHub, `/blob/<commit>/<path>`), not a local path or moving branch link.
154
+ Confirm the commit is reachable from refreshed primary. If no reliable
155
+ permalink can be formed, give the commit and repository-relative path and
156
+ explain why; never provide a misleading link. Publication and links enable
157
+ review but do not constitute the user's decision.
158
+
159
+ For status changes, validate with `silvermoon check --worktree`, stage the
160
+ candidate, then run `silvermoon check --staged`. Commit separately when
161
+ practical and publish non-force using the latest reported primary tip.
162
+
163
+ ## Advance Safely
164
+
165
+ Rerun the intent-preserving command only after an expected repository change,
166
+ unexpected input, or new external result. Stop when waiting for a human or
167
+ external result; do not poll an unchanged observation. Report actionable
168
+ blockers and their recovery condition.
214
169
 
215
170
  Follow [adoption.md](./references/adoption.md) when creating or explicitly
216
171
  converting a repository to Silvermoon.
@@ -2,28 +2,33 @@
2
2
 
3
3
  ## New repositories
4
4
 
5
- Start with a complete, read-only diagnosis, even in an unfamiliar repository:
5
+ Start with a complete diagnosis, even in an unfamiliar repository:
6
6
 
7
7
  ```sh
8
- npx silvermoon@<version> whats-next --json
8
+ npx silvermoon@<version> whats-next
9
9
  ```
10
10
 
11
- The report distinguishes source checkout, project-local, temporary, global,
12
- and unknown execution; lists all requirements and findings with dependencies;
13
- and provides structured remediation plus a recheck command. Temporary
14
- execution is only a bootstrap authority. Adopt its exact version, install it
15
- project-locally, and thereafter use `npx --no-install silvermoon`.
11
+ The dialogue uses lightweight Markdown headings for intention, observation,
12
+ and ordered instructions. It includes actions and outcomes only if side
13
+ effects were attempted. Add `--json` only when a programmatic consumer needs
14
+ the `intention / observation / outcomes / instructions` envelope (including
15
+ `outcomes: []` when none were attempted).
16
+ The command may fetch after local readiness passes, but it does not move the
17
+ worktree, index, branches, or named refs.
16
18
 
17
- Install and synchronize explicitly:
19
+ The target repository may use any language or build ecosystem. It does not
20
+ need `package.json`, a package manager, a Silvermoon dependency, or
21
+ `node_modules`. Use any compatible Silvermoon installation, and register the
22
+ canonical skill bundled with that running installation:
18
23
 
19
24
  ```sh
20
- npm install --save-dev --save-exact silvermoon@<version>
21
- npx skills add ./node_modules/silvermoon/skills --skill silvermoon --agent github-copilot --yes --copy
25
+ npx skills add <path-to-running-silvermoon>/skills --skill silvermoon --agent universal --yes --copy
22
26
  ```
23
27
 
24
- The npm package ships the canonical skill. Installation never writes tracked
25
- skill files. Registration and updates belong to `npx skills`; Silvermoon
26
- diagnoses the resulting repository-local content but never overwrites it.
28
+ This writes the single repository-local registration at
29
+ `.agents/skills/silvermoon`. Registration and updates belong to `npx skills`;
30
+ Silvermoon compares that path with its bundled canonical skill but never
31
+ overwrites it.
27
32
 
28
33
  Create `.silvermoon/config.yaml` with the fixed version 1 contract:
29
34
 
@@ -41,10 +46,18 @@ Commit the configuration, then run:
41
46
  ```sh
42
47
  silvermoon check --commit HEAD
43
48
  silvermoon check --remote
44
- silvermoon create-idea --json
45
- silvermoon whats-next <ULID> --json
49
+ silvermoon create-idea
50
+ silvermoon whats-next <ULID>
46
51
  ```
47
52
 
53
+ `check` validates the selected project snapshot only; it does not navigate
54
+ ideas or check worktree hygiene and upstream. Default `check` validates
55
+ committed `HEAD`, whereas `check --staged` validates the index for pre-commit
56
+ hooks. Its JSON contains only `intention` and `observation`; it does not
57
+ include dialogue `outcomes` or `instructions`. Exit code `0` means valid,
58
+ `1` means invalid or unavailable, and `2` means invalid CLI usage. A failed
59
+ or unavailable check must not allow a commit.
60
+
48
61
  Create or repair configuration through ordinary reviewed file editing.
49
62
  Silvermoon reports every configuration finding but has no init or setup command.
50
63
 
@@ -64,10 +77,11 @@ Each idea is self-contained:
64
77
  `-- Idea.md
65
78
  ```
66
79
 
67
- Ideal World (道心) uses `Idea.md`, Inner World (内景) uses
68
- `Implementation.md`, and Outer World (现世) uses `Deployment.md`: 道心立意,
69
- 内景成形,现世验真. Each world may have supporting files and directories,
70
- but they serve rather than replace the canonical same-world entry.
80
+ Ideal World (理想世界) uses the `Idea.md` ideal contract.
81
+ Inner World (主体世界) uses the `Implementation.md` inner implementation
82
+ contract. Outer World (现实世界) uses the `Deployment.md` real-world
83
+ deployment contract. Each world may have supporting files and directories, but
84
+ they serve rather than replace the canonical same-world entry.
71
85
 
72
86
  The nested opaque Git trees produce `idealRevision`,
73
87
  `implementationRevision`, and `deploymentRevision`. Inner World includes Ideal
@@ -98,7 +112,7 @@ Status may additionally contain canonical `abandoned: true`,
98
112
  `deploymentAcceptedRevision` in that order. Decisions must bind to their
99
113
  corresponding current world revision.
100
114
 
101
- For a new scaffold, run `silvermoon create-idea --json`. It generates the ULID,
115
+ For a new scaffold, run `silvermoon create-idea`. It generates the ULID,
102
116
  four structured documents and alias-less status; it does not stage, commit,
103
117
  push, approve, or accept. During initial preparation, complete `Idea.md` while
104
118
  keeping the Implementation, Deployment, and ledger placeholders synchronized