storage-engine-selection
Select a storage topology from enumerated access patterns, defaulting to a single engine and justifying every additional store against a named pattern it uniquely serves.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-27
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- storage-engine-selection
- description
- Select a storage topology from enumerated access patterns, defaulting to a single engine and justifying every additional store against a named pattern it uniquely serves.
03 SKILL.md 正文
Storage Engine Selection
Purpose
Turn a set of required access patterns into a defensible storage topology. This skill exists to prevent two failure modes: choosing an engine on familiarity before knowing the query shapes, and accreting stores until the operational surface exceeds what the team can actually run.
When to use
Use this whenever a question involves where data lives — picking a primary store, deciding whether embeddings belong beside their source rows, evaluating a graph database against relational adjacency modeling, choosing an embedded store for desktop, or reviewing an existing multi-store design.
Core principle
One store until proven otherwise. Every additional persistence engine is a permanent operational tax: backup and restore, migration tooling, cross-store consistency reasoning, monitoring, and on-call surface. Polyglot persistence is a conclusion reached under pressure from a specific measured pattern, never a starting posture.
Procedure
Step 1 — Enumerate access patterns before naming any engine
Build the pattern table first. Refuse to discuss engines until it exists.
| Pattern | Shape | Frequency | Latency budget | Consistency need |
|---|---|---|---|---|
| e.g. fetch document with related entities | point read + 1 join | high, per page load | < 50ms p95 | read-your-writes |
| e.g. semantic search over corpus | vector similarity, top-k | moderate | < 300ms p95 | eventual acceptable |
| e.g. multi-hop relationship traversal | graph, depth 3, fanout ~10 | low | < 1s | eventual acceptable |
For each row capture: is this pattern known (specified in the brief), plausible (a reasonable future need), or speculative (someone's hunch)? Only known and plausible patterns may drive engine selection. Speculative patterns are recorded as foreclosure risks, not as requirements.
Step 2 — Test the single-store hypothesis
Start with the most general engine that plausibly serves the pattern table — usually a relational store. For each pattern, ask whether it can be served acceptably by that one engine, including with extensions.
Specifically check whether these extend the primary store far enough:
- Vector search: pgvector inside Postgres, or an equivalent in-database index. Adequate up to substantial corpus sizes and removes the consistency problem between an embedding and its source row entirely.
- Document/JSON access: native JSON column types with indexing.
- Full-text search: built-in text search before a dedicated search engine.
- Graph traversal: recursive CTEs for bounded depth before a dedicated graph store.
- Queue and job state: a table with skip-locked semantics before a broker.
Record which patterns the single store serves adequately, which it serves poorly, and which it cannot serve at all.
Step 3 — Justify each additional store
An additional store is warranted only when a known or plausible pattern is served unacceptably by the primary engine — not merely suboptimally. Require, for each proposed addition:
- The specific pattern it exists to serve.
- Evidence the primary store fails it: a measurement at representative volume, or a structural argument for why no configuration of the primary store can meet the budget.
- The consistency boundary this creates — what can now be stale, and for how long.
- The operational cost accepted: who backs it up, who restores it, who migrates it, who is paged for it.
If any of these cannot be answered, the addition is not yet justified.
Step 4 — Map the consistency boundaries
For every multi-store design that survives Step 3, draw the boundary explicitly. For each pair of stores state:
- What writes must propagate between them.
- The propagation mechanism and its failure mode.
- The maximum acceptable staleness, and what the user sees while stale.
- What happens when propagation fails permanently — is there a reconciliation path, or does the system silently drift?
An unmapped consistency boundary is the most common source of late-discovered correctness bugs in polyglot designs.
Step 5 — Name the foreclosures
For the chosen topology, state what becomes expensive or impossible:
- Denormalization for read speed forecloses cheap schema change.
- An embedded single-writer store forecloses concurrent multi-user writes.
- A separate vector store forecloses transactional consistency between an embedding and its source.
- Aggressive partitioning forecloses cheap cross-partition queries.
- A schema-per-tenant model forecloses cheap cross-tenant analytics.
For each foreclosure, classify the cost of reversal as recoverable in v2 (a migration, painful but bounded) or locked in (a rewrite). Locked-in foreclosures require explicit board acknowledgment.
Output
Produce:
- The access pattern table with known/plausible/speculative classification.
- The recommended topology — engine or engines, and what each holds.
- For each additional store beyond the first: the justifying pattern and the evidence.
- The consistency boundary map for multi-store designs.
- The foreclosure list with reversal cost classified.
Red lines
- Never name an engine before the access pattern table exists.
- Never justify a store with a speculative pattern.
- Never accept vendor benchmarks as evidence of fit.
- Never leave a consistency boundary undrawn in a multi-store recommendation.
- Never omit the foreclosure list — a recommendation without it is incomplete.
04 同仓库更多 Skills
twenty-year-land-plan
Apply the Bren discipline of evaluating every land and development decision on a twenty-year horizon, with a comprehensive plan for how the land, the community, and the surrounding public infrastructure evolve together. Deals optimized for a five-year exit are structurally different from deals that compound across generations; insist on knowing which kind you are making. Use when evaluating land, entitlements, master-planned development, or phasing decisions, and when separating five-year exit deals from generational holds.
thematic-gut-check
Apply the Gray discipline of identifying the structural theme behind every real estate deal, testing where that theme sits in its capital-flow lifecycle, and insisting that deals without a named theme — or deals late in a crowded theme — clear a higher bar. A mediocre deal in a strong theme usually beats a clever deal in a weak one. Use when naming the structural thesis behind a deal, judging whether that theme is early or crowded, and setting the bar the deal must clear.
supply-pipeline-gut-check
Apply the Zell discipline of grounding every real estate thesis in the local supply pipeline. Demand counts over adjectives — units under construction, units permitted, units proposed — and convert them into a forward absorption schedule. A deal that ignores the pipeline is a bet on a market you have not actually studied. Use when validating a market thesis, forecasting absorption and rent growth, or counting units under construction, permitted, and proposed.
ruin-scenario-mapping
Apply the Taleb discipline of identifying, for every real estate deal, the specific chain of events that produces ruin — permanent, unrecoverable capital loss — and verifying that no single such chain has non-trivial probability. Deals with any plausible ruin path must be restructured or abandoned. Use when sizing leverage, testing refinancing, covenant, and liquidity risk, or checking whether any single failure chain can permanently wipe out the position.
revenue-cost-architecture
Design a venture's revenue streams, pricing logic, cost structure, and unit economics so the business model has a coherent theory of value capture, not just value creation. Use after the value proposition and customer segment are set and before financial projections, when choosing a pricing model, calculating contribution margin or CAC payback, or checking whether the unit economics hold at scale.
replacement-cost-stress-test
Apply the Buffett discipline of pricing every real estate asset against the cost to rebuild it from scratch. The ratio of purchase price to replacement cost sets a ceiling on long-run downside: below replacement cost, new supply cannot profitably undercut you; at or above it, you are buying a liability disguised as an asset. Use when setting a purchase price, judging downside protection, or testing how exposed an asset is to newly built competing supply.