contentbase 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CNAME +1 -0
- package/LAUNCH-PLAN.md +419 -0
- package/index.html +1636 -0
- package/package.json +5 -4
- package/src/adapters/node-fs.ts +80 -0
- package/src/cli/commands/api/endpoints/doc.ts +2 -2
- package/src/cli/commands/api/endpoints/document.ts +2 -2
- package/src/cli/commands/api/endpoints/search-reindex.ts +6 -25
- package/src/cli/commands/api/endpoints/search-status.ts +3 -20
- package/src/cli/commands/api/endpoints/search.ts +3 -33
- package/src/cli/commands/api/endpoints/semantic-search.ts +3 -33
- package/src/cli/commands/embed.ts +8 -81
- package/src/cli/commands/mcp.ts +5 -1128
- package/src/cli/commands/search.ts +4 -76
- package/src/cli/commands/serve.ts +7 -32
- package/src/cli/index.ts +1 -1
- package/src/cli/load-collection.ts +2 -2
- package/src/collection.ts +31 -30
- package/src/document.ts +18 -0
- package/src/extract-sections.ts +3 -0
- package/src/index.ts +10 -0
- package/src/mcp/helpers.ts +7 -0
- package/src/mcp/model-info.ts +102 -0
- package/src/mcp/prompts.ts +199 -0
- package/src/mcp/readme.ts +153 -0
- package/src/mcp/resources.ts +89 -0
- package/src/mcp/server.ts +103 -0
- package/src/mcp/tools/mutation.ts +176 -0
- package/src/mcp/tools/query.ts +141 -0
- package/src/mcp/tools/search.ts +180 -0
- package/src/parse.ts +5 -0
- package/src/query/query-dsl.ts +1 -1
- package/src/relationships/has-many.ts +2 -2
- package/src/search/document-inputs.ts +85 -0
- package/src/search/luca-semantic-search.ts +75 -0
- package/src/types.ts +54 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/match-pattern.ts +2 -2
- package/src/utils/strip-markdown.ts +59 -0
package/CNAME
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
contentbase.soederpop.com
|
package/LAUNCH-PLAN.md
ADDED
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
# Contentbase Launch Plan
|
|
2
|
+
|
|
3
|
+
> **For Hermes:** If implementing this plan, use the `subagent-driven-development` skill task-by-task. Keep changes small, run verification after every task, and do not add new product surface until build/typecheck are green.
|
|
4
|
+
|
|
5
|
+
**Goal:** Make Contentbase launchable as a typed, validated, agent-safe Markdown database with CLI and MCP interfaces.
|
|
6
|
+
|
|
7
|
+
**Positioning:** Contentbase is not just a generic Markdown utility. It is a schema and safety layer for humans and agents working in Markdown repos.
|
|
8
|
+
|
|
9
|
+
**Recommended tagline:** Schemas and safe agent tools for your Markdown repo.
|
|
10
|
+
|
|
11
|
+
**Core promise:** Define schemas over Markdown, query and validate documents, safely create/update content through structured tools, and expose the collection through CLI/MCP.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Current Assessment
|
|
16
|
+
|
|
17
|
+
Contentbase has a strong product kernel:
|
|
18
|
+
|
|
19
|
+
- `Collection` treats a Markdown/MDX folder as a queryable database.
|
|
20
|
+
- `defineModel` provides typed schemas, sections, relationships, computed fields, defaults, and path patterns.
|
|
21
|
+
- `Document` gives AST-backed section extraction and mutation operations.
|
|
22
|
+
- The query DSL makes content agent/tool-friendly.
|
|
23
|
+
- Validation catches schema and section drift.
|
|
24
|
+
- The CLI and MCP server point toward the right product surface: safe structured interaction instead of direct freeform file edits.
|
|
25
|
+
|
|
26
|
+
The biggest launch blocker is implementation polish, not concept quality.
|
|
27
|
+
|
|
28
|
+
Verified status at time of writing:
|
|
29
|
+
|
|
30
|
+
- `bun test`: 249 pass, 18 skipped, 0 fail
|
|
31
|
+
- `bun run typecheck`: passes as of 2026-05-01 on `launch-plan`
|
|
32
|
+
- `bun run build`: passes as of 2026-05-01 on `launch-plan`
|
|
33
|
+
- Local branch: `main` ahead of `origin/main` by 1 commit
|
|
34
|
+
- Latest local commit: `08567f7 introduce StorageAdapter to decouple Collection from the local file system`
|
|
35
|
+
|
|
36
|
+
The StorageAdapter direction is strategically correct. It creates a path toward local FS, git-backed content, object storage, and other backends. But the package should not launch until typecheck/build are clean.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Product Strategy
|
|
41
|
+
|
|
42
|
+
### Best Market Angle
|
|
43
|
+
|
|
44
|
+
Lead with agent-safe Markdown operations.
|
|
45
|
+
|
|
46
|
+
Contentbase is most compelling when framed as:
|
|
47
|
+
|
|
48
|
+
> A typed, validated write barrier for AI agents operating on Markdown.
|
|
49
|
+
|
|
50
|
+
That is stronger than only saying “ORM for Markdown.” The ORM metaphor is useful, but the MCP layer is the wedge: agents can query, create, update, and validate Markdown without corrupting the repo structure.
|
|
51
|
+
|
|
52
|
+
### Ideal Launch Story
|
|
53
|
+
|
|
54
|
+
The launch demo should be simple and concrete:
|
|
55
|
+
|
|
56
|
+
1. Create a `models.ts` file defining `Epic`, `Story`, or similar models.
|
|
57
|
+
2. Run `contentbase inspect` to show discovered schemas.
|
|
58
|
+
3. Run `contentbase validate` to catch bad frontmatter/sections.
|
|
59
|
+
4. Run `contentbase query` to fetch typed docs.
|
|
60
|
+
5. Start the MCP server.
|
|
61
|
+
6. Ask an agent to create or update a document.
|
|
62
|
+
7. Show that the agent uses structured tools and validation, not raw file edits.
|
|
63
|
+
|
|
64
|
+
### Target Use Cases
|
|
65
|
+
|
|
66
|
+
Prioritize these first:
|
|
67
|
+
|
|
68
|
+
- Product specs, epics, stories, decisions, acceptance criteria.
|
|
69
|
+
- Agent-editable project documentation.
|
|
70
|
+
- Team knowledge bases that stay in git.
|
|
71
|
+
- Docs repos that need schema validation.
|
|
72
|
+
- Markdown-first issue/story systems.
|
|
73
|
+
- Local content systems where Markdown remains source of truth.
|
|
74
|
+
|
|
75
|
+
Deprioritize for launch:
|
|
76
|
+
|
|
77
|
+
- Heavy semantic search polish.
|
|
78
|
+
- Complex storage backends beyond local FS.
|
|
79
|
+
- Broad plugin ecosystems.
|
|
80
|
+
- Generic CMS positioning.
|
|
81
|
+
- Too many model examples before the core is stable.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Immediate Launch Blockers
|
|
86
|
+
|
|
87
|
+
### 1. Typecheck/build failures
|
|
88
|
+
|
|
89
|
+
`bun run typecheck` and `bun run build` currently fail.
|
|
90
|
+
|
|
91
|
+
Observed categories:
|
|
92
|
+
|
|
93
|
+
- `src/__tests__/semantic-search.integration.test.ts` lives under `src` and imports fixtures outside `rootDir`.
|
|
94
|
+
- Several semantic-search calls are out of sync with current Luca `SemanticSearch` API/types.
|
|
95
|
+
- `SemanticSearch.attach` is referenced in many places but is not present on the current type.
|
|
96
|
+
- Semantic search config now requires fields such as `embeddingModel`, `chunkStrategy`, `chunkSize`, and `chunkOverlap`.
|
|
97
|
+
- `src/cli/commands/mcp.ts` has many implicit `any` parameters.
|
|
98
|
+
- API endpoint files have `parent` variable shadowing / used-before-declaration errors.
|
|
99
|
+
|
|
100
|
+
Launch rule: do not add new features until build and typecheck pass.
|
|
101
|
+
|
|
102
|
+
### 2. CLI/MCP/search layering is too coupled
|
|
103
|
+
|
|
104
|
+
The core library feels coherent. The CLI/MCP/semantic-search layer has accumulated too much cross-dependency.
|
|
105
|
+
|
|
106
|
+
Symptoms:
|
|
107
|
+
|
|
108
|
+
- `src/cli/commands/mcp.ts` is over 1200 lines.
|
|
109
|
+
- `collectDocumentInputs` is duplicated.
|
|
110
|
+
- Semantic search setup is duplicated across search, embed, serve, API endpoints, and MCP.
|
|
111
|
+
- Luca API drift breaks many unrelated files.
|
|
112
|
+
|
|
113
|
+
### 3. Package distribution story is unclear
|
|
114
|
+
|
|
115
|
+
`package.json` points:
|
|
116
|
+
|
|
117
|
+
- `main`: `./dist/index.js`
|
|
118
|
+
- `types`: `./dist/index.d.ts`
|
|
119
|
+
- `bin.contentbase`: `./src/cli/index.ts`
|
|
120
|
+
- `bin.cnotes`: `./src/cli/index.ts`
|
|
121
|
+
|
|
122
|
+
If publishing to npm, the bin probably needs to point at built JS in `dist`, unless source execution through Bun is an intentional Bun-only product choice.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Recommended Architecture Direction
|
|
127
|
+
|
|
128
|
+
Think of the repo as four layers:
|
|
129
|
+
|
|
130
|
+
1. `contentbase/core`
|
|
131
|
+
- Collection
|
|
132
|
+
- Document
|
|
133
|
+
- defineModel
|
|
134
|
+
- section extraction
|
|
135
|
+
- relationships
|
|
136
|
+
- validation
|
|
137
|
+
- query DSL
|
|
138
|
+
- storage adapter
|
|
139
|
+
|
|
140
|
+
2. `contentbase/cli`
|
|
141
|
+
- Human-facing commands over core.
|
|
142
|
+
- No direct semantic-search internals sprinkled throughout commands.
|
|
143
|
+
|
|
144
|
+
3. `contentbase/mcp`
|
|
145
|
+
- MCP resources, tools, prompts over core.
|
|
146
|
+
- Structured safe mutations.
|
|
147
|
+
- Validation-first workflows.
|
|
148
|
+
|
|
149
|
+
4. `contentbase/search`
|
|
150
|
+
- Optional search integration.
|
|
151
|
+
- One adapter boundary around Luca SemanticSearch.
|
|
152
|
+
- One shared document chunk/index input builder.
|
|
153
|
+
|
|
154
|
+
Launch should emphasize layers 1-3. Layer 4 can be optional/experimental until stable.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Implementation Plan
|
|
159
|
+
|
|
160
|
+
### Phase 1: Restore build health
|
|
161
|
+
|
|
162
|
+
**Objective:** Make `bun run typecheck`, `bun run build`, and `bun test` pass.
|
|
163
|
+
|
|
164
|
+
**Files likely involved:**
|
|
165
|
+
|
|
166
|
+
- `tsconfig.json`
|
|
167
|
+
- `src/__tests__/semantic-search.integration.test.ts`
|
|
168
|
+
- `src/cli/commands/api/endpoints/doc.ts`
|
|
169
|
+
- `src/cli/commands/api/endpoints/document.ts`
|
|
170
|
+
- `src/cli/commands/search.ts`
|
|
171
|
+
- `src/cli/commands/embed.ts`
|
|
172
|
+
- `src/cli/commands/serve.ts`
|
|
173
|
+
- `src/cli/commands/mcp.ts`
|
|
174
|
+
- `src/cli/commands/api/endpoints/search.ts`
|
|
175
|
+
- `src/cli/commands/api/endpoints/search-status.ts`
|
|
176
|
+
- `src/cli/commands/api/endpoints/search-reindex.ts`
|
|
177
|
+
- `src/cli/commands/api/endpoints/semantic-search.ts`
|
|
178
|
+
|
|
179
|
+
Tasks:
|
|
180
|
+
|
|
181
|
+
1. Move or exclude `src/__tests__` from production build.
|
|
182
|
+
- Preferred: move integration tests to `test/semantic-search.integration.test.ts`.
|
|
183
|
+
- Alternative: change tsconfig include/exclude so production build does not compile tests.
|
|
184
|
+
|
|
185
|
+
2. Fix `parent` variable shadowing in API endpoint files.
|
|
186
|
+
- Rename local variables to avoid self-referential initializer errors.
|
|
187
|
+
|
|
188
|
+
3. Add explicit `args` types in `src/cli/commands/mcp.ts`.
|
|
189
|
+
- Fast path: use `unknown` or inferred Zod types at each handler boundary.
|
|
190
|
+
- Better path: define small argument interfaces per tool.
|
|
191
|
+
|
|
192
|
+
4. Stabilize semantic search integration.
|
|
193
|
+
- Add one helper module wrapping Luca SemanticSearch attach/feature initialization.
|
|
194
|
+
- Centralize default config values.
|
|
195
|
+
- Update call sites to use the helper.
|
|
196
|
+
|
|
197
|
+
5. Run:
|
|
198
|
+
- `bun run typecheck`
|
|
199
|
+
- `bun run build`
|
|
200
|
+
- `bun test`
|
|
201
|
+
|
|
202
|
+
Done when all three pass.
|
|
203
|
+
|
|
204
|
+
**Progress — 2026-05-01 (`launch-plan`):**
|
|
205
|
+
|
|
206
|
+
- [x] Excluded `src/**/__tests__` from production compile so integration tests can stay runnable without breaking `rootDir`.
|
|
207
|
+
- [x] Fixed relationship parent serialization in API endpoints by avoiding the `parent` self-reference/ASI trap.
|
|
208
|
+
- [x] Added explicit MCP handler argument annotations to remove `noImplicitAny` failures.
|
|
209
|
+
- [x] Matched Luca's current in-repo workaround for `SemanticSearch.attach` type drift by casting attach calls through `any`.
|
|
210
|
+
- [x] Verified `bun run typecheck`, `bun run build`, and `bun test` pass.
|
|
211
|
+
- [x] Centralized semantic-search setup in `src/search/luca-semantic-search.ts` during Phase 2 instead of keeping repeated attach/config logic at call sites.
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
### Phase 2: Isolate optional semantic search
|
|
216
|
+
|
|
217
|
+
**Objective:** Prevent optional search features from blocking the core package.
|
|
218
|
+
|
|
219
|
+
Recommended changes:
|
|
220
|
+
|
|
221
|
+
1. Create `src/search/document-inputs.ts`.
|
|
222
|
+
- Move duplicated `collectDocumentInputs` there.
|
|
223
|
+
- Use it from `embed`, `search`, API endpoints, and MCP.
|
|
224
|
+
|
|
225
|
+
2. Create `src/search/luca-semantic-search.ts`.
|
|
226
|
+
- Wrap all `luca/agi` import details.
|
|
227
|
+
- Own default config fields:
|
|
228
|
+
- `embeddingProvider`
|
|
229
|
+
- `embeddingModel`
|
|
230
|
+
- `chunkStrategy`
|
|
231
|
+
- `chunkSize`
|
|
232
|
+
- `chunkOverlap`
|
|
233
|
+
- `dbPath`
|
|
234
|
+
|
|
235
|
+
3. Make search clearly optional.
|
|
236
|
+
- If Luca search cannot initialize, return actionable errors.
|
|
237
|
+
- Core validation/query/create/update should still work.
|
|
238
|
+
|
|
239
|
+
4. Add tests for helper behavior without requiring OpenAI.
|
|
240
|
+
|
|
241
|
+
Verification:
|
|
242
|
+
|
|
243
|
+
- `bun run typecheck`
|
|
244
|
+
- `bun test test/query.test.ts test/collection.test.ts`
|
|
245
|
+
- `bun test src/__tests__/semantic-search.integration.test.ts` or the moved equivalent
|
|
246
|
+
|
|
247
|
+
**Progress — 2026-05-01 (`launch-plan`):**
|
|
248
|
+
|
|
249
|
+
- [x] Created `src/search/document-inputs.ts` and moved shared document input/section collection there.
|
|
250
|
+
- [x] Created `src/search/luca-semantic-search.ts` to centralize search index detection, default config, Luca attachment, and initialized feature creation.
|
|
251
|
+
- [x] Updated CLI, API endpoints, MCP search tools, serve auto-indexing, and integration tests to use the Contentbase helpers.
|
|
252
|
+
- [x] Added `test/search-helpers.test.ts` for helper behavior without OpenAI or live embedding calls.
|
|
253
|
+
- [x] Verified `bun run typecheck`, `bun run build`, and `bun test` pass.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
### Phase 3: Refactor MCP server into modules
|
|
258
|
+
|
|
259
|
+
**Objective:** Turn `src/cli/commands/mcp.ts` from a large single file into maintainable pieces.
|
|
260
|
+
|
|
261
|
+
Suggested structure:
|
|
262
|
+
|
|
263
|
+
- `src/mcp/readme.ts`
|
|
264
|
+
- `src/mcp/model-info.ts`
|
|
265
|
+
- `src/mcp/resources.ts`
|
|
266
|
+
- `src/mcp/tools/query.ts`
|
|
267
|
+
- `src/mcp/tools/validation.ts`
|
|
268
|
+
- `src/mcp/tools/mutation.ts`
|
|
269
|
+
- `src/mcp/tools/search.ts`
|
|
270
|
+
- `src/mcp/prompts.ts`
|
|
271
|
+
- `src/mcp/server.ts`
|
|
272
|
+
|
|
273
|
+
Keep `src/cli/commands/mcp.ts` as a thin command wrapper that parses options, loads the collection, and starts the server.
|
|
274
|
+
|
|
275
|
+
Launch-critical MCP behavior:
|
|
276
|
+
|
|
277
|
+
- `read_me` explains rules for safe agent interaction.
|
|
278
|
+
- Query/list/read tools work reliably.
|
|
279
|
+
- Create/update/delete tools validate after mutation.
|
|
280
|
+
- Validation output is concise and actionable.
|
|
281
|
+
- Resources expose schema and documents predictably.
|
|
282
|
+
|
|
283
|
+
Verification:
|
|
284
|
+
|
|
285
|
+
- `bun run typecheck`
|
|
286
|
+
- `bun test`
|
|
287
|
+
- manually start MCP server if possible
|
|
288
|
+
- test at least one read workflow and one mutation+validate workflow
|
|
289
|
+
|
|
290
|
+
**Progress — 2026-05-01 (`launch-plan`):**
|
|
291
|
+
|
|
292
|
+
- [x] Created `src/mcp/` module structure: `helpers.ts`, `readme.ts`, `model-info.ts`, `resources.ts`, `tools/query.ts`, `tools/search.ts`, `tools/mutation.ts`, `prompts.ts`, `server.ts`.
|
|
293
|
+
- [x] Reduced `src/cli/commands/mcp.ts` from 1205 lines to ~85 lines (thin CLI wrapper).
|
|
294
|
+
- [x] Validation tools kept in `tools/mutation.ts` alongside other mutation tools (natural grouping since validation is always called after mutations).
|
|
295
|
+
- [x] `createMcpServer` exported from `src/mcp/server.ts` — importable and testable independently of the CLI.
|
|
296
|
+
- [x] Verified `bun run typecheck`, `bun run build`, and `bun test` pass (250 pass, 9 skip, 0 fail).
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
### Phase 4: Clarify distribution
|
|
301
|
+
|
|
302
|
+
**Objective:** Make the npm/Bun package story credible.
|
|
303
|
+
|
|
304
|
+
Tasks:
|
|
305
|
+
|
|
306
|
+
1. Decide whether Contentbase is Bun-only or Node-compatible ESM.
|
|
307
|
+
|
|
308
|
+
2. If publishing built package:
|
|
309
|
+
- Change `bin` entries to point at `dist/cli/index.js`.
|
|
310
|
+
- Ensure build emits the CLI entry.
|
|
311
|
+
- Ensure the CLI file has a shebang if needed.
|
|
312
|
+
|
|
313
|
+
3. If Bun source execution is intentional:
|
|
314
|
+
- Document that clearly in README.
|
|
315
|
+
- Make install command and usage reflect Bun requirement.
|
|
316
|
+
|
|
317
|
+
4. Confirm `files` field or publish ignore behavior.
|
|
318
|
+
- Avoid shipping stale `dist`, fixtures, local indexes, or internal notes unintentionally.
|
|
319
|
+
|
|
320
|
+
Verification:
|
|
321
|
+
|
|
322
|
+
- Clean install in a temp directory.
|
|
323
|
+
- Run `contentbase --help` or equivalent.
|
|
324
|
+
- Run a tiny fixture validation/query command.
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
### Phase 5: Tighten launch docs and examples
|
|
329
|
+
|
|
330
|
+
**Objective:** Make the first five minutes obvious.
|
|
331
|
+
|
|
332
|
+
Docs to update:
|
|
333
|
+
|
|
334
|
+
- `README.md`
|
|
335
|
+
- Maybe `examples/` or `test/fixtures/sdlc` promoted into polished examples
|
|
336
|
+
|
|
337
|
+
Recommended README shape:
|
|
338
|
+
|
|
339
|
+
1. What Contentbase is.
|
|
340
|
+
2. Why Markdown needs schemas when agents edit it.
|
|
341
|
+
3. Install.
|
|
342
|
+
4. Define a model.
|
|
343
|
+
5. Load/query collection in TypeScript.
|
|
344
|
+
6. Validate docs from CLI.
|
|
345
|
+
7. Start MCP server.
|
|
346
|
+
8. Agent-safe workflow.
|
|
347
|
+
9. Optional semantic search.
|
|
348
|
+
|
|
349
|
+
Recommended examples:
|
|
350
|
+
|
|
351
|
+
- `examples/sdlc` — Epic/Story/Decision/Acceptance Criteria.
|
|
352
|
+
- `examples/knowledge-base` — Note/Project/Person.
|
|
353
|
+
- `examples/docs-site` — Guide/API/Page.
|
|
354
|
+
|
|
355
|
+
Launch demo should use one polished example, not many half-finished ones.
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
## Launch Checklist
|
|
360
|
+
|
|
361
|
+
Must-have before public launch:
|
|
362
|
+
|
|
363
|
+
- [x] `bun run typecheck` passes.
|
|
364
|
+
- [x] `bun run build` passes.
|
|
365
|
+
- [x] `bun test` passes.
|
|
366
|
+
- [ ] CLI install/run path works from a clean checkout.
|
|
367
|
+
- [ ] README quickstart works copy-paste.
|
|
368
|
+
- [ ] MCP server starts and exposes the documented tools/resources.
|
|
369
|
+
- [ ] One create/update/validate agent workflow is demoable.
|
|
370
|
+
- [x] Semantic search is either stable or clearly marked optional/experimental.
|
|
371
|
+
- [x] No stale `dist` artifacts or duplicated tests contaminate test/build behavior.
|
|
372
|
+
- [ ] Package bin entries match the actual distribution strategy.
|
|
373
|
+
|
|
374
|
+
Nice-to-have after launch:
|
|
375
|
+
|
|
376
|
+
- [ ] Remote storage adapter example.
|
|
377
|
+
- [ ] More section extractors.
|
|
378
|
+
- [ ] More relationship patterns.
|
|
379
|
+
- [ ] Better generated model docs.
|
|
380
|
+
- [ ] Search provider abstraction.
|
|
381
|
+
- [ ] Site docs.
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
## Suggested Public Positioning
|
|
386
|
+
|
|
387
|
+
Use:
|
|
388
|
+
|
|
389
|
+
> Contentbase gives your Markdown repo schemas, queries, validation, and safe agent tools.
|
|
390
|
+
|
|
391
|
+
Avoid leading with:
|
|
392
|
+
|
|
393
|
+
> A CMS.
|
|
394
|
+
> A Notion clone.
|
|
395
|
+
> A vector database.
|
|
396
|
+
> A generic Markdown parser.
|
|
397
|
+
|
|
398
|
+
Good short pitch:
|
|
399
|
+
|
|
400
|
+
> Contentbase treats Markdown/MDX as a typed database. Define Zod models over frontmatter and headings, query documents with a fluent API or CLI, validate structure, and expose safe MCP tools so AI agents can update docs without corrupting them.
|
|
401
|
+
|
|
402
|
+
Good HN/Twitter demo hook:
|
|
403
|
+
|
|
404
|
+
> I got tired of agents wrecking structured Markdown docs, so I built a tiny ORM/MCP server for Markdown folders. Models are Zod schemas, headings become typed sections, relationships come from document structure, and agents mutate docs through validated tools instead of raw edits.
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
## Recommendation
|
|
409
|
+
|
|
410
|
+
Do not broaden the product yet. The idea is already broad enough.
|
|
411
|
+
|
|
412
|
+
The next milestone should be a stable launchable core:
|
|
413
|
+
|
|
414
|
+
1. Build/typecheck green.
|
|
415
|
+
2. Core docs and examples polished.
|
|
416
|
+
3. MCP read/query/create/update/validate workflow reliable.
|
|
417
|
+
4. Search optional.
|
|
418
|
+
|
|
419
|
+
Once that is true, Contentbase is worth launching publicly.
|