@dotcontext/cli 0.9.0 → 0.9.2

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/README.md CHANGED
@@ -1,665 +1,12 @@
1
1
  # @dotcontext/cli
2
2
 
3
- [![npm version](https://badge.fury.io/js/@dotcontext%2Fcli.svg)](https://www.npmjs.com/package/@dotcontext/cli)
4
- [![CI](https://github.com/vinilana/dotcontext/actions/workflows/ci.yml/badge.svg)](https://github.com/vinilana/dotcontext/actions/workflows/ci.yml)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
3
+ Operator-facing package for dotcontext.
6
4
 
7
- > **Formerly `@ai-coders/context`.** Renamed to avoid confusion with Context7 and other "context" tools in the AI space. The `.context/` directory standard is unchanged. See [Migration Guide](#migration-from-ai-coderscontext).
5
+ This package owns:
8
6
 
9
- **Dotcontext is a harness engineering runtime for AI-assisted software delivery.**
7
+ - the `dotcontext` binary
8
+ - local operator workflows
9
+ - MCP installation into supported tools
10
+ - sync, reverse-sync, import/export, and workflow UX
10
11
 
11
- It gives coding agents a real operating environment instead of a loose prompt and a pile of conventions. Dotcontext combines shared project context, workflow structure, policies, sensors, task contracts, replayable execution history, and MCP access into one system.
12
-
13
- The point is not just to "give the model more context". The point is to make agent execution legible, constrained, reusable, and auditable.
14
-
15
- ## What Dotcontext Is
16
-
17
- Dotcontext is three things at once:
18
-
19
- - a `.context/` convention for durable project knowledge
20
- - a harness runtime that governs how agents execute work
21
- - a CLI and MCP surface that expose that runtime to humans and AI tools
22
-
23
- PREVC remains the default execution model for structured work: **Planning, Review, Execution, Validation, and Confirmation**.
24
-
25
- ## Why Dotcontext Exists
26
-
27
- Most agent workflows break down for the same reasons:
28
-
29
- - project knowledge is scattered across tool-specific formats
30
- - execution rules live in prompts instead of in runtime controls
31
- - agents can change code without producing evidence
32
- - there is no durable record of why an agent did what it did
33
- - teams cannot reuse the same operating model across Claude, Cursor, Codex, Copilot, and others
34
-
35
- Dotcontext exists to solve that layer, not just the prompt layer.
36
-
37
- ## Architecture
38
-
39
- Dotcontext is now organized around an explicit harness runtime:
40
-
41
- ```text
42
- cli -> harness <- mcp
43
- ```
44
-
45
- - `@dotcontext/cli` is the operator-facing surface
46
- - `dotcontext/harness` is the reusable runtime and domain layer
47
- - `dotcontext/mcp` is the MCP transport adapter
48
-
49
- The main architecture reference, with Mermaid diagrams for runtime flow, boundaries, and packaging, lives in [ARCHITECTURE.md](./ARCHITECTURE.md).
50
-
51
- ## Problems It Solves
52
-
53
- ### 1. Context Fragmentation
54
-
55
- Every AI coding tool now has a primary surface plus older compatibility paths that still show up in the wild. Dotcontext keeps track of both so teams can write against the current surface without losing legacy imports.
56
-
57
- | Tool | Primary surface | Legacy / compatibility surface |
58
- | --- | --- | --- |
59
- | Cursor | `.cursor/rules/*.mdc`, `AGENTS.md`-scoped instructions | `.cursorrules`, `.cursor/rules/*.md` |
60
- | Claude Code | `CLAUDE.md`, `.claude/agents`, `.claude/skills` | older memory-style files under `.claude/` |
61
- | GitHub Copilot | `.github/copilot-instructions.md`, `.github/instructions/*.instructions.md`, `.github/agents/*.agent.md`, `.github/skills` | `.github/copilot/*` and `.github/.copilot/*` |
62
- | Windsurf | `AGENTS.md`, `.windsurf/rules`, `.windsurf/skills` | `.windsurfrules`, older `.windsurf/` rule files |
63
- | Gemini | `GEMINI.md`, `.gemini/commands`, `.gemini/settings.json`, `.gemini/skills` | older `.gemini/` config layouts |
64
- | Codex | `AGENTS.md`, `.codex/skills`, `.codex/config.toml` | `.codex/instructions.md` |
65
- | Google Antigravity | `.agents/rules`, `.agents/workflows` | older `.agent/` layouts |
66
- | Trae AI | `.trae/rules`, `.trae/agents` | older `.trae/` rule files |
67
-
68
- Using multiple tools means duplicating rules, playbooks, and documentation across incompatible formats.
69
-
70
- ### 2. Weak Runtime Control
71
-
72
- Most agent setups still rely on:
73
-
74
- - a long agent file
75
- - a few MCP tools
76
- - best-effort conventions
77
-
78
- That is not enough for production-grade behavior. You need runtime controls such as policies, sensors, contracts, and backpressure.
79
-
80
- ### 3. No Durable Execution Model
81
-
82
- Without sessions, traces, artifacts, and replay:
83
-
84
- - agents cannot hand off work cleanly
85
- - failures are hard to cluster and learn from
86
- - workflow gates are hard to enforce
87
- - evaluation becomes anecdotal instead of operational
88
-
89
- ## What Dotcontext Does
90
-
91
- Dotcontext consolidates those concerns into one operating model.
92
-
93
- ### Shared Context
94
-
95
- One `.context/` directory. Works everywhere.
96
-
97
- ```
98
- .context/
99
- ├── docs/ # Your documentation (architecture, patterns, decisions)
100
- ├── agents/ # Agent playbooks (code-reviewer, feature-developer, etc.)
101
- ├── plans/ # Work plans linked to PREVC workflow
102
- └── skills/ # On-demand expertise (commit-message, pr-review, etc.)
103
- ```
104
-
105
- Export to any tool.
106
- **Write once. Use anywhere. No boilerplate.**
107
-
108
- ### Harness Runtime
109
-
110
- The runtime adds execution controls on top of the shared context:
111
-
112
- - durable sessions, traces, artifacts, and checkpoints
113
- - sensors and backpressure
114
- - task contracts and handoffs
115
- - policy enforcement
116
- - replay and failure dataset generation
117
-
118
- ### Multi-Surface Access
119
-
120
- The same runtime is exposed through:
121
-
122
- - `@dotcontext/cli` for operator workflows
123
- - `dotcontext/mcp` for AI tools
124
- - `dotcontext/harness` as the reusable domain/runtime boundary
125
-
126
- ## How The Harness Works
127
-
128
- At runtime, both the CLI and the MCP server delegate to the same harness services. The harness is responsible for:
129
-
130
- - durable sessions, traces, artifacts, and checkpoints
131
- - sensors and backpressure
132
- - task contracts and handoffs
133
- - policy enforcement
134
- - replay generation
135
- - failure dataset clustering
136
-
137
- ```mermaid
138
- flowchart LR
139
- CLI["CLI"] --> H["Harness Runtime"]
140
- MCP["MCP Server"] --> H
141
-
142
- H --> S["Sessions + State"]
143
- H --> Q["Sensors + Backpressure"]
144
- H --> T["Task Contracts + Handoffs"]
145
- H --> P["Policy Engine"]
146
- H --> R["Replay + Datasets"]
147
- ```
148
-
149
- For the full system view, see [ARCHITECTURE.md](./ARCHITECTURE.md).
150
-
151
- > **Using GitHub Copilot, Cursor, Claude, or another AI tool?**
152
- > Just run `npx @dotcontext/mcp install` — no API key needed!
153
- >
154
- > **Usando GitHub Copilot, Cursor, Claude ou outra ferramenta de IA?**
155
- > Execute `npx @dotcontext/mcp install` — sem necessidade de API key!
156
-
157
- > **Note / Nota**
158
- > Standalone CLI generation is no longer supported. Use MCP-enabled AI tools to create, fill, or refresh context.
159
- > A geração na CLI standalone não é mais suportada. Use ferramentas com MCP para criar, preencher ou atualizar o contexto.
160
-
161
- ## Getting Started / Como Começar
162
-
163
- ### Path 1: MCP (Recommended / Recomendado) — no API key
164
-
165
- #### English
166
-
167
- 1. Run `npx @dotcontext/mcp install`
168
- 2. Prompt your AI agent: `init the context`
169
- 3. Then: `plan [YOUR TASK] using dotcontext`
170
- 4. After planned: `start the workflow`
171
-
172
- **No API key needed.** Your AI tool provides the LLM.
173
-
174
- #### Português
175
-
176
- 1. Execute `npx @dotcontext/mcp install`
177
- 2. Diga ao seu agente de IA: `init the context`
178
- 3. Depois: `plan [SUA TAREFA] using dotcontext`
179
- 4. Após o planejamento: `start the workflow`
180
-
181
- **Sem necessidade de API key.** Sua ferramenta de IA fornece o LLM.
182
-
183
- ### Path 2: Standalone CLI — sync, imports, and admin tools
184
-
185
- #### English
186
-
187
- 1. Run `npx -y @dotcontext/cli@latest`
188
- 2. Use the interactive CLI for sync, reverse sync, hidden admin tools, and MCP setup
189
- 3. When you need context creation or AI-generated content, use your MCP-connected AI tool
190
-
191
- #### Português
192
-
193
- 1. Execute `npx -y @dotcontext/cli@latest`
194
- 2. Use a CLI interativa para sincronização, reverse sync, ferramentas administrativas ocultas e configuração MCP
195
- 3. Quando precisar criar contexto ou gerar conteúdo com IA, use sua ferramenta conectada via MCP
196
-
197
- ## MCP Server Setup
198
-
199
- This package includes an MCP (Model Context Protocol) server that provides AI coding assistants with powerful tools to analyze and document your codebase.
200
-
201
- ### Recommended Installation
202
-
203
- Use the installer. It is the source of truth for supported tools and config formats:
204
-
205
- ```bash
206
- npx @dotcontext/mcp install
207
- ```
208
-
209
- If you already have the MCP package installed globally, `dotcontext-mcp install` works too. The legacy `dotcontext mcp:install` CLI flow still works as a compatibility path.
210
-
211
- The installer:
212
- - Detects installed AI tools on your system
213
- - Configures the `dotcontext` MCP server in each tool
214
- - Supports global (home directory) and local (project directory) installation
215
- - Merges with existing MCP configurations without overwriting unrelated servers
216
- - Includes `--dry-run` and `--verbose` modes
217
- - Writes the config shape required by each supported client
218
-
219
- Examples:
220
-
221
- ```bash
222
- # Interactive install for detected tools
223
- npx @dotcontext/mcp install
224
-
225
- # Install for a specific tool
226
- npx @dotcontext/mcp install codex
227
-
228
- # Install in the current project instead of your home directory
229
- npx @dotcontext/mcp install cursor --local
230
-
231
- # Preview without writing files
232
- npx @dotcontext/mcp install claude --dry-run --verbose
233
- ```
234
-
235
- ### Supported MCP Install Targets
236
-
237
- `install` currently supports these tool ids:
238
-
239
- | Tool ID | Tool | Config Shape |
240
- | --- | --- | --- |
241
- | `claude` | Claude Code | `mcpServers` JSON |
242
- | `cursor` | Cursor AI | `mcpServers` JSON with `type: "stdio"` |
243
- | `windsurf` | Windsurf | `mcpServers` JSON |
244
- | `continue` | Continue.dev | standalone `.continue/mcpServers/dotcontext.json` |
245
- | `claude-desktop` | Claude Desktop | `mcpServers` JSON |
246
- | `vscode` | VS Code (GitHub Copilot) | `servers` JSON |
247
- | `roo` | Roo Code | `mcpServers` JSON |
248
- | `amazonq` | Amazon Q Developer CLI | `mcpServers` JSON |
249
- | `gemini-cli` | Gemini CLI | `mcpServers` JSON |
250
- | `codex` | Codex CLI | TOML `[mcp_servers.dotcontext]` |
251
- | `kiro` | Kiro | `mcpServers` JSON |
252
- | `zed` | Zed Editor | `context_servers` JSON |
253
- | `jetbrains` | JetBrains IDEs | `servers` array |
254
- | `trae` | Trae AI | `mcpServers` JSON |
255
- | `kilo` | Kilo Code | `mcp` JSON |
256
- | `copilot-cli` | GitHub Copilot CLI | `mcpServers` JSON |
257
-
258
- ### Manual Configuration
259
-
260
- Use manual configuration only when you cannot use `@dotcontext/mcp install`. The exact file format depends on the client.
261
-
262
- Dotcontext writes this command into client configs:
263
-
264
- ```text
265
- command: npx
266
- args: ["-y", "@dotcontext/mcp@latest"]
267
- ```
268
-
269
- #### Standard `mcpServers` JSON
270
-
271
- Used by tools such as Claude Code, Windsurf, Claude Desktop, Roo Code, Amazon Q Developer CLI, Gemini CLI, Trae AI, and GitHub Copilot CLI.
272
-
273
- ```json
274
- {
275
- "mcpServers": {
276
- "dotcontext": {
277
- "command": "npx",
278
- "args": ["-y", "@dotcontext/mcp@latest"]
279
- }
280
- }
281
- }
282
- ```
283
-
284
- #### Cursor
285
-
286
- Cursor expects `type: "stdio"`:
287
-
288
- ```json
289
- {
290
- "mcpServers": {
291
- "dotcontext": {
292
- "type": "stdio",
293
- "command": "npx",
294
- "args": ["-y", "@dotcontext/mcp@latest"]
295
- }
296
- }
297
- }
298
- ```
299
-
300
- #### Continue.dev
301
-
302
- Continue uses a standalone per-server file:
303
-
304
- ```json
305
- {
306
- "command": "npx",
307
- "args": ["-y", "@dotcontext/mcp@latest"],
308
- "env": {}
309
- }
310
- ```
311
-
312
- #### VS Code (GitHub Copilot)
313
-
314
- VS Code uses `servers` instead of `mcpServers`:
315
-
316
- ```json
317
- {
318
- "servers": {
319
- "dotcontext": {
320
- "type": "stdio",
321
- "command": "npx",
322
- "args": ["-y", "@dotcontext/mcp@latest"]
323
- }
324
- }
325
- }
326
- ```
327
-
328
- #### Zed
329
-
330
- Zed uses `context_servers`:
331
-
332
- ```json
333
- {
334
- "context_servers": {
335
- "dotcontext": {
336
- "command": "npx",
337
- "args": ["-y", "@dotcontext/mcp@latest"],
338
- "env": {}
339
- }
340
- }
341
- }
342
- ```
343
-
344
- #### JetBrains IDEs
345
-
346
- JetBrains uses a `servers` array:
347
-
348
- ```json
349
- {
350
- "servers": [
351
- {
352
- "name": "dotcontext",
353
- "command": "npx",
354
- "args": ["-y", "@dotcontext/mcp@latest"],
355
- "env": {}
356
- }
357
- ]
358
- }
359
- ```
360
-
361
- #### Kilo Code
362
-
363
- Kilo uses `mcp.dotcontext` with a command array:
364
-
365
- ```json
366
- {
367
- "mcp": {
368
- "dotcontext": {
369
- "type": "local",
370
- "command": ["npx", "-y", "@dotcontext/mcp@latest"],
371
- "enabled": true
372
- }
373
- }
374
- }
375
- ```
376
-
377
- #### Codex CLI
378
-
379
- Codex uses TOML:
380
-
381
- ```toml
382
- [mcp_servers.dotcontext]
383
- command = "npx"
384
- args = ["-y", "@dotcontext/mcp@latest"]
385
- ```
386
-
387
- ### Local Development
388
-
389
- For local development, point directly to the dedicated MCP binary after `npm run build`:
390
-
391
- ```json
392
- {
393
- "mcpServers": {
394
- "dotcontext-dev": {
395
- "command": "node",
396
- "args": ["/absolute/path/to/this-repo/dist/mcp/bin.js"]
397
- }
398
- }
399
- }
400
- ```
401
-
402
- ## Youtube video
403
- [![Watch the video](https://img.youtube.com/vi/p9uV3CeLaKY/0.jpg)](https://www.youtube.com/watch?v=p9uV3CeLaKY)
404
-
405
- ## Connect with Us
406
-
407
- Built by [AI Coders Academy](http://aicoders.academy/) — Learn AI-assisted development and become a more productive developer.
408
-
409
- - [AI Coders Academy](http://aicoders.academy/) — Courses and resources for AI-powered coding
410
- - [YouTube Channel](https://www.youtube.com/@aicodersacademy) — Tutorials, demos, and best practices
411
- - [Connect with Vini](https://www.linkedin.com/in/viniciuslanadepaula/) — Creator of @dotcontext/cli
412
-
413
-
414
- ## Why PREVC?
415
-
416
- ### English
417
-
418
- LLMs produce better results when they follow a structured process instead of generating code blindly. PREVC ensures:
419
-
420
- - **Specifications before code** — AI understands what to build before building it
421
- - **Context awareness** — Each phase has the right documentation and agent
422
- - **Human checkpoints** — Review and validate at each step, not just at the end
423
- - **Reproducible quality** — Same process, consistent results across projects
424
-
425
- ### Português
426
-
427
- LLMs produzem melhores resultados quando seguem um processo estruturado em vez de gerar código cegamente. PREVC garante:
428
-
429
- - **Especificações antes do código** — IA entende o que construir antes de construir
430
- - **Consciência de contexto** — Cada fase tem a documentação e o agente corretos
431
- - **Checkpoints humanos** — Revise e valide em cada etapa, não apenas no final
432
- - **Qualidade reproduzível** — Mesmo processo, resultados consistentes entre projetos
433
-
434
- ## What it does / O que faz
435
-
436
- ### English
437
-
438
- 1. **Creates documentation** — Structured docs from your codebase (architecture, data flow, decisions)
439
- 2. **Generates agent playbooks** — 14 specialized AI agents (code-reviewer, bug-fixer, architect, etc.)
440
- 3. **Smart scaffold filtering** — Automatically detects project type and generates only relevant content
441
- 4. **Useful out-of-the-box** — Scaffolds include practical template content, not empty placeholders
442
- 5. **Manages workflows** — PREVC process with scale detection, gates, and execution history
443
- 6. **Provides skills** — On-demand expertise (commit messages, PR reviews, security audits)
444
- 7. **Syncs everywhere** — Export to Cursor, Claude, Copilot, Windsurf, Cline, Codex, Antigravity, Trae, and more
445
- 8. **Tracks execution** — Step-level tracking with git integration for workflow phases
446
- 9. **Keeps it updated** — Detects code changes and suggests documentation updates
447
-
448
- ### Português
449
-
450
- 1. **Cria documentação** — Docs estruturados do seu codebase (arquitetura, fluxo de dados, decisões)
451
- 2. **Gera playbooks de agentes** — 14 agentes de IA especializados (code-reviewer, bug-fixer, architect, etc.)
452
- 3. **Filtragem inteligente de scaffold** — Detecta automaticamente o tipo de projeto e gera apenas conteúdo relevante
453
- 4. **Útil de imediato** — Scaffolds incluem conteúdo prático, não placeholders vazios
454
- 5. **Gerencia workflows** — Processo PREVC com detecção de escala, gates e histórico de execução
455
- 6. **Fornece skills** — Expertise sob demanda (mensagens de commit, revisões de PR, auditorias de segurança)
456
- 7. **Sincroniza em todos os lugares** — Exporte para Cursor, Claude, Copilot, Windsurf, Cline, Codex, Antigravity, Trae e mais
457
- 8. **Rastreia execução** — Rastreamento por etapa com integração git para fases de workflow
458
- 9. **Mantém atualizado** — Detecta mudanças no código e sugere atualizações de documentação
459
-
460
- PT-BR Tutorial
461
- https://www.youtube.com/watch?v=5BPrfZAModk
462
-
463
- ## PREVC Workflow System
464
-
465
- A universal 5-phase process designed to improve LLM output quality through structured, spec-driven development:
466
-
467
- | Phase | Name | Purpose |
468
- |-------|------|---------|
469
- | **P** | Planning | Define what to build. Gather requirements, write specs, identify scope. No code yet. |
470
- | **R** | Review | Validate the approach. Architecture decisions, technical design, risk assessment. |
471
- | **E** | Execution | Build it. Implementation follows the approved specs and design. |
472
- | **V** | Validation | Verify it works. Tests, QA, code review against original specs. |
473
- | **C** | Confirmation | Ship it. Documentation, deployment, stakeholder handoff. |
474
-
475
- ### The Problem with Autopilot AI
476
-
477
- Most AI coding workflows look like this:
478
- ```
479
- User: "Add authentication"
480
- AI: *generates 500 lines of code*
481
- User: "That's not what I wanted..."
482
- ```
483
-
484
- PREVC fixes this:
485
- ```
486
- P: What type of auth? OAuth, JWT, session? What providers?
487
- R: Here's the architecture. Dependencies: X, Y. Risks: Z. Approve?
488
- E: Implementing approved design...
489
- V: All 15 tests pass. Security audit complete.
490
- C: Deployed. Docs updated. Ready for review.
491
- ```
492
-
493
- ## Documentation
494
-
495
- - [User Guide](./docs/GUIDE.md) — Complete usage guide
496
-
497
-
498
- ### Smart Project Detection
499
-
500
- The system automatically detects your project type and generates only relevant scaffolds:
501
-
502
- | Project Type | Detected By | Docs | Agents |
503
- |--------------|-------------|------|--------|
504
- | **CLI** | `bin` field, commander/yargs | Core docs | Core agents |
505
- | **Web Frontend** | React, Vue, Angular, Svelte | + architecture, security | + frontend, devops |
506
- | **Web Backend** | Express, NestJS, FastAPI | + architecture, data-flow, security | + backend, database, devops |
507
- | **Full Stack** | Both frontend + backend | All docs | All agents |
508
- | **Mobile** | React Native, Flutter | + architecture, security | + mobile, devops |
509
- | **Library** | `main`/`exports` without `bin` | Core docs | Core agents |
510
- | **Monorepo** | Lerna, Nx, Turborepo | All docs | All agents |
511
-
512
- **Core scaffolds** (always included):
513
- - Docs: project-overview, development-workflow, testing-strategy, tooling
514
- - Agents: code-reviewer, bug-fixer, feature-developer, refactoring-specialist, test-writer, documentation-writer, performance-optimizer
515
-
516
- ### Scale-Adaptive Routing
517
-
518
- The system automatically detects project scale and adjusts the workflow:
519
-
520
- | Scale | Phases | Use Case |
521
- |-------|--------|----------|
522
- | QUICK | E → V | Bug fixes, small tweaks |
523
- | SMALL | P → E → V | Simple features |
524
- | MEDIUM | P → R → E → V | Regular features |
525
- | LARGE | P → R → E → V → C | Complex systems, compliance |
526
-
527
- ## CLI Reference
528
-
529
- ### Requirements
530
-
531
- - Node.js 20+
532
-
533
- **Context creation, AI generation, and refresh are MCP-only.** Use `npx @dotcontext/mcp install` and let your AI tool use its own LLM.
534
-
535
- ### Available MCP Tools
536
-
537
- Once configured, your AI assistant will have access to 9 gateway tools with action-based dispatching:
538
-
539
- #### Gateway Tools (Primary Interface)
540
-
541
- | Gateway | Description | Actions |
542
- |---------|-------------|---------|
543
- | **explore** | File and code exploration | `read`, `list`, `analyze`, `search`, `getStructure` |
544
- | **context** | Context scaffolding, semantic context, and optional Q&A/flow helpers | `check`, `bootstrapStatus`, `init`, `fill`, `fillSingle`, `listToFill`, `getMap`, `buildSemantic`, `scaffoldPlan`, `searchQA`, `generateQA`, `getFlow`, `detectPatterns` |
545
- | **plan** | Plan management and execution tracking | `link`, `getLinked`, `getDetails`, `getForPhase`, `updatePhase`, `recordDecision`, `updateStep`, `getStatus`, `syncMarkdown`, `commitPhase` |
546
- | **agent** | Agent orchestration and discovery | `discover`, `getInfo`, `orchestrate`, `getSequence`, `getDocs`, `getPhaseDocs`, `listTypes` |
547
- | **skill** | Skill management for on-demand expertise | `list`, `getContent`, `getForPhase`, `scaffold`, `export`, `fill` |
548
- | **sync** | Import/export synchronization with AI tools | `exportRules`, `exportDocs`, `exportAgents`, `exportContext`, `exportSkills`, `reverseSync`, `importDocs`, `importAgents`, `importSkills` |
549
-
550
- `context init` also bootstraps `.context/harness/sensors.json`. While that catalog is still in bootstrap form, `context listToFill`/`fill` can return it so the AI can customize project-specific quality sensors.
551
-
552
- `searchQA` ranks generated `.context/docs/qa/*.md` helper docs by keyword match. It is a lightweight shortcut, not embedding-based semantic retrieval, and `generateQA` is opt-in.
553
-
554
- #### Dedicated Workflow Tools
555
-
556
- | Tool | Description |
557
- |------|-------------|
558
- | **workflow-init** | Initialize a PREVC workflow with scale detection, gates, and autonomous mode |
559
- | **workflow-status** | Get current workflow status, phases, and execution history |
560
- | **workflow-advance** | Advance to the next PREVC phase with gate checking |
561
- | **workflow-manage** | Manage handoffs, collaboration, documents, gates, and approvals |
562
-
563
- #### Key Features in v0.7.0
564
-
565
- - **Gateway Pattern**: Simplified, action-based tools reduce cognitive load
566
- - **Plan Execution Tracking**: Step-level tracking with `updateStep`, `getStatus`, `syncMarkdown` actions
567
- - **Git Integration**: `commitPhase` action for creating commits on phase completion
568
- - **Q&A & Pattern Detection**: Automatic Q&A generation and functional pattern analysis
569
- - **Execution History**: Comprehensive logging of all workflow actions to `.context/workflow/actions.jsonl`
570
- - **Workflow Gates**: Phase transition gates based on project scale with approval requirements
571
- - **Export/Import Tools**: Granular control over docs, agents, and skills sync with merge strategies
572
-
573
- ### Skills (On-Demand Expertise)
574
-
575
- Skills are task-specific procedures that AI agents activate when needed:
576
-
577
- | Skill | Description | Phases |
578
- |-------|-------------|--------|
579
- | `commit-message` | Generate conventional commits | E, C |
580
- | `pr-review` | Review PRs against standards | R, V |
581
- | `code-review` | Code quality review | R, V |
582
- | `test-generation` | Generate test cases | E, V |
583
- | `documentation` | Generate/update docs | P, C |
584
- | `refactoring` | Safe refactoring steps | E |
585
- | `bug-investigation` | Bug investigation flow | E, V |
586
- | `feature-breakdown` | Break features into tasks | P |
587
- | `api-design` | Design RESTful APIs | P, R |
588
- | `security-audit` | Security review checklist | R, V |
589
-
590
- ```bash
591
- npx -y @dotcontext/cli@latest admin skill list # List available skills
592
- npx -y @dotcontext/cli@latest admin skill export # Export to AI tools
593
- ```
594
-
595
- Use MCP tools from your AI assistant to scaffold, fill, or refresh skills and other context files.
596
-
597
- ### Agent Types
598
-
599
- The orchestration system maps tasks to specialized agents:
600
-
601
- | Agent | Focus |
602
- |-------|-------|
603
- | `architect-specialist` | System architecture and patterns |
604
- | `feature-developer` | New feature implementation |
605
- | `bug-fixer` | Bug identification and fixes |
606
- | `test-writer` | Test suites and coverage |
607
- | `code-reviewer` | Code quality and best practices |
608
- | `security-auditor` | Security vulnerabilities |
609
- | `performance-optimizer` | Performance bottlenecks |
610
- | `documentation-writer` | Technical documentation |
611
- | `backend-specialist` | Server-side logic and APIs |
612
- | `frontend-specialist` | User interfaces |
613
- | `database-specialist` | Database solutions |
614
- | `devops-specialist` | CI/CD and deployment |
615
- | `mobile-specialist` | Mobile applications |
616
- | `refactoring-specialist` | Code structure improvements |
617
-
618
-
619
- ## Migration from @ai-coders/context
620
-
621
- ### Why the rename?
622
-
623
- The previous name `@ai-coders/context` caused frequent confusion with **Context7** and other tools that use "context" in their name. In the AI/LLM tooling space, "context" is too generic. The new name **dotcontext** is unique, searchable, and directly references the `.context/` directory convention at the core of this tool.
624
-
625
- ### What changed
626
-
627
- | Before | After |
628
- |--------|-------|
629
- | `npm install @ai-coders/context` | `npm install @dotcontext/cli` |
630
- | `npx @ai-coders/context` | `npx -y @dotcontext/cli@latest` |
631
- | CLI command: `ai-context` | CLI command: `dotcontext` |
632
- | MCP server name: `"ai-context"` | MCP server name: `"dotcontext"` |
633
- | Env var: `AI_CONTEXT_LANG` | Env var: `DOTCONTEXT_LANG` |
634
-
635
- ### What did NOT change
636
-
637
- - The `.context/` directory structure and all its contents
638
- - The PREVC workflow system
639
- - All MCP tool names and actions
640
- - All scaffold formats and frontmatter conventions
641
- - The MIT license
642
-
643
- ### Step-by-step migration
644
-
645
- 1. **Update your global install** (if applicable):
646
- ```bash
647
- npm uninstall -g @ai-coders/context
648
- npm install -g @dotcontext/cli
649
- ```
650
-
651
- 2. **Update MCP configurations** -- re-run the installer:
652
- ```bash
653
- npx @dotcontext/mcp install
654
- ```
655
- Or manually replace `"ai-context"` with `"dotcontext"` and `"@ai-coders/context"` with `"@dotcontext/mcp"` in your MCP JSON configs.
656
-
657
- 3. **Update shell aliases** -- replace `ai-context` with `dotcontext` in your `.bashrc`, `.zshrc`, or equivalent.
658
-
659
- 4. **Update environment variables** -- rename `AI_CONTEXT_LANG` to `DOTCONTEXT_LANG` if you set it.
660
-
661
- 5. **No changes to `.context/` needed** -- the directory, files, and frontmatter are all unchanged.
662
-
663
- ## License
664
-
665
- MIT © Vinícius Lana
12
+ It depends on the harness and MCP boundaries but is the user-facing entrypoint.
@@ -5,7 +5,7 @@
5
5
  * become the future `dotcontext/cli` package. Keep domain/runtime logic
6
6
  * out of this boundary whenever possible.
7
7
  */
8
- export { MCPInstallService, type MCPInstallServiceDependencies, type MCPInstallOptions, type MCPInstallResult, type MCPInstallation, StateDetector, type ProjectState, type StateDetectionResult, type StateDetectorOptions, } from '../services/cli';
8
+ export { MCPInstallService, buildMcpInstallToolChoices, resolveMcpInstallToolSelection, type MCPInstallServiceDependencies, type MCPInstallOptions, type MCPInstallResult, type MCPInstallation, type MCPInstallToolChoice, type MCPInstallToolPrompt, type ResolveMcpInstallToolSelectionOptions, StateDetector, type ProjectState, type StateDetectionResult, type StateDetectorOptions, } from '../services/cli';
9
9
  export { SyncService } from '../services/sync/syncService';
10
10
  export { ImportRulesService, ImportAgentsService } from '../services/import';
11
11
  export { ExportRulesService } from '../services/export';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,iBAAiB,EACjB,KAAK,6BAA6B,EAClC,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,8BAA8B,EAC9B,KAAK,6BAA6B,EAClC,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,qCAAqC,EAC1C,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC"}