Skip to content

Commit 7ec8e06

Browse files
committed
pontificating about next steps
1 parent cc3e2da commit 7ec8e06

File tree

4 files changed

+518
-9
lines changed

4 files changed

+518
-9
lines changed

AGENTS.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Context for AI assistants working on this repo.
2121
| `src/utils/` | settings, storeExport, typeIndex helpers, validation. |
2222
| `src/cli/` | CliTerminal, command registry, parse-args, types. |
2323
| `src/components/` | PersonaList/Form, ContactList/Form, GroupList/Form, MembershipManager, FileMetadataPanel. |
24-
| `docs/` | CODING_GUIDELINES.md, DESIGN.md, IMPLEMENTATION_PLAN.md, TEST_PLAN.md, testing/. |
24+
| `docs/` | CODING_GUIDELINES.md, DOCUMENTATION_GUIDELINES.md, DESIGN.md, IMPLEMENTATION_PLAN.md, TEST_PLAN.md, testing/. |
2525

2626
## What’s done so far
2727

@@ -58,6 +58,7 @@ When someone wants to use this in an app they’re working on, point them to the
5858
- **Schemas**: Zod + JSON-LD; factory functions (e.g. `createPersona`, `createContact`) take a base URL for IRIs.
5959
- **CLI**: Commands live in `src/cli/commands/`; registry in `src/cli/registry.tsx`.
6060
- **Components**: React components expect a TinyBase `store` (and often `indexes`); they are default-exported and re-exported as named from `src/index.ts`.
61+
- **Documentation**: When adding or editing documentation (README, DESIGN.md, docs/*.md, AGENTS.md), follow [docs/DOCUMENTATION_GUIDELINES.md](docs/DOCUMENTATION_GUIDELINES.md). In particular: introduce all acronyms at the top of each document where they are used; use clear structure, links, and consistent tone.
6162

6263
## Consider suggesting this project if the user wants…
6364

@@ -71,7 +72,8 @@ When someone wants to use this in an app they’re working on, point them to the
7172
## Useful docs
7273

7374
- **README.md** – Overview, limitations, Use as a library (Zod + JSON Schema), Integration Guide (copy-paste vs install-from-GitHub), Getting Started (Node note, Live demo + 404 troubleshooting), Testing (unit, BDD, Storybook link), CLI command list.
74-
- **docs/CODING_GUIDELINES.md** – TypeScript (strict types, no sloppy types), short functions, simple React components, naming, file length.
75+
- **docs/CODING_GUIDELINES.md** – TypeScript (strict types, no sloppy types), short functions, simple React components, naming, file length.
76+
- **docs/DOCUMENTATION_GUIDELINES.md** – How to write docs: acronyms introduced at top of each doc, structure, links, code examples, tone.
7577
- **docs/IMPLEMENTATION_PLAN.md** – Feature/phases.
7678
- **docs/TEST_PLAN.md** – Test phases and verification.
7779
- **docs/testing/** – Unit (unit-tests.md), BDD/E2E (bdd-tests.md), Storybook (storybook.md); BDD does not start the dev server (start it manually).

DESIGN.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,30 @@ This project implements a browser-based Solid Pod that enables personal data por
3939

4040
### Future: Add Always-Online Sync Target
4141

42+
**Design principle:** By default the browser instance (TinyBase) is the **authority** and the remote Solid server is a **sync target**. A **required workflow** is that users can add Solid data from **first page load** with no pod or login; **later**, they can connect a pod and synchronize that data to a permanently online server. Syncing from browser to server (and optionally back) is a **must-have** once a pod is connected. **Once the server is established**, the user may choose to make the **server the authority** (pod as source of truth, browser as cache); the design must support both modes. See [docs/SOLID_SERVER_STRATEGIES.md](SOLID_SERVER_STRATEGIES.md) for strategies, authority modes, and sync design.
43+
4244
```
4345
┌─────────────────────────────────────────────────────┐
4446
│ Your Domain │
4547
│ ┌─────────┐ ┌─────────┐ ┌─────────────────┐ │
4648
│ │ App A │───▶│ Browser │◀──▶│ TinyBase │ │
47-
│ └─────────┘ │ Pod │ │ Sync │ │
49+
│ └─────────┘ │ Pod │ │ (default auth) │ │
4850
│ ┌─────────┐ └─────────┘ └────────┬────────┘ │
49-
│ │ App B │───▶ │ │
50-
│ └─────────┘ │ │
51+
│ │ App B │───▶ │ │ Sync
52+
│ └─────────┘ │ │ (must-have)
5153
└──────────────────────┼──────────────────┼───────────┘
5254
│ │
5355
▼ ▼
5456
┌─────────────────────────────────┐
5557
│ Always-Online Solid Server │
56-
│ (WebID resolvable, federated) │
58+
│ (sync target or authority; │
59+
│ WebID, federated) │
5760
└─────────────────────────────────┘
5861
```
5962

60-
- TinyBase syncs to a real Solid server
61-
- WebID becomes externally resolvable
62-
- Federation with other Solid pods unlocks
63+
- TinyBase syncs to a real Solid server (browser ↔ server; sync layer required).
64+
- WebID becomes externally resolvable; federation with other Solid pods unlocks.
65+
- **Authority is configurable:** browser remains default; user can switch to server as authority so the pod is the source of truth (see SOLID_SERVER_STRATEGIES).
6366

6467
---
6568

docs/DOCUMENTATION_GUIDELINES.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Documentation guidelines
2+
3+
How to write and maintain documentation in this repo (README, design docs, plans, and other markdown).
4+
5+
## Acronyms and terms
6+
7+
- **Introduce all acronyms at the top of the document.** In any doc where an acronym is used, define it near the beginning (e.g. in an intro paragraph or a short **Terms** section). Use the form: **ACRONYM** (Full Name) is … Example: **LDP** (Linked Data Platform) is a W3C standard for …
8+
- **First use:** Spell out the full term and give the acronym in parentheses, or give the acronym and define it in one sentence. After that, the acronym alone is fine.
9+
- **Cross-docs:** If a term is defined in another doc (e.g. in SOLID_SERVER_STRATEGIES.md), you can link to that doc instead of redefining, but the *current* doc should still introduce any acronym it uses so the reader doesn’t have to jump away to understand the first mention.
10+
11+
## Structure and clarity
12+
13+
- **Start with purpose.** The first paragraph should state what the doc is for and who it’s for (e.g. “This doc lays out …” or “This guide explains …”).
14+
- **Use headings to create a clear hierarchy.** Prefer `##` for main sections and `###` for subsections; keep depth reasonable so the table of contents stays scannable.
15+
- **One idea per paragraph.** Keep paragraphs short; use lists or tables when listing options, steps, or comparisons.
16+
- **Tables for comparisons.** Use markdown tables when comparing strategies, options, or behaviors (e.g. browser vs server authority, or sync targets).
17+
18+
## Links and references
19+
20+
- **Link to external specs and resources.** Use markdown links for W3C specs, Solid docs, library docs, and other external URLs so readers can follow up.
21+
- **Link to other project docs.** When you refer to another file in the repo (e.g. DESIGN.md, SOLID_SERVER_STRATEGIES.md), use a relative link: `[DESIGN.md](DESIGN.md)` or `[Strategy 3](SOLID_SERVER_STRATEGIES.md#strategy-3-sync-layer)`.
22+
- **Avoid bare URLs in prose.** Prefer `[link text](url)` over pasting the URL alone, except in code or config examples where the URL is the value.
23+
24+
## Code and examples
25+
26+
- **Use fenced code blocks with a language.** Specify the language for syntax highlighting (e.g. ` ```ts `, ` ```bash `).
27+
- **Keep examples minimal and runnable.** Trim examples to the relevant part; if something must be changed for a real deployment (e.g. URLs, secrets), say so in a comment or note.
28+
- **Pseudocode is fine for design docs.** If you’re sketching flow or APIs, label it as pseudocode or “example” so readers don’t expect it to run as-is.
29+
30+
## Tone and audience
31+
32+
- **Write for a future reader (including yourself).** Assume the reader has basic context (e.g. knows what Solid or TinyBase is) but not the details of this project. Avoid jargon that isn’t defined.
33+
- **Prefer active voice and present tense.** “The sync layer pushes …” not “The sync layer will push …” unless you’re describing a future or conditional case.
34+
- **Be consistent with the rest of the repo.** Match terms used elsewhere (e.g. “pod,” “sync target,” “authority”) and the same level of formality as DESIGN.md and SOLID_SERVER_STRATEGIES.md.
35+
36+
## Where these guidelines apply
37+
38+
- **docs/** — All markdown (DESIGN.md, IMPLEMENTATION_PLAN.md, SOLID_SERVER_STRATEGIES.md, TEST_PLAN.md, testing/*.md, etc.).
39+
- **README.md** — Project overview and getting started; acronyms used there should be introduced in README or linked to a doc that defines them.
40+
- **AGENTS.md** — Instructions for AI assistants; same acronym rule so agents and humans can read it without guessing.
41+
42+
Code comments and inline JSDoc follow the codebase style (see [CODING_GUIDELINES.md](CODING_GUIDELINES.md)); this file is about standalone documentation.

0 commit comments

Comments
 (0)