# Core Concepts

Silvermoon belongs to the project. It gives humans and Agents one
repository-owned account of intent, implementation, and real-world truth.

## The Problems It Solves

### Less continuous supervision

People should not have to shepherd every mechanical step. They define and
accept the desired outcome, accept the implementation, and accept the
real-world result. Between those decisions, an Agent can continue from
repository facts and stop only when human judgment or an external result is
required.

### Task state that agrees with code

A task card can say "done" while the code has moved on. Silvermoon instead
derives lifecycle state from current world revisions and explicit decisions.
When a depended-on world changes, stale acceptance no longer matches.

### Continuity beyond one conversation

The durable context lives with the project in Git, not inside a chat transcript
or one machine. Another device, Agent, session, or hosting platform can observe
the same primary history and continue from the same facts.

## Three Nested Worlds

**Ideal World (理想世界)** is defined by the ideal contract in `Idea.md`. It
describes the outcome, scope, and constraints without prescribing
implementation.

**Inner World (主体世界)** contains the inner implementation contract in
`Implementation.md` plus the repository deliverables that give the ideal form.

**Outer World (现实世界)** contains the real-world deployment contract in
`Deployment.md` plus evidence that the implementation is true where it must
operate.

Preparation completes the Ideal contract and seeds both downstream contracts
with lightweight first versions: at most three high-level steps and three
observable criteria each, mirrored unchecked in `ledger.md`. These seeds expose
feasibility before Idea acceptance, but that decision still accepts only the
Ideal tree. Implementation and deployment phases progressively refine their
respective seeds.

The directory structure makes the relationship concrete: the Inner World
contains the Ideal World, and the Outer World contains both. Each world is an
opaque Git tree. Its revision therefore includes every nested world. Changing
the ideal changes all three revisions; changing implementation changes the
inner and outer revisions; changing only deployment changes the outer
revision.

This cascading invalidation is the point. A conclusion remains accepted only
while it refers to the exact artifacts that were reviewed.

## Decisions And Continuation

Humans own four decisions: acceptance of the idea, acceptance of the
implementation, acceptance of the deployment, and abandonment. Silvermoon never
infers them from prose, checklists, Git activity, or silence. V1 records explicit
decisions in canonical status YAML; v2 uses controlled event commands bound to
the exact world, log and primary. A confirmation flag asserts a prior human
decision, not authorization by itself.

Agents own continuation. The project skill combines `whats-next`,
`response.nextSteps`, the world contracts, the idea ledger, and Git facts to
choose one safe action. The ledger is operational memory: it mirrors stable
contract IDs and records completed work, but a checked item is not acceptance.

Each selected v2 idea reports all three phase submissions and current control.
An Agent-owned `submitIdeal`, `submitInner`, or `submitOuter` records that the
exact world revision is complete without accepting it. The matching upstream
`accept*` remains a separate human decision. Ping/pong continues to transfer
control within a phase.

Only a current-phase submission with upstream control adds `response.review`.
That object supplies a primary-bound seed for the review index: lifecycle
phase, decision event, exact revision, fetched primary commit, current-world
scope, and canonical documents. Agents still inspect relevant supporting files
and evidence before submitting. Its `presentation` object supplies the fixed
gate labels, document labels, primary connector, and exact decision question
from the effective content language, independently of the report's temporary
output language. Unsupported built-in content locales carry an explicit
fallback that the Agent must localize. JSON retains complete object IDs while
the human-facing index uses 12-character references. The Agent adds only the
review focus, substantive review material, and host-specific clickable local
and immutable remote links in a completed assistant message before any later
interactive decision.

## Persistent State Events

In v2 projects, each idea's `events.jsonl` file is its sole durable state
authority. Ten business event kinds change metadata, three submitted revisions,
three accepted revisions, or abandonment state; ping and pong carry interaction
messages. Replay is pure; observation of real world trees is still read-only
and separate. It projects ordered messages and unified control rather than a
ping/pong-only last signal. No-op events are rejected. Healthy primary prefixes
are immutable; a definitively reduction-failed base may be repaired to a fully
valid log. Old valid facts and concurrent candidates are preserved through
ordinary Git. See the
[event operations contract](../skills/silvermoon/references/events.md).

## Command Event Model

A normalized intention starts one ordered, versioned domain-message stream.
Observation facts are folded by one immutable reducer, while requested and
finished side effects are paired by action ID into the actions projection.
The final response is a pure function of intention and internal observation;
it never reads action history, trace state, clocks, randomness, Git, or the
filesystem.

Every trustworthy JSON result has exactly four top-level projections:
`intention`, `observation`, `actions`, and `response`. Default Markdown renders
only `response`. This keeps operational history available to machines without
making people read an internal execution transcript to find the answer.

## Project Phase Guidance

A project may add phase-specific writing, engineering, or release guidance at
`.silvermoon/guidance/preparing.md`, `implementing.md`, and `deploying.md`.
These files are optional. Silvermoon returns only the current actionable
phase's file, after higher-priority project and repository readiness checks,
and identifies its exact Git blob as `contentRevision`.

Phase guidance is additive: it supplements rather than replaces the canonical
skill and `response.nextSteps`. Public observation carries only provenance;
the self-contained response carries the captured content. An Agent treats it
as inert repository-owned Markdown and materializes applicable idea-specific
requirements into the current world contract and matching ledger entries. The
guidance file is not a fourth contract, does not change a world revision,
records no human decision, and is not evidence that any work or validation
completed.

## One Project, Shared Facts

`whats-next` first checks local worktree, HEAD, and upstream facts, then fetches
the configured remote primary only when local hygiene permits it. Its
observation and response report the exact local and remote commits used for
ancestry guidance. Writers use the reported remote commit as the expected
shared tip. If primary moves, they fetch and reobserve rather than replaying a
stale decision. This is coordination through ordinary Git, not a distributed
lock.
