passive-docs-index 0.2.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.
Files changed (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +541 -0
  3. package/dist/cli.d.ts +7 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +27957 -0
  6. package/dist/commands/add.d.ts +10 -0
  7. package/dist/commands/add.d.ts.map +1 -0
  8. package/dist/commands/auth.d.ts +14 -0
  9. package/dist/commands/auth.d.ts.map +1 -0
  10. package/dist/commands/clean.d.ts +12 -0
  11. package/dist/commands/clean.d.ts.map +1 -0
  12. package/dist/commands/doctor.d.ts +9 -0
  13. package/dist/commands/doctor.d.ts.map +1 -0
  14. package/dist/commands/generate.d.ts +12 -0
  15. package/dist/commands/generate.d.ts.map +1 -0
  16. package/dist/commands/index.d.ts +14 -0
  17. package/dist/commands/index.d.ts.map +1 -0
  18. package/dist/commands/init.d.ts +8 -0
  19. package/dist/commands/init.d.ts.map +1 -0
  20. package/dist/commands/status.d.ts +8 -0
  21. package/dist/commands/status.d.ts.map +1 -0
  22. package/dist/commands/sync.d.ts +7 -0
  23. package/dist/commands/sync.d.ts.map +1 -0
  24. package/dist/commands/update.d.ts +11 -0
  25. package/dist/commands/update.d.ts.map +1 -0
  26. package/dist/index.d.ts +16 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +26071 -0
  29. package/dist/lib/config.d.ts +31 -0
  30. package/dist/lib/config.d.ts.map +1 -0
  31. package/dist/lib/constants.d.ts +22 -0
  32. package/dist/lib/constants.d.ts.map +1 -0
  33. package/dist/lib/context7-client.d.ts +93 -0
  34. package/dist/lib/context7-client.d.ts.map +1 -0
  35. package/dist/lib/context7.d.ts +71 -0
  36. package/dist/lib/context7.d.ts.map +1 -0
  37. package/dist/lib/fs-utils.d.ts +23 -0
  38. package/dist/lib/fs-utils.d.ts.map +1 -0
  39. package/dist/lib/index-parser.d.ts +51 -0
  40. package/dist/lib/index-parser.d.ts.map +1 -0
  41. package/dist/lib/index-utils.d.ts +32 -0
  42. package/dist/lib/index-utils.d.ts.map +1 -0
  43. package/dist/lib/interfaces/mcp-client.d.ts +31 -0
  44. package/dist/lib/interfaces/mcp-client.d.ts.map +1 -0
  45. package/dist/lib/mcp-client.d.ts +63 -0
  46. package/dist/lib/mcp-client.d.ts.map +1 -0
  47. package/dist/lib/templates.d.ts +26 -0
  48. package/dist/lib/templates.d.ts.map +1 -0
  49. package/dist/lib/types.d.ts +169 -0
  50. package/dist/lib/types.d.ts.map +1 -0
  51. package/package.json +69 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Passive Docs Index Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,541 @@
1
+ # Passive Docs Index (PDI)
2
+
3
+ [![CI](https://img.shields.io/github/actions/workflow/status/syx-labs/passive-docs-index/ci.yml?branch=main&style=flat&label=CI)](https://github.com/syx-labs/passive-docs-index/actions/workflows/ci.yml)
4
+ <!-- Coverage badge: configure COVERAGE_GIST_ID after creating the Gist -->
5
+ <!-- [![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/syx-labs/GIST_ID/raw/coverage.json&label=Coverage)](https://github.com/syx-labs/passive-docs-index/actions/workflows/ci.yml) -->
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.x-blue.svg)](https://www.typescriptlang.org/)
8
+ [![Bun](https://img.shields.io/badge/Bun-1.x-f9f1e1.svg)](https://bun.sh/)
9
+
10
+ > Elimine o ponto de decisão de busca de documentação para assistentes de código AI
11
+
12
+ PDI cria um índice de documentação comprimido que está sempre disponível no seu `CLAUDE.md`, garantindo que assistentes de IA tenham acesso imediato à documentação de frameworks sem precisar decidir se devem buscá-la.
13
+
14
+ ## O Problema
15
+
16
+ Estudos mostram que assistentes de IA têm uma taxa de falha de 56% ao acionar busca de documentação - frequentemente não consultam documentação quando deveriam. Isso leva a:
17
+
18
+ - Código usando APIs deprecadas
19
+ - Padrões incorretos do pré-treinamento
20
+ - Erros de integração entre bibliotecas
21
+
22
+ **Causa raiz:** O "ponto de decisão" - quando o agente precisa decidir "devo buscar documentação?", frequentemente escolhe não buscar.
23
+
24
+ ## A Solução
25
+
26
+ PDI cria um **contexto passivo** - documentação que está sempre presente, eliminando o ponto de decisão. Em vez do AI decidir "devo consultar isso?", o índice de documentação relevante já está no contexto.
27
+
28
+ | Abordagem | Taxa de Trigger | Custo de Tokens |
29
+ |-----------|-----------------|-----------------|
30
+ | Skills | 44% | Variável |
31
+ | PDI Index | 100% | ~4KB constante |
32
+
33
+ ## Início Rápido
34
+
35
+ ```bash
36
+ # Instalar globalmente
37
+ bun add -g passive-docs-index
38
+ # ou
39
+ npm install -g passive-docs-index
40
+
41
+ # Inicializar no seu projeto
42
+ pdi init
43
+
44
+ # Adicionar documentação de frameworks
45
+ pdi add hono drizzle zod
46
+
47
+ # Verificar status
48
+ pdi status
49
+ ```
50
+
51
+ ## Como Funciona
52
+
53
+ ```
54
+ ┌─────────────────────────────────────────────────────────────┐
55
+ │ CLAUDE.md │
56
+ │ ┌───────────────────────────────────────────────────────┐ │
57
+ │ │ [Conteúdo existente do usuário] │ │
58
+ │ └───────────────────────────────────────────────────────┘ │
59
+ │ ┌───────────────────────────────────────────────────────┐ │
60
+ │ │ <!-- pdi:begin --> │ │
61
+ │ │ [Índice Comprimido ~4KB] │ │
62
+ │ │ <!-- pdi:end --> │ │
63
+ │ └───────────────────────────────────────────────────────┘ │
64
+ └─────────────────────────────────────────────────────────────┘
65
+
66
+
67
+ ┌─────────────────────────────────────────────────────────────┐
68
+ │ .claude-docs/ │
69
+ │ ├── frameworks/ (docs de dependências externas) │
70
+ │ ├── internal/ (padrões específicos do projeto) │
71
+ │ └── config.json (configuração PDI) │
72
+ └─────────────────────────────────────────────────────────────┘
73
+
74
+ ▼ (fallback)
75
+ ┌─────────────────────────────────────────────────────────────┐
76
+ │ MCP Tools │
77
+ │ Context7 → query-docs (quando docs locais insuficientes) │
78
+ └─────────────────────────────────────────────────────────────┘
79
+ ```
80
+
81
+ ### Exemplo de Índice no CLAUDE.md
82
+
83
+ ```markdown
84
+ <!-- pdi:begin - auto-generated by passive-docs-index, do not edit manually -->
85
+ [Framework Docs]|root:.claude-docs/frameworks
86
+ |CRITICAL:Prefer retrieval-led reasoning over pre-training-led reasoning
87
+ |CRITICAL:Read the relevant .mdx files BEFORE writing code that uses these libraries
88
+ |hono@4.x|api:{app.mdx,context.mdx,routing.mdx,middleware.mdx}|patterns:{error-handling.mdx,validation.mdx}
89
+ |drizzle@0.44|schema:{tables.mdx,relations.mdx}|queries:{select.mdx,insert.mdx}
90
+ |zod@4.x|basics:{schemas.mdx,validation.mdx}|advanced:{transforms.mdx}
91
+
92
+ [Internal Patterns]|root:.claude-docs/internal
93
+ |CRITICAL:Follow these project-specific patterns for consistency
94
+ |database:{two-schema-pattern.mdx,feature-gating.mdx}
95
+ |conventions:{esm-imports.mdx,path-aliases.mdx}
96
+ <!-- pdi:end -->
97
+
98
+ <!-- MCP Fallback: Context7 for expanded queries
99
+ hono=/honojs/hono, drizzle=/drizzle-team/drizzle-orm -->
100
+ ```
101
+
102
+ ## Comandos
103
+
104
+ ### `pdi init`
105
+
106
+ Inicializa o PDI no seu projeto. Detecta dependências e cria a estrutura `.claude-docs/`.
107
+
108
+ ```bash
109
+ pdi init # Inicialização básica
110
+ pdi init --force # Sobrescrever configuração existente
111
+ pdi init --no-detect # Pular detecção de dependências
112
+ pdi init --internal # Também criar estrutura para docs internos
113
+ ```
114
+
115
+ **Saída:**
116
+ ```
117
+ ✓ Created .claude-docs/
118
+ ✓ Created config.json
119
+ ✓ Updated .gitignore
120
+
121
+ Detected dependencies:
122
+ ├── hono@4.9.12 → hono@4.x docs available
123
+ ├── drizzle-orm@0.44.6 → drizzle@0.44 docs available
124
+ └── zod@3.24.0 → zod@3.x docs available
125
+
126
+ Run: pdi add hono drizzle zod
127
+ ```
128
+
129
+ ### `pdi add <frameworks...>`
130
+
131
+ Adiciona documentação para frameworks específicos.
132
+
133
+ ```bash
134
+ pdi add hono drizzle # Adicionar múltiplos frameworks
135
+ pdi add zod --version 3.x # Especificar versão
136
+ pdi add better-auth --force # Sobrescrever docs existentes
137
+ pdi add react --minimal # Apenas docs essenciais
138
+ pdi add vite --no-index # Não atualizar índice no CLAUDE.md
139
+ ```
140
+
141
+ **Saída:**
142
+ ```
143
+ Fetching hono@4.x docs...
144
+ Source: Context7 (/honojs/hono)
145
+ ✓ api/app.mdx (2.1KB)
146
+ ✓ api/context.mdx (3.4KB)
147
+ ✓ api/routing.mdx (2.8KB)
148
+ Total: 7 files, 17KB
149
+
150
+ ✓ Updated index in CLAUDE.md
151
+ ```
152
+
153
+ ### `pdi sync`
154
+
155
+ Sincroniza documentação com as dependências do `package.json`.
156
+
157
+ ```bash
158
+ pdi sync # Sincronização interativa
159
+ pdi sync --yes # Aceitar todas as mudanças automaticamente
160
+ pdi sync --check # Apenas verificar, sem modificar
161
+ pdi sync --prune # Remover docs de pacotes desinstalados
162
+ ```
163
+
164
+ **Saída:**
165
+ ```
166
+ Checking package.json...
167
+ ├── hono: 4.9.12 → docs at 4.x (OK)
168
+ ├── drizzle-orm: 0.44.6 → docs at 0.44 (OK)
169
+ └── better-auth: 1.3.27 → docs at 1.2.x (UPDATE AVAILABLE)
170
+
171
+ Update better-auth docs? [y/N]
172
+ ```
173
+
174
+ ### `pdi status`
175
+
176
+ Mostra o status atual do PDI.
177
+
178
+ ```bash
179
+ pdi status
180
+ ```
181
+
182
+ **Saída:**
183
+ ```
184
+ PDI Status for my-project
185
+ ═════════════════════════
186
+
187
+ Frameworks (3):
188
+ ├── hono@4.x 7 files 17KB ✓ up-to-date
189
+ ├── drizzle@0.44 8 files 22KB ✓ up-to-date
190
+ └── zod@4.x 4 files 9KB ⚠ update available
191
+
192
+ Internal (2 categories):
193
+ ├── database 3 files 8KB
194
+ └── conventions 2 files 4KB
195
+
196
+ Index: 2.8KB / 4KB limit (70% used)
197
+ Total docs: 60KB / 80KB limit (75% of limit)
198
+
199
+ Last sync: 2026-02-02 16:00:00
200
+ ```
201
+
202
+ ### `pdi clean`
203
+
204
+ Remove documentação órfã e otimiza o índice.
205
+
206
+ ```bash
207
+ pdi clean # Limpeza interativa
208
+ pdi clean --yes # Remover sem confirmar
209
+ pdi clean --dry-run # Mostrar o que seria removido
210
+ ```
211
+
212
+ **Saída:**
213
+ ```
214
+ Found orphan docs:
215
+ └── .claude-docs/frameworks/lodash/ (not in package.json)
216
+
217
+ Remove orphan docs? [y/N] y
218
+ ✓ Removed lodash/ (4 files, 8KB)
219
+
220
+ Index optimization:
221
+ Before: 4.2KB
222
+ After: 3.8KB
223
+ Saved: 0.4KB (10%)
224
+ ```
225
+
226
+ ### `pdi list`
227
+
228
+ Lista templates de frameworks disponíveis.
229
+
230
+ ```bash
231
+ pdi list # Listar todos
232
+ pdi list --category backend # Filtrar por categoria
233
+ ```
234
+
235
+ ### `pdi update [frameworks...]`
236
+
237
+ Atualiza documentação para versões mais recentes.
238
+
239
+ ```bash
240
+ pdi update # Atualizar todos
241
+ pdi update hono drizzle # Atualizar específicos
242
+ ```
243
+
244
+ ### `pdi generate internal`
245
+
246
+ Analisa código e gera documentação de padrões internos.
247
+
248
+ ```bash
249
+ pdi generate internal # Gerar todos
250
+ pdi generate internal --category db # Categoria específica
251
+ pdi generate internal --dry-run # Preview
252
+ pdi generate internal --ai # Usar AI para melhorar descrições
253
+ ```
254
+
255
+ ## Frameworks Suportados
256
+
257
+ | Framework | Categoria | Versão | Library ID (Context7) |
258
+ |-----------|-----------|--------|----------------------|
259
+ | Hono | Backend | 4.x | /honojs/hono |
260
+ | Drizzle ORM | Database | 0.44 | /drizzle-team/drizzle-orm |
261
+ | Better Auth | Auth | 1.x | /better-auth/better-auth |
262
+ | Zod | Validation | 4.x | /colinhacks/zod |
263
+ | TanStack Query | Frontend | 5.x | /tanstack/query |
264
+ | TanStack Router | Frontend | 1.x | /tanstack/router |
265
+ | React | Frontend | 19.x | /facebook/react |
266
+ | Vite | Build | 6.x | /vitejs/vite |
267
+ | Vitest | Testing | 3.x | /vitest-dev/vitest |
268
+ | Tailwind CSS | Styling | 4.x | /tailwindlabs/tailwindcss |
269
+
270
+ ## Estrutura do Projeto
271
+
272
+ ```
273
+ your-project/
274
+ ├── .claude-docs/
275
+ │ ├── config.json # Configuração PDI
276
+ │ ├── frameworks/ # Docs de dependências externas
277
+ │ │ ├── hono/
278
+ │ │ │ ├── api/
279
+ │ │ │ │ ├── app.mdx
280
+ │ │ │ │ ├── context.mdx
281
+ │ │ │ │ ├── routing.mdx
282
+ │ │ │ │ └── middleware.mdx
283
+ │ │ │ └── patterns/
284
+ │ │ │ ├── error-handling.mdx
285
+ │ │ │ └── validation.mdx
286
+ │ │ ├── drizzle/
287
+ │ │ │ ├── schema/
288
+ │ │ │ ├── queries/
289
+ │ │ │ └── migrations/
290
+ │ │ └── zod/
291
+ │ │ ├── basics/
292
+ │ │ └── advanced/
293
+ │ └── internal/ # Padrões específicos do projeto
294
+ │ ├── database/
295
+ │ │ └── two-schema-pattern.mdx
296
+ │ ├── conventions/
297
+ │ │ └── esm-imports.mdx
298
+ │ └── workflows/
299
+ │ └── add-route.mdx
300
+ ├── CLAUDE.md # Contém o índice comprimido
301
+ └── package.json
302
+ ```
303
+
304
+ ## Configuração
305
+
306
+ O arquivo `config.json` controla o comportamento do PDI:
307
+
308
+ ```json
309
+ {
310
+ "$schema": "https://pdi.dev/schema/config.json",
311
+ "version": "1.0.0",
312
+ "project": {
313
+ "name": "my-project",
314
+ "type": "backend"
315
+ },
316
+ "sync": {
317
+ "lastSync": "2026-02-02T16:00:00Z",
318
+ "autoSyncOnInstall": true
319
+ },
320
+ "frameworks": {
321
+ "hono": {
322
+ "version": "4.x",
323
+ "source": "context7",
324
+ "libraryId": "/honojs/hono",
325
+ "lastUpdate": "2026-02-01T00:00:00Z",
326
+ "files": 7
327
+ }
328
+ },
329
+ "internal": {
330
+ "enabled": true,
331
+ "categories": ["database", "conventions"],
332
+ "totalFiles": 5
333
+ },
334
+ "mcp": {
335
+ "fallbackEnabled": true,
336
+ "preferredProvider": "context7",
337
+ "libraryMappings": {
338
+ "hono": "/honojs/hono",
339
+ "drizzle": "/drizzle-team/drizzle-orm"
340
+ },
341
+ "cacheHours": 168
342
+ },
343
+ "limits": {
344
+ "maxIndexKb": 4,
345
+ "maxDocsKb": 80,
346
+ "maxFilesPerFramework": 20
347
+ }
348
+ }
349
+ ```
350
+
351
+ ### Opções de Configuração
352
+
353
+ | Campo | Descrição | Padrão |
354
+ |-------|-----------|--------|
355
+ | `project.type` | Tipo do projeto (backend/frontend/fullstack/library/cli) | auto-detectado |
356
+ | `sync.autoSyncOnInstall` | Sincronizar automaticamente após `npm install` | `true` |
357
+ | `mcp.fallbackEnabled` | Permitir fallback para MCP quando docs locais insuficientes | `true` |
358
+ | `mcp.cacheHours` | Tempo de cache para queries MCP | `168` (1 semana) |
359
+ | `limits.maxIndexKb` | Tamanho máximo do índice no CLAUDE.md | `4` |
360
+ | `limits.maxDocsKb` | Tamanho máximo total dos docs | `80` |
361
+
362
+ ## Populando Documentação
363
+
364
+ PDI cria arquivos de documentação placeholder. Para popular com conteúdo real:
365
+
366
+ ### Via Claude (Recomendado)
367
+
368
+ Peça ao Claude para usar Context7 MCP para buscar e atualizar os docs:
369
+
370
+ ```
371
+ Por favor, use Context7 para buscar documentação do Hono sobre routing
372
+ e atualize o arquivo em .claude-docs/frameworks/hono/api/routing.mdx
373
+ ```
374
+
375
+ ### Manual
376
+
377
+ Edite os arquivos `.mdx` diretamente com seu conteúdo preferido.
378
+
379
+ ### Formato do Arquivo .mdx
380
+
381
+ ```markdown
382
+ ---
383
+ # Part of Passive Docs Index for hono@4.x
384
+ # Source: Context7 (/honojs/hono)
385
+ # Last updated: 2026-02-01
386
+ # Category: api
387
+ ---
388
+
389
+ # Routing
390
+
391
+ ## Overview
392
+
393
+ Hono uses a simple and intuitive routing system...
394
+
395
+ ## Route Parameters
396
+
397
+ ```typescript
398
+ app.get('/users/:id', (c) => {
399
+ const id = c.req.param('id');
400
+ return c.json({ id });
401
+ });
402
+ ```
403
+
404
+ ## Common Patterns
405
+
406
+ ...
407
+ ```
408
+
409
+ ## Boas Práticas
410
+
411
+ 1. **Mantenha o índice abaixo de 4KB**: O índice deve ser escaneável rapidamente
412
+ 2. **Total de docs abaixo de 80KB**: Detalhe suficiente sem sobrecarregar o contexto
413
+ 3. **Alinhamento de versão**: Use `pdi sync` após `npm install` para manter docs atualizados
414
+ 4. **Padrões internos**: Documente convenções específicas do projeto em `.claude-docs/internal/`
415
+ 5. **Instruções CRITICAL**: Use para padrões que devem ser seguidos sem exceção
416
+
417
+ ## Integração com MCP
418
+
419
+ PDI integra com Context7 MCP para fallback quando documentação local é insuficiente:
420
+
421
+ ```markdown
422
+ <!-- MCP Fallback Protocol -->
423
+ <!--
424
+ When local docs in .claude-docs/ don't answer your question:
425
+ 1. Query Context7: mcp__plugin_context7_context7__query-docs
426
+ 2. Use the libraryId from config.json
427
+
428
+ Library IDs:
429
+ - hono: /honojs/hono
430
+ - drizzle: /drizzle-team/drizzle-orm
431
+
432
+ Only use MCP for:
433
+ - Edge cases not covered in local docs
434
+ - Very recent API changes
435
+ - Integration patterns between libraries
436
+ -->
437
+ ```
438
+
439
+ ## API Programática
440
+
441
+ PDI também pode ser usado programaticamente:
442
+
443
+ ```typescript
444
+ import {
445
+ readConfig,
446
+ writeConfig,
447
+ parseIndex,
448
+ generateIndex,
449
+ buildIndexSections,
450
+ updateClaudeMdIndex,
451
+ getTemplate,
452
+ hasTemplate,
453
+ listTemplates,
454
+ } from 'passive-docs-index';
455
+
456
+ // Ler configuração
457
+ const config = await readConfig('/path/to/project');
458
+
459
+ // Verificar se template existe
460
+ if (hasTemplate('hono')) {
461
+ const template = getTemplate('hono');
462
+ console.log(template.structure);
463
+ }
464
+
465
+ // Construir e atualizar índice
466
+ const sections = buildIndexSections(
467
+ '.claude-docs/frameworks',
468
+ '.claude-docs/internal',
469
+ frameworksData,
470
+ internalData
471
+ );
472
+
473
+ await updateClaudeMdIndex('/path/to/project', sections);
474
+ ```
475
+
476
+ ## Por Que Não Skills?
477
+
478
+ Skills requerem que o AI tome uma decisão de trigger. Pesquisas mostram que este ponto de decisão tem alta taxa de falha. A abordagem passiva do PDI significa que o índice de documentação está sempre presente - nenhuma decisão necessária.
479
+
480
+ ### Comparação
481
+
482
+ | Aspecto | Skills | PDI |
483
+ |---------|--------|-----|
484
+ | Taxa de Trigger | 44% | 100% |
485
+ | Custo de Tokens | Variável | ~4KB constante |
486
+ | Decisão Requerida | Sim | Não |
487
+ | Sempre em Contexto | Não | Sim |
488
+
489
+ ## Contribuindo
490
+
491
+ Contribuições são bem-vindas! Por favor:
492
+
493
+ 1. Fork o repositório
494
+ 2. Crie uma branch para sua feature (`git checkout -b feature/nova-feature`)
495
+ 3. Commit suas mudanças (`git commit -am 'Add nova feature'`)
496
+ 4. Push para a branch (`git push origin feature/nova-feature`)
497
+ 5. Abra um Pull Request
498
+
499
+ ### Adicionando Novos Templates
500
+
501
+ Para adicionar suporte a um novo framework, edite `src/lib/templates.ts`:
502
+
503
+ ```typescript
504
+ export const MEU_FRAMEWORK_TEMPLATE: FrameworkTemplate = {
505
+ name: 'meu-framework',
506
+ displayName: 'Meu Framework',
507
+ version: '1.x',
508
+ source: 'context7',
509
+ libraryId: '/org/meu-framework',
510
+ category: 'backend',
511
+ priority: 'P1',
512
+ description: 'Descrição do framework',
513
+ structure: {
514
+ basics: {
515
+ 'getting-started.mdx': {
516
+ query: 'Query para Context7 sobre getting started',
517
+ topics: ['setup', 'installation'],
518
+ },
519
+ },
520
+ },
521
+ };
522
+ ```
523
+
524
+ ## Roadmap
525
+
526
+ - [x] CLI básico (init, add, status, sync, clean)
527
+ - [x] Templates para 10 frameworks principais
528
+ - [x] Integração com Context7 MCP
529
+ - [ ] Comando `pdi generate internal` completo
530
+ - [ ] Hook para `npm install` / `bun install`
531
+ - [ ] Skills Claude (`/pdi-analyze`, `/pdi-generate`)
532
+ - [ ] Plugin para VS Code
533
+ - [ ] Dashboard web para visualização
534
+
535
+ ## Licença
536
+
537
+ MIT © 2026
538
+
539
+ ---
540
+
541
+ Feito com ❤️ para melhorar a experiência de desenvolvimento com AI assistants.
package/dist/cli.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * PDI CLI - Passive Docs Index
4
+ * A tool for managing passive documentation indices for AI coding assistants
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;GAGG"}