Skip to content

Commit 36efe41

Browse files
committed
process: Reconcile design principles between plan-spec and tbd-design.md
The user pointed out the new Design Principles in the docs-config plan should be cross-referenced and consolidated with the existing tbd-design principles. Three changes: 1. tbd-design.md §1.5 (Design Principles) extended from 6 to 10: - #1 (Simplicity first) extended to spell out "simple things simple, complex things possible". - #3 (Git for sync) extended with the reproducible-from-config contract. - #7 added: Auth is always out-of-band — tbd never holds credentials. - #8 added: Hard cuts on format versions with reliable migration — already practiced for f02→f03; making it an explicit principle. - #9 added: Spec ↔ implementation synchrony via tests. - #10 added: Layered architecture, separable artifacts. These four new principles emerged from the docs-config redesign work but apply tbd-wide. 2. tbd-design.md §1.4 Design Goals: added goal #8 (extensible knowledge subsystem), which links forward to the plan-spec and the docref/ docmap design docs as the authoritative location for that subsystem's design. 3. plan-spec Design Principles intro: now explicitly notes that P1, P5, P6, P7, P8, P9 are restatements/elaborations of tbd-design §1.5 principles, while P2, P3, P4 are docs/config-specific and have no direct system-wide analog. Each restated principle gets an inline "(extends tbd-design §1.5 #N)" cross-reference. tbd-design.md is declared authoritative for system-wide values. This consolidates principles in one foundational location (tbd-design.md) while keeping the docs-config plan readable on its own. https://claude.ai/code/session_01PhbYdWX7DUBpUBVuUesVuP
1 parent bacf03e commit 36efe41

2 files changed

Lines changed: 54 additions & 15 deletions

File tree

docs/project/specs/active/plan-2026-05-07-docs-config-redesign.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,19 @@ Other consumers — present or future — would only need to implement the docma
311311

312312
## Design Principles
313313

314-
These are the values the design serves.
315-
When the open questions (Q1–Q20) are resolved, the answers should be the ones most
316-
consistent with these principles.
314+
These are the values this redesign serves.
315+
When the open questions (Q1–Q20) are resolved, the answers should be most consistent
316+
with these principles.
317317

318-
### P1. Simple things simple, complex things possible
318+
The principles below extend the system-wide design principles in
319+
[tbd-design.md §1.5](../../../packages/tbd/docs/tbd-design.md#15-design-principles).
320+
P1, P5, P6, P7, P8, and P9 here are restatements or doc-system-specific elaborations of
321+
principles in that doc; P2, P3, and P4 are docs/config-specific principles without a
322+
direct system-wide analog.
323+
Anything inconsistent between the two should be reconciled in tbd-design.md, which is
324+
authoritative for system-wide values.
325+
326+
### P1. Simple things simple, complex things possible (extends tbd-design §1.5 #1)
319327

320328
Adding a typical doc bundle should be a single command that “just works” — no config
321329
edits, no per-doc rules, no upstream coordination.
@@ -346,34 +354,34 @@ Every doc that exists in any source should be discoverable through the format (G
346354
Shadowing, overriding, ambiguity, and collisions are properties of the *view*, not of
347355
the inventory. The raw graph never hides anything; tooling builds policy views over it.
348356

349-
### P5. Reproducible from config
357+
### P5. Reproducible from config (extends tbd-design §1.5 #3)
350358

351359
Given the manifest, the lockfile, and a working network, two clones of a repo produce
352360
caches with identical content (G9). Sync is idempotent; update is the explicit forward
353361
step. Lockfile carries enough identity (Q17) to make this contract robust under bundle
354362
moves and source reshapes.
355363

356-
### P6. tbd never holds credentials
364+
### P6. tbd never holds credentials (extends tbd-design §1.5 #7)
357365

358366
Authentication is always out of band: git’s credential helpers, `gh` CLI, AWS profiles,
359367
etc. (G13). The format has no auth fields, ever.
360368
Public sources just work; private sources rely on the user’s environment.
361369

362-
### P7. The format is a separable artifact
370+
### P7. The format is a separable artifact (extends tbd-design §1.5 #10)
363371

364372
docref and docmap are tool-agnostic specifications with reference implementations.
365373
tbd is the first consumer; others can adopt the formats without depending on tbd code
366374
(G18). Architectural decisions that benefit a single tool but burden the format (e.g.,
367375
baking tbd-specific overrides into the schema) are rejected in favor of layering —
368376
tbd-specific concerns live above the format.
369377

370-
### P8. Hard cuts on format versions, reliable migration
378+
### P8. Hard cuts on format versions, reliable migration (extends tbd-design §1.5 #8)
371379

372380
Schema versions are clean breaks at the boundary; runtime supports exactly one shape;
373381
deprecated fields are detected, migrated, and deleted (G11). Forward compatibility lives
374382
in `.strict()` validation and migration tests, not in layered field-level fallbacks.
375383

376-
### P9. Tests are spec mirrors
384+
### P9. Tests are spec mirrors (extends tbd-design §1.5 #9)
377385

378386
Every spec example has a corresponding test; every change to either side requires the
379387
matching change to the other.

packages/tbd/docs/tbd-design.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -448,20 +448,51 @@ tbd addresses specific requirements:
448448
7. **Easy migration**: `tbd import <beads-export.jsonl>` or `tbd import --from-beads`
449449
converts existing Beads databases
450450

451+
8. **Extensible knowledge subsystem**: Shortcuts, guidelines, templates, and other doc
452+
types ("categories") can be authored locally, mirrored from external git repos or
453+
URLs, overridden in shadcn-style local forks, and round-tripped back upstream — using
454+
a tool-agnostic format (`docref` for addressing,
455+
[`docmap`](./design-docmap-format.md) for the manifest/lockfile/index/sync layer)
456+
that can be extracted as standalone libraries.
457+
Detailed design lives in
458+
[plan-2026-05-07-docs-config-redesign.md](../../../docs/project/specs/active/plan-2026-05-07-docs-config-redesign.md).
459+
451460
### 1.5 Design Principles
452461

453462
1. **Simplicity first**: Prefer boring, well-understood approaches over clever
454-
optimization
463+
optimization. Simple things should be simple; complex things should be possible.
464+
465+
2. **Files as truth**: Markdown + YAML files on disk are the canonical state.
466+
467+
3. **Git for sync**: Standard git commands handle all distribution.
468+
Reproducible from config: given the manifest/lockfile and a working network, two
469+
clones produce identical state.
470+
471+
4. **No required daemon**: CLI-first, background services optional.
472+
473+
5. **Debuggable by design**: Every state change is visible in files and git history.
455474

456-
2. **Files as truth**: Markdown + YAML files on disk are the canonical state
475+
6. **Progressive enhancement**: Core works standalone, bridges/UI are optional layers.
457476

458-
3. **Git for sync**: Standard git commands handle all distribution
477+
7. **Auth is always out-of-band**: tbd never holds credentials.
478+
Authentication is delegated to the underlying tool’s own mechanisms (git credential
479+
helpers, `gh` CLI, AWS profiles, etc.). The format has no auth fields, ever.
459480

460-
4. **No required daemon**: CLI-first, background services optional
481+
8. **Hard cuts on format versions, reliable migration**: Each format version is the only
482+
valid shape at runtime; deprecated fields are detected on read, migrated in one shot,
483+
and never re-emitted.
484+
Forward compatibility lives in strict schema validation and migration tests, not in
485+
layered runtime fallbacks.
461486

462-
5. **Debuggable by design**: Every state change is visible in files and git history
487+
9. **Spec ↔ implementation synchrony via tests**: Reference implementations of
488+
format-level specs (Zod schemas, parsers, resolvers) are kept in sync with their
489+
specs by tests that mirror every spec example.
490+
Changes to either side require a matching change to the other.
463491

464-
6. **Progressive enhancement**: Core works standalone, bridges/UI are optional layers
492+
10. **Layered architecture, separable artifacts**: Tool-agnostic format specifications
493+
(e.g., docref, docmap) are layered below tool-specific workflows.
494+
Format specs are extractable as standalone libraries; tbd-specific policy
495+
(overrides, eject, roundtrip) sits above and depends on the format.
465496

466497
### 1.6 Non-Goals
467498

0 commit comments

Comments
 (0)