mdcontext 0.0.1 → 0.1.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/.changeset/README.md +28 -0
- package/.changeset/config.json +11 -0
- package/.github/workflows/ci.yml +83 -0
- package/.github/workflows/release.yml +113 -0
- package/.tldrignore +112 -0
- package/AGENTS.md +46 -0
- package/BACKLOG.md +338 -0
- package/README.md +231 -11
- package/biome.json +36 -0
- package/cspell.config.yaml +14 -0
- package/dist/chunk-KRYIFLQR.js +92 -0
- package/dist/chunk-S7E6TFX6.js +742 -0
- package/dist/chunk-VVTGZNBT.js +1519 -0
- package/dist/cli/main.d.ts +1 -0
- package/dist/cli/main.js +2015 -0
- package/dist/index.d.ts +266 -0
- package/dist/index.js +86 -0
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.js +376 -0
- package/docs/019-USAGE.md +586 -0
- package/docs/020-current-implementation.md +364 -0
- package/docs/021-DOGFOODING-FINDINGS.md +175 -0
- package/docs/BACKLOG.md +80 -0
- package/docs/DESIGN.md +439 -0
- package/docs/PROJECT.md +88 -0
- package/docs/ROADMAP.md +407 -0
- package/docs/test-links.md +9 -0
- package/package.json +69 -10
- package/pnpm-workspace.yaml +5 -0
- package/research/config-analysis/01-current-implementation.md +470 -0
- package/research/config-analysis/02-strategy-recommendation.md +428 -0
- package/research/config-analysis/03-task-candidates.md +715 -0
- package/research/config-analysis/033-research-configuration-management.md +828 -0
- package/research/config-analysis/034-research-effect-cli-config.md +1504 -0
- package/research/config-analysis/04-consolidated-task-candidates.md +277 -0
- package/research/dogfood/consolidated-tool-evaluation.md +373 -0
- package/research/dogfood/strategy-a/a-synthesis.md +184 -0
- package/research/dogfood/strategy-a/a1-docs.md +226 -0
- package/research/dogfood/strategy-a/a2-amorphic.md +156 -0
- package/research/dogfood/strategy-a/a3-llm.md +164 -0
- package/research/dogfood/strategy-b/b-synthesis.md +228 -0
- package/research/dogfood/strategy-b/b1-architecture.md +207 -0
- package/research/dogfood/strategy-b/b2-gaps.md +258 -0
- package/research/dogfood/strategy-b/b3-workflows.md +250 -0
- package/research/dogfood/strategy-c/c-synthesis.md +451 -0
- package/research/dogfood/strategy-c/c1-explorer.md +192 -0
- package/research/dogfood/strategy-c/c2-diver-memory.md +145 -0
- package/research/dogfood/strategy-c/c3-diver-control.md +148 -0
- package/research/dogfood/strategy-c/c4-diver-failure.md +151 -0
- package/research/dogfood/strategy-c/c5-diver-execution.md +221 -0
- package/research/dogfood/strategy-c/c6-diver-org.md +221 -0
- package/research/effect-cli-error-handling.md +845 -0
- package/research/effect-errors-as-values.md +943 -0
- package/research/errors-task-analysis/00-consolidated-tasks.md +207 -0
- package/research/errors-task-analysis/cli-commands-analysis.md +909 -0
- package/research/errors-task-analysis/embeddings-analysis.md +709 -0
- package/research/errors-task-analysis/index-search-analysis.md +812 -0
- package/research/mdcontext-error-analysis.md +521 -0
- package/research/npm_publish/011-npm-workflow-research-agent2.md +792 -0
- package/research/npm_publish/012-npm-workflow-research-agent1.md +530 -0
- package/research/npm_publish/013-npm-workflow-research-agent3.md +722 -0
- package/research/npm_publish/014-npm-workflow-synthesis.md +556 -0
- package/research/npm_publish/031-npm-workflow-task-analysis.md +134 -0
- package/research/semantic-search/002-research-embedding-models.md +490 -0
- package/research/semantic-search/003-research-rag-alternatives.md +523 -0
- package/research/semantic-search/004-research-vector-search.md +841 -0
- package/research/semantic-search/032-research-semantic-search.md +427 -0
- package/research/task-management-2026/00-synthesis-recommendations.md +295 -0
- package/research/task-management-2026/01-ai-workflow-tools.md +416 -0
- package/research/task-management-2026/02-agent-framework-patterns.md +476 -0
- package/research/task-management-2026/03-lightweight-file-based.md +567 -0
- package/research/task-management-2026/04-established-tools-ai-features.md +541 -0
- package/research/task-management-2026/linear/01-core-features-workflow.md +771 -0
- package/research/task-management-2026/linear/02-api-integrations.md +930 -0
- package/research/task-management-2026/linear/03-ai-features.md +368 -0
- package/research/task-management-2026/linear/04-pricing-setup.md +205 -0
- package/research/task-management-2026/linear/05-usage-patterns-best-practices.md +605 -0
- package/scripts/rebuild-hnswlib.js +63 -0
- package/src/cli/argv-preprocessor.test.ts +210 -0
- package/src/cli/argv-preprocessor.ts +202 -0
- package/src/cli/cli.test.ts +430 -0
- package/src/cli/commands/backlinks.ts +54 -0
- package/src/cli/commands/context.ts +197 -0
- package/src/cli/commands/index-cmd.ts +300 -0
- package/src/cli/commands/index.ts +13 -0
- package/src/cli/commands/links.ts +52 -0
- package/src/cli/commands/search.ts +451 -0
- package/src/cli/commands/stats.ts +146 -0
- package/src/cli/commands/tree.ts +107 -0
- package/src/cli/flag-schemas.ts +275 -0
- package/src/cli/help.ts +386 -0
- package/src/cli/index.ts +9 -0
- package/src/cli/main.ts +145 -0
- package/src/cli/options.ts +31 -0
- package/src/cli/typo-suggester.test.ts +105 -0
- package/src/cli/typo-suggester.ts +130 -0
- package/src/cli/utils.ts +126 -0
- package/src/core/index.ts +1 -0
- package/src/core/types.ts +140 -0
- package/src/embeddings/index.ts +8 -0
- package/src/embeddings/openai-provider.ts +165 -0
- package/src/embeddings/semantic-search.ts +583 -0
- package/src/embeddings/types.ts +82 -0
- package/src/embeddings/vector-store.ts +299 -0
- package/src/index/index.ts +4 -0
- package/src/index/indexer.ts +446 -0
- package/src/index/storage.ts +196 -0
- package/src/index/types.ts +109 -0
- package/src/index/watcher.ts +131 -0
- package/src/index.ts +8 -0
- package/src/mcp/server.ts +483 -0
- package/src/parser/index.ts +1 -0
- package/src/parser/parser.test.ts +291 -0
- package/src/parser/parser.ts +395 -0
- package/src/parser/section-filter.ts +270 -0
- package/src/search/query-parser.test.ts +260 -0
- package/src/search/query-parser.ts +319 -0
- package/src/search/searcher.test.ts +182 -0
- package/src/search/searcher.ts +602 -0
- package/src/summarize/budget-bugs.test.ts +620 -0
- package/src/summarize/formatters.ts +419 -0
- package/src/summarize/index.ts +20 -0
- package/src/summarize/summarizer.test.ts +275 -0
- package/src/summarize/summarizer.ts +528 -0
- package/src/summarize/verify-bugs.test.ts +238 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/tokens.test.ts +142 -0
- package/src/utils/tokens.ts +186 -0
- package/tests/fixtures/cli/.mdcontext/config.json +8 -0
- package/tests/fixtures/cli/.mdcontext/indexes/documents.json +33 -0
- package/tests/fixtures/cli/.mdcontext/indexes/links.json +12 -0
- package/tests/fixtures/cli/.mdcontext/indexes/sections.json +233 -0
- package/tests/fixtures/cli/.mdcontext/vectors.bin +0 -0
- package/tests/fixtures/cli/.mdcontext/vectors.meta.json +1264 -0
- package/tests/fixtures/cli/README.md +9 -0
- package/tests/fixtures/cli/api-reference.md +11 -0
- package/tests/fixtures/cli/getting-started.md +11 -0
- package/tsconfig.json +26 -0
- package/vitest.config.ts +21 -0
- package/vitest.setup.ts +12 -0
package/docs/ROADMAP.md
ADDED
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
# Roadmap: @hw/mdcontext
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Build a token-efficient markdown analysis tool for LLM consumption. Each phase delivers testable functionality, building toward a complete system with parsing, semantic search, summarization, and analytics.
|
|
6
|
+
|
|
7
|
+
## Phases
|
|
8
|
+
|
|
9
|
+
- [ ] **Phase 1: Core Parsing** — Markdown AST extraction and structure
|
|
10
|
+
- [ ] **Phase 2: Index & Storage** — Persistent indexes, file watching, caching
|
|
11
|
+
- [ ] **Phase 3: Semantic Layer** — Embeddings, vector search
|
|
12
|
+
- [ ] **Phase 4: Summarization** — Hierarchical compression, token optimization
|
|
13
|
+
- [ ] **Phase 5: Analytics** — Performance metrics, query tracking
|
|
14
|
+
- [ ] **Phase 6: Integration** — CLI, MCP server, HumanWork skills
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Phase 1: Core Parsing
|
|
19
|
+
|
|
20
|
+
**Goal:** Extract structured data from markdown files.
|
|
21
|
+
|
|
22
|
+
### 1.1: Project Setup
|
|
23
|
+
|
|
24
|
+
- Initialize `packages/hw_mdcontext` in monorepo
|
|
25
|
+
- TypeScript + Effect setup
|
|
26
|
+
- Test infrastructure (vitest)
|
|
27
|
+
- Basic CI integration
|
|
28
|
+
|
|
29
|
+
**Deliverables:**
|
|
30
|
+
|
|
31
|
+
- Package scaffolding
|
|
32
|
+
- Build working
|
|
33
|
+
- First test passing
|
|
34
|
+
|
|
35
|
+
### 1.2: Markdown Parser
|
|
36
|
+
|
|
37
|
+
- Integrate remark/unified
|
|
38
|
+
- Parse to mdast (Markdown AST)
|
|
39
|
+
- Handle frontmatter (YAML)
|
|
40
|
+
- Handle GFM extensions (tables, task lists)
|
|
41
|
+
|
|
42
|
+
**Deliverables:**
|
|
43
|
+
|
|
44
|
+
- `parse(content: string): MdastRoot`
|
|
45
|
+
- Frontmatter extraction
|
|
46
|
+
- Unit tests for various markdown features
|
|
47
|
+
|
|
48
|
+
### 1.3: Structure Extraction
|
|
49
|
+
|
|
50
|
+
- Extract heading hierarchy
|
|
51
|
+
- Identify sections (content between headings)
|
|
52
|
+
- Extract code blocks with language tags
|
|
53
|
+
- Extract links (internal, external, images)
|
|
54
|
+
- Extract lists and tables
|
|
55
|
+
|
|
56
|
+
**Deliverables:**
|
|
57
|
+
|
|
58
|
+
- `extractStructure(ast): DocumentStructure`
|
|
59
|
+
- Section tree with content
|
|
60
|
+
- Link graph per document
|
|
61
|
+
- Code block inventory
|
|
62
|
+
|
|
63
|
+
### 1.4: Document Model
|
|
64
|
+
|
|
65
|
+
- Define document schema (Effect Schema)
|
|
66
|
+
- Section schema with metadata
|
|
67
|
+
- Serialize/deserialize to JSON
|
|
68
|
+
|
|
69
|
+
**Deliverables:**
|
|
70
|
+
|
|
71
|
+
- `Document` type with full structure
|
|
72
|
+
- `Section` type with bounds, content, metadata
|
|
73
|
+
- JSON round-trip tests
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Phase 2: Index & Storage
|
|
78
|
+
|
|
79
|
+
**Goal:** Persist parsed data, enable fast lookups, handle updates.
|
|
80
|
+
|
|
81
|
+
### 2.1: Storage Interface
|
|
82
|
+
|
|
83
|
+
- Define `MdStore` interface
|
|
84
|
+
- In-memory implementation for testing
|
|
85
|
+
- File-based implementation for persistence
|
|
86
|
+
|
|
87
|
+
**Deliverables:**
|
|
88
|
+
|
|
89
|
+
- `MdStore` interface (save, load, query)
|
|
90
|
+
- `MemoryMdStore`
|
|
91
|
+
- `FileMdStore` (JSON files in `.mdcontext/`)
|
|
92
|
+
|
|
93
|
+
### 2.2: Document Indexing
|
|
94
|
+
|
|
95
|
+
- Index documents by path
|
|
96
|
+
- Index sections by heading
|
|
97
|
+
- Index links (forward and back)
|
|
98
|
+
- Incremental updates (changed files only)
|
|
99
|
+
|
|
100
|
+
**Deliverables:**
|
|
101
|
+
|
|
102
|
+
- Path → Document lookup
|
|
103
|
+
- Heading → Section lookup
|
|
104
|
+
- Backlink index
|
|
105
|
+
- Change detection (mtime, hash)
|
|
106
|
+
|
|
107
|
+
### 2.3: File Watching
|
|
108
|
+
|
|
109
|
+
- Watch directory for changes
|
|
110
|
+
- Debounce rapid changes
|
|
111
|
+
- Incremental re-index
|
|
112
|
+
- Configurable ignore patterns
|
|
113
|
+
|
|
114
|
+
**Deliverables:**
|
|
115
|
+
|
|
116
|
+
- `watch(dir, options): Effect<void>`
|
|
117
|
+
- `.mdcontextignore` support
|
|
118
|
+
- Debounce logic (default 500ms)
|
|
119
|
+
|
|
120
|
+
### 2.4: Cache Management
|
|
121
|
+
|
|
122
|
+
- Cache parsed documents
|
|
123
|
+
- Cache structure indexes
|
|
124
|
+
- Invalidation on file change
|
|
125
|
+
- Size limits and eviction
|
|
126
|
+
|
|
127
|
+
**Deliverables:**
|
|
128
|
+
|
|
129
|
+
- LRU cache for documents
|
|
130
|
+
- Index persistence to disk
|
|
131
|
+
- Cache stats (hits, misses, size)
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Phase 3: Semantic Layer
|
|
136
|
+
|
|
137
|
+
**Goal:** Enable meaning-based search via embeddings.
|
|
138
|
+
|
|
139
|
+
### 3.1: Embedding Interface
|
|
140
|
+
|
|
141
|
+
- Define `Embedder` interface
|
|
142
|
+
- Pluggable backends (API, local)
|
|
143
|
+
- Batch embedding support
|
|
144
|
+
|
|
145
|
+
**Deliverables:**
|
|
146
|
+
|
|
147
|
+
- `Embedder` interface
|
|
148
|
+
- `embed(texts: string[]): Effect<Vector[]>`
|
|
149
|
+
- Configuration for model selection
|
|
150
|
+
|
|
151
|
+
### 3.2: OpenAI Embeddings
|
|
152
|
+
|
|
153
|
+
- Implement OpenAI text-embedding-3-small
|
|
154
|
+
- Rate limiting and retry logic
|
|
155
|
+
- Cost tracking
|
|
156
|
+
|
|
157
|
+
**Deliverables:**
|
|
158
|
+
|
|
159
|
+
- `OpenAIEmbedder`
|
|
160
|
+
- Automatic batching (max 8k tokens)
|
|
161
|
+
- Cost per query metric
|
|
162
|
+
|
|
163
|
+
### 3.3: Local Embeddings (Optional)
|
|
164
|
+
|
|
165
|
+
- Python subprocess for sentence-transformers
|
|
166
|
+
- Or ONNX runtime in Node
|
|
167
|
+
- Fallback when API unavailable
|
|
168
|
+
|
|
169
|
+
**Deliverables:**
|
|
170
|
+
|
|
171
|
+
- `LocalEmbedder` (stretch goal)
|
|
172
|
+
- Model download management
|
|
173
|
+
|
|
174
|
+
### 3.4: Vector Index
|
|
175
|
+
|
|
176
|
+
- Store embeddings with document/section IDs
|
|
177
|
+
- Similarity search (cosine)
|
|
178
|
+
- FAISS or hnswlib integration
|
|
179
|
+
|
|
180
|
+
**Deliverables:**
|
|
181
|
+
|
|
182
|
+
- `VectorIndex` interface
|
|
183
|
+
- `search(query: Vector, k: number): Result[]`
|
|
184
|
+
- Persistence to disk
|
|
185
|
+
|
|
186
|
+
### 3.5: Semantic Search API
|
|
187
|
+
|
|
188
|
+
- Text query → embed → search
|
|
189
|
+
- Combine with structural filters
|
|
190
|
+
- Rank and return results
|
|
191
|
+
|
|
192
|
+
**Deliverables:**
|
|
193
|
+
|
|
194
|
+
- `semanticSearch(query: string, options): SearchResult[]`
|
|
195
|
+
- Filter by path pattern, heading level
|
|
196
|
+
- Result with score, snippet, location
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Phase 4: Summarization
|
|
201
|
+
|
|
202
|
+
**Goal:** Generate token-efficient summaries at multiple granularities.
|
|
203
|
+
|
|
204
|
+
### 4.1: Token Counting
|
|
205
|
+
|
|
206
|
+
- Accurate token counting (tiktoken or similar)
|
|
207
|
+
- Budget management
|
|
208
|
+
- Truncation strategies
|
|
209
|
+
|
|
210
|
+
**Deliverables:**
|
|
211
|
+
|
|
212
|
+
- `countTokens(text: string): number`
|
|
213
|
+
- `truncateToTokens(text, limit): string`
|
|
214
|
+
- Model-specific tokenizers (GPT-4, Claude)
|
|
215
|
+
|
|
216
|
+
### 4.2: Section Summarization
|
|
217
|
+
|
|
218
|
+
- Extract key points from section
|
|
219
|
+
- Preserve structure indicators
|
|
220
|
+
- Configurable compression ratio
|
|
221
|
+
|
|
222
|
+
**Deliverables:**
|
|
223
|
+
|
|
224
|
+
- `summarizeSection(section, options): Summary`
|
|
225
|
+
- Key sentence extraction
|
|
226
|
+
- Heading preservation
|
|
227
|
+
|
|
228
|
+
### 4.3: Document Summarization
|
|
229
|
+
|
|
230
|
+
- Hierarchical: summarize sections, then combine
|
|
231
|
+
- TOC generation
|
|
232
|
+
- Key topics extraction
|
|
233
|
+
|
|
234
|
+
**Deliverables:**
|
|
235
|
+
|
|
236
|
+
- `summarizeDocument(doc, options): DocSummary`
|
|
237
|
+
- Multi-level output (100, 500, 2000 tokens)
|
|
238
|
+
- Topic list
|
|
239
|
+
|
|
240
|
+
### 4.4: Context Assembly
|
|
241
|
+
|
|
242
|
+
- Build LLM-ready context from multiple sources
|
|
243
|
+
- Priority-based inclusion
|
|
244
|
+
- Token budget management
|
|
245
|
+
|
|
246
|
+
**Deliverables:**
|
|
247
|
+
|
|
248
|
+
- `assembleContext(sources, budget): string`
|
|
249
|
+
- Source attribution
|
|
250
|
+
- Overflow handling (truncate vs omit)
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Phase 5: Analytics
|
|
255
|
+
|
|
256
|
+
**Goal:** Built-in observability for performance and usage.
|
|
257
|
+
|
|
258
|
+
### 5.1: Metrics Foundation
|
|
259
|
+
|
|
260
|
+
- Effect Metrics integration
|
|
261
|
+
- Counter, Gauge, Histogram types
|
|
262
|
+
- Metric naming conventions
|
|
263
|
+
|
|
264
|
+
**Deliverables:**
|
|
265
|
+
|
|
266
|
+
- Metrics layer setup
|
|
267
|
+
- Standard metric types
|
|
268
|
+
- Tagging (operation, status)
|
|
269
|
+
|
|
270
|
+
### 5.2: Performance Metrics
|
|
271
|
+
|
|
272
|
+
- Query latency (p50, p95, p99)
|
|
273
|
+
- Index build time
|
|
274
|
+
- Cache hit/miss rates
|
|
275
|
+
- Embedding API latency
|
|
276
|
+
|
|
277
|
+
**Deliverables:**
|
|
278
|
+
|
|
279
|
+
- `mdcontext_query_duration_ms` histogram
|
|
280
|
+
- `mdcontext_cache_hits_total` counter
|
|
281
|
+
- `mdcontext_index_build_duration_ms` gauge
|
|
282
|
+
|
|
283
|
+
### 5.3: Usage Metrics
|
|
284
|
+
|
|
285
|
+
- Queries per time period
|
|
286
|
+
- Token usage (input/output)
|
|
287
|
+
- Most queried documents/sections
|
|
288
|
+
- Search result click-through (if applicable)
|
|
289
|
+
|
|
290
|
+
**Deliverables:**
|
|
291
|
+
|
|
292
|
+
- `mdcontext_queries_total` counter
|
|
293
|
+
- `mdcontext_tokens_used` counter
|
|
294
|
+
- Query log with timestamps
|
|
295
|
+
|
|
296
|
+
### 5.4: Reporting
|
|
297
|
+
|
|
298
|
+
- Metrics export (Prometheus format)
|
|
299
|
+
- Simple CLI report command
|
|
300
|
+
- Alerting thresholds (optional)
|
|
301
|
+
|
|
302
|
+
**Deliverables:**
|
|
303
|
+
|
|
304
|
+
- `mdcontext metrics` CLI command
|
|
305
|
+
- JSON and text output formats
|
|
306
|
+
- Configurable retention
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Phase 6: Integration
|
|
311
|
+
|
|
312
|
+
**Goal:** Make mdcontext usable from CLI, MCP, and HumanWork.
|
|
313
|
+
|
|
314
|
+
### 6.1: CLI Tool
|
|
315
|
+
|
|
316
|
+
- `mdcontext index <dir>` — build index
|
|
317
|
+
- `mdcontext search <query>` — semantic search
|
|
318
|
+
- `mdcontext context <path>` — LLM-ready summary
|
|
319
|
+
- `mdcontext structure <path>` — show document structure
|
|
320
|
+
|
|
321
|
+
**Deliverables:**
|
|
322
|
+
|
|
323
|
+
- CLI with subcommands
|
|
324
|
+
- Output formats (text, JSON)
|
|
325
|
+
- Config file support
|
|
326
|
+
|
|
327
|
+
### 6.2: Daemon Mode
|
|
328
|
+
|
|
329
|
+
- `mdcontext daemon` — run as background service
|
|
330
|
+
- HTTP/IPC API for queries
|
|
331
|
+
- Auto-rebuild on changes
|
|
332
|
+
|
|
333
|
+
**Deliverables:**
|
|
334
|
+
|
|
335
|
+
- Daemon process management
|
|
336
|
+
- Query API (REST or IPC)
|
|
337
|
+
- Health check endpoint
|
|
338
|
+
|
|
339
|
+
### 6.3: MCP Server
|
|
340
|
+
|
|
341
|
+
- Expose tools for Claude integration
|
|
342
|
+
- `md_search` — semantic search
|
|
343
|
+
- `md_context` — get context for file/section
|
|
344
|
+
- `md_structure` — document outline
|
|
345
|
+
|
|
346
|
+
**Deliverables:**
|
|
347
|
+
|
|
348
|
+
- MCP server implementation
|
|
349
|
+
- Tool definitions
|
|
350
|
+
- Claude Desktop/Code integration docs
|
|
351
|
+
|
|
352
|
+
### 6.4: HumanWork Skills
|
|
353
|
+
|
|
354
|
+
- `hw-md-search` — search markdown in .humanwork/
|
|
355
|
+
- `hw-md-context` — get context for task/session
|
|
356
|
+
- Integration with session-history
|
|
357
|
+
|
|
358
|
+
**Deliverables:**
|
|
359
|
+
|
|
360
|
+
- Skill definitions
|
|
361
|
+
- Integration with existing HumanWork skills
|
|
362
|
+
- Documentation
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## Progress
|
|
367
|
+
|
|
368
|
+
| Phase | Status | Plans | Completed |
|
|
369
|
+
| ------------------ | ----------- | ----- | --------- |
|
|
370
|
+
| 1. Core Parsing | Not started | 4 | - |
|
|
371
|
+
| 2. Index & Storage | Not started | 4 | - |
|
|
372
|
+
| 3. Semantic Layer | Not started | 5 | - |
|
|
373
|
+
| 4. Summarization | Not started | 4 | - |
|
|
374
|
+
| 5. Analytics | Not started | 4 | - |
|
|
375
|
+
| 6. Integration | Not started | 4 | - |
|
|
376
|
+
|
|
377
|
+
**Total: 25 tasks across 6 phases**
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
## Dependencies
|
|
382
|
+
|
|
383
|
+
```
|
|
384
|
+
Phase 1 ─────────────────────────────────────────┐
|
|
385
|
+
│ │
|
|
386
|
+
▼ │
|
|
387
|
+
Phase 2 ──────────────┐ │
|
|
388
|
+
│ │ │
|
|
389
|
+
▼ ▼ │
|
|
390
|
+
Phase 3 Phase 4 │
|
|
391
|
+
│ │ │
|
|
392
|
+
└────────┬────────┘ │
|
|
393
|
+
▼ │
|
|
394
|
+
Phase 5 ◄───────────────────────────────┘
|
|
395
|
+
│
|
|
396
|
+
▼
|
|
397
|
+
Phase 6
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
- Phase 2 depends on Phase 1 (need parser for indexing)
|
|
401
|
+
- Phase 3 & 4 can parallel after Phase 2
|
|
402
|
+
- Phase 5 spans all (analytics hooks added throughout)
|
|
403
|
+
- Phase 6 integrates everything
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
_Created: 2025-01-18_
|
package/package.json
CHANGED
|
@@ -1,19 +1,78 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdcontext",
|
|
3
|
-
"version": "0.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Token-efficient markdown analysis tool for LLM consumption",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/mdcontext/mdcontext.git"
|
|
9
|
+
},
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public",
|
|
12
|
+
"provenance": true
|
|
13
|
+
},
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"bin": {
|
|
17
|
+
"mdcontext": "./dist/cli/main.js",
|
|
18
|
+
"mdcontext-mcp": "./dist/mcp/server.js"
|
|
19
|
+
},
|
|
5
20
|
"keywords": [
|
|
6
21
|
"markdown",
|
|
7
|
-
"context",
|
|
8
22
|
"llm",
|
|
9
|
-
"
|
|
23
|
+
"ai",
|
|
24
|
+
"analysis",
|
|
25
|
+
"search",
|
|
10
26
|
"embeddings"
|
|
11
27
|
],
|
|
12
|
-
"author": "
|
|
28
|
+
"author": "",
|
|
13
29
|
"license": "MIT",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=18.0.0"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@effect/cli": "^0.73.0",
|
|
35
|
+
"@effect/platform": "^0.94.0",
|
|
36
|
+
"@effect/platform-node": "^0.104.0",
|
|
37
|
+
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
38
|
+
"chokidar": "^4.0.3",
|
|
39
|
+
"effect": "^3.19.0",
|
|
40
|
+
"gray-matter": "^4.0.3",
|
|
41
|
+
"hnswlib-node": "^3.0.0",
|
|
42
|
+
"openai": "^6.16.0",
|
|
43
|
+
"remark": "^15.0.1",
|
|
44
|
+
"remark-gfm": "^4.0.0",
|
|
45
|
+
"remark-parse": "^11.0.0",
|
|
46
|
+
"tiktoken": "^1.0.18",
|
|
47
|
+
"unified": "^11.0.5",
|
|
48
|
+
"unist-util-visit": "^5.0.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@biomejs/biome": "^2.3.11",
|
|
52
|
+
"@changesets/changelog-github": "^0.5.2",
|
|
53
|
+
"@changesets/cli": "^2.29.8",
|
|
54
|
+
"@types/mdast": "^4.0.4",
|
|
55
|
+
"@types/node": "^22.10.0",
|
|
56
|
+
"tsup": "^8.5.1",
|
|
57
|
+
"typescript": "^5.7.2",
|
|
58
|
+
"vitest": "^2.1.8"
|
|
17
59
|
},
|
|
18
|
-
"
|
|
19
|
-
|
|
60
|
+
"scripts": {
|
|
61
|
+
"postinstall": "node scripts/rebuild-hnswlib.js",
|
|
62
|
+
"build": "tsup src/cli/main.ts src/mcp/server.ts src/index.ts --format esm --dts",
|
|
63
|
+
"dev": "tsc --watch",
|
|
64
|
+
"test": "vitest run",
|
|
65
|
+
"test:all": "INCLUDE_EMBED_TESTS=true vitest run",
|
|
66
|
+
"test:rebuild": "REBUILD_TEST_INDEX=true vitest run",
|
|
67
|
+
"test:all:rebuild": "REBUILD_TEST_INDEX=true INCLUDE_EMBED_TESTS=true vitest run",
|
|
68
|
+
"test:watch": "vitest",
|
|
69
|
+
"typecheck": "tsc --noEmit",
|
|
70
|
+
"lint": "biome lint --write .",
|
|
71
|
+
"format": "biome format --write . && biome check --write .",
|
|
72
|
+
"check": "pnpm format && pnpm lint && pnpm typecheck",
|
|
73
|
+
"clean": "rm -rf dist",
|
|
74
|
+
"quality": "pnpm build && npx publint && npx attw --pack .",
|
|
75
|
+
"changeset": "changeset",
|
|
76
|
+
"release": "changeset publish"
|
|
77
|
+
}
|
|
78
|
+
}
|