Docs: record the spec-follows-code regime across the working docs

This commit is contained in:
2026-07-02 22:33:05 +03:00
parent e42a535726
commit fb4b42a1a7
13 changed files with 76 additions and 59 deletions
+3 -2
View File
@@ -1,7 +1,8 @@
# Astrolabe — Incremental Implementation Plan
> A spec-driven rebuild of Astrolabe on Syto's architecture. The authoritative
> behavioral contract is `docs/spec/` (sections 0010).
> A rebuild of Astrolabe on Syto's architecture. The behavioral record is
> `docs/spec/` (sections 0010) — the code leads, and the spec is kept
> rewritten to match.
>
> **The M0M6 build is complete** — the milestone map below is the record. Remaining
> work is post-M6 enhancement, tracked in the **live backlog** and owned in detail by
+3 -1
View File
@@ -22,7 +22,9 @@ about user-facing widgets. At that overlap, one rule keeps them from drifting:
and never contradict it.** A playbook bullet may _name_ the behavior in one clause and cite
the spec, then spend its words on the _how_ (the role, the keys, the focus move) and the
_why_ (the council/canon citation). When a playbook bullet and the spec disagree, the
**spec wins** and the bullet is the bug. Restatement is the leak: two docs describing the
**spec wins** and the bullet is the bug — both describe the shipped code, so if the spec
section is itself stale, rewrite it to match the app, then cite it (the code leads; the
spec records). Restatement is the leak: two docs describing the
same behavior in their own words drift into contradiction; one cites the other instead.
## How to use this playbook
+2 -2
View File
@@ -284,8 +284,8 @@ export interface UserSettings {
formatting: { dateFormat: 'smart' | 'iso' | 'custom'; customDateFormat: string };
}
// Defaults must match the authoritative spec §07 table exactly — that is the
// contract; this is just where it's encoded.
// The spec §07 table records these defaults — keep the two matching; this is
// just where they're encoded.
const DEFAULTS: UserSettings = {
version: CURRENT_SETTINGS_VERSION,
editor: {
@@ -351,7 +351,7 @@ detection + normalization + the dedupe/rename/id-reassign helpers; `core/export-
- browser IO (`infrastructure/file-transfer.ts`). The pure helpers are unit-tested
hardest; `transfer.ts` only orchestrates (read stores → call core → commit →
notify). The behavioral contract is spec §08.
notify). The behavior is recorded in spec §08.
Three rules a future change must keep:
@@ -6,7 +6,7 @@
> borrowing and the gotchas worth avoiding, so we don't rediscover them from scratch in
> M1/M2.
>
> It is a **reference**, not a contract. The behavioral contract is still [`docs/spec/`](../spec/);
> It is a **reference**, not a contract. The behavioral record is still [`docs/spec/`](../spec/);
> the patterns are still docs [01](01-state-and-stores.md)[07](07-naming-and-relationships.md).
> This doc is the bridge: "here is how the canonical implementation does the editor/renderer
> plumbing, and here is what we keep vs. improve."
+1 -1
View File
@@ -1,6 +1,6 @@
# 09 · Data Model & Persistence
This section defines the persistent entities of Astrolabe and how they relate. It is the authoritative data contract: an implementer recreating the app should store equivalent records with these fields and meanings. Types are given abstractly (string, number, boolean, ISO-timestamp string, string[], object, "JSON value") so they map onto any stack. "JSON value" means any valid JSON shape — object, array, string, number, boolean, or null.
This section defines the persistent entities of Astrolabe and how they relate. It is the data record of the shipped app: an implementer recreating the app should store equivalent records with these fields and meanings. Types are given abstractly (string, number, boolean, ISO-timestamp string, string[], object, "JSON value") so they map onto any stack. "JSON value" means any valid JSON shape — object, array, string, number, boolean, or null.
All data lives entirely in the browser. There is no server, account, or sync. Records survive page reload and remain available offline (see _Application Shell & Navigation_). To move data between browsers or devices, use _Import & Export_.
+1
View File
@@ -8,6 +8,7 @@ A UX/behavioral specification of **Astrolabe**, a browser-based snippet manager
- Each subsequent file is one feature area and can be read on its own; they cross-reference each other by title.
- Every section describes intended behavior plus testable acceptance points ("The user can…", "When X, the system…").
- Section numbers and lettered headings (e.g. `§03G`, `§09B`) are **stable anchors** — code comments reference them. Extend by appending the next letter/number; never renumber existing ones.
- The spec is **descriptive**: it records what the shipped app does. The code leads — when the app and a section here disagree, the section is stale; rewrite it to match (deliberately) rather than treating it as a veto on the code.
## What this spec deliberately omits