@dotcontext/cli 0.9.1 → 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 +7 -662
- package/package.json +19 -66
package/README.md
CHANGED
|
@@ -1,667 +1,12 @@
|
|
|
1
1
|
# @dotcontext/cli
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://github.com/vinilana/dotcontext/actions/workflows/ci.yml)
|
|
5
|
-
[](https://opensource.org/licenses/MIT)
|
|
3
|
+
Operator-facing package for dotcontext.
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
This package owns:
|
|
8
6
|
|
|
9
|
-
|
|
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
|
|
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
|
-
- Opens the interactive tool picker when you run `install` in a terminal without a tool id
|
|
214
|
-
- Configures the `dotcontext` MCP server in each tool
|
|
215
|
-
- Supports global (home directory) and local (project directory) installation
|
|
216
|
-
- Falls back to `all` detected tools in non-interactive runs without a tool id
|
|
217
|
-
- Merges with existing MCP configurations without overwriting unrelated servers
|
|
218
|
-
- Includes `--dry-run` and `--verbose` modes
|
|
219
|
-
- Writes the config shape required by each supported client
|
|
220
|
-
|
|
221
|
-
Examples:
|
|
222
|
-
|
|
223
|
-
```bash
|
|
224
|
-
# Interactive install for detected tools
|
|
225
|
-
npx @dotcontext/mcp install
|
|
226
|
-
|
|
227
|
-
# Install for a specific tool
|
|
228
|
-
npx @dotcontext/mcp install codex
|
|
229
|
-
|
|
230
|
-
# Install in the current project instead of your home directory
|
|
231
|
-
npx @dotcontext/mcp install cursor --local
|
|
232
|
-
|
|
233
|
-
# Preview without writing files
|
|
234
|
-
npx @dotcontext/mcp install claude --dry-run --verbose
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
### Supported MCP Install Targets
|
|
238
|
-
|
|
239
|
-
`install` currently supports these tool ids:
|
|
240
|
-
|
|
241
|
-
| Tool ID | Tool | Config Shape |
|
|
242
|
-
| --- | --- | --- |
|
|
243
|
-
| `claude` | Claude Code | `mcpServers` JSON |
|
|
244
|
-
| `cursor` | Cursor AI | `mcpServers` JSON with `type: "stdio"` |
|
|
245
|
-
| `windsurf` | Windsurf | `mcpServers` JSON |
|
|
246
|
-
| `continue` | Continue.dev | standalone `.continue/mcpServers/dotcontext.json` |
|
|
247
|
-
| `claude-desktop` | Claude Desktop | `mcpServers` JSON |
|
|
248
|
-
| `vscode` | VS Code (GitHub Copilot) | `servers` JSON |
|
|
249
|
-
| `roo` | Roo Code | `mcpServers` JSON |
|
|
250
|
-
| `amazonq` | Amazon Q Developer CLI | `mcpServers` JSON |
|
|
251
|
-
| `gemini-cli` | Gemini CLI | `mcpServers` JSON |
|
|
252
|
-
| `codex` | Codex CLI | TOML `[mcp_servers.dotcontext]` |
|
|
253
|
-
| `kiro` | Kiro | `mcpServers` JSON |
|
|
254
|
-
| `zed` | Zed Editor | `context_servers` JSON |
|
|
255
|
-
| `jetbrains` | JetBrains IDEs | `servers` array |
|
|
256
|
-
| `trae` | Trae AI | `mcpServers` JSON |
|
|
257
|
-
| `kilo` | Kilo Code | `mcp` JSON |
|
|
258
|
-
| `copilot-cli` | GitHub Copilot CLI | `mcpServers` JSON |
|
|
259
|
-
|
|
260
|
-
### Manual Configuration
|
|
261
|
-
|
|
262
|
-
Use manual configuration only when you cannot use `@dotcontext/mcp install`. The exact file format depends on the client.
|
|
263
|
-
|
|
264
|
-
Dotcontext writes this command into client configs:
|
|
265
|
-
|
|
266
|
-
```text
|
|
267
|
-
command: npx
|
|
268
|
-
args: ["-y", "@dotcontext/mcp@latest"]
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
#### Standard `mcpServers` JSON
|
|
272
|
-
|
|
273
|
-
Used by tools such as Claude Code, Windsurf, Claude Desktop, Roo Code, Amazon Q Developer CLI, Gemini CLI, Trae AI, and GitHub Copilot CLI.
|
|
274
|
-
|
|
275
|
-
```json
|
|
276
|
-
{
|
|
277
|
-
"mcpServers": {
|
|
278
|
-
"dotcontext": {
|
|
279
|
-
"command": "npx",
|
|
280
|
-
"args": ["-y", "@dotcontext/mcp@latest"]
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
#### Cursor
|
|
287
|
-
|
|
288
|
-
Cursor expects `type: "stdio"`:
|
|
289
|
-
|
|
290
|
-
```json
|
|
291
|
-
{
|
|
292
|
-
"mcpServers": {
|
|
293
|
-
"dotcontext": {
|
|
294
|
-
"type": "stdio",
|
|
295
|
-
"command": "npx",
|
|
296
|
-
"args": ["-y", "@dotcontext/mcp@latest"]
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
#### Continue.dev
|
|
303
|
-
|
|
304
|
-
Continue uses a standalone per-server file:
|
|
305
|
-
|
|
306
|
-
```json
|
|
307
|
-
{
|
|
308
|
-
"command": "npx",
|
|
309
|
-
"args": ["-y", "@dotcontext/mcp@latest"],
|
|
310
|
-
"env": {}
|
|
311
|
-
}
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
#### VS Code (GitHub Copilot)
|
|
315
|
-
|
|
316
|
-
VS Code uses `servers` instead of `mcpServers`:
|
|
317
|
-
|
|
318
|
-
```json
|
|
319
|
-
{
|
|
320
|
-
"servers": {
|
|
321
|
-
"dotcontext": {
|
|
322
|
-
"type": "stdio",
|
|
323
|
-
"command": "npx",
|
|
324
|
-
"args": ["-y", "@dotcontext/mcp@latest"]
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
#### Zed
|
|
331
|
-
|
|
332
|
-
Zed uses `context_servers`:
|
|
333
|
-
|
|
334
|
-
```json
|
|
335
|
-
{
|
|
336
|
-
"context_servers": {
|
|
337
|
-
"dotcontext": {
|
|
338
|
-
"command": "npx",
|
|
339
|
-
"args": ["-y", "@dotcontext/mcp@latest"],
|
|
340
|
-
"env": {}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
#### JetBrains IDEs
|
|
347
|
-
|
|
348
|
-
JetBrains uses a `servers` array:
|
|
349
|
-
|
|
350
|
-
```json
|
|
351
|
-
{
|
|
352
|
-
"servers": [
|
|
353
|
-
{
|
|
354
|
-
"name": "dotcontext",
|
|
355
|
-
"command": "npx",
|
|
356
|
-
"args": ["-y", "@dotcontext/mcp@latest"],
|
|
357
|
-
"env": {}
|
|
358
|
-
}
|
|
359
|
-
]
|
|
360
|
-
}
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
#### Kilo Code
|
|
364
|
-
|
|
365
|
-
Kilo uses `mcp.dotcontext` with a command array:
|
|
366
|
-
|
|
367
|
-
```json
|
|
368
|
-
{
|
|
369
|
-
"mcp": {
|
|
370
|
-
"dotcontext": {
|
|
371
|
-
"type": "local",
|
|
372
|
-
"command": ["npx", "-y", "@dotcontext/mcp@latest"],
|
|
373
|
-
"enabled": true
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
#### Codex CLI
|
|
380
|
-
|
|
381
|
-
Codex uses TOML:
|
|
382
|
-
|
|
383
|
-
```toml
|
|
384
|
-
[mcp_servers.dotcontext]
|
|
385
|
-
command = "npx"
|
|
386
|
-
args = ["-y", "@dotcontext/mcp@latest"]
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
### Local Development
|
|
390
|
-
|
|
391
|
-
For local development, point directly to the dedicated MCP binary after `npm run build`:
|
|
392
|
-
|
|
393
|
-
```json
|
|
394
|
-
{
|
|
395
|
-
"mcpServers": {
|
|
396
|
-
"dotcontext-dev": {
|
|
397
|
-
"command": "node",
|
|
398
|
-
"args": ["/absolute/path/to/this-repo/dist/mcp/bin.js"]
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
## Youtube video
|
|
405
|
-
[](https://www.youtube.com/watch?v=p9uV3CeLaKY)
|
|
406
|
-
|
|
407
|
-
## Connect with Us
|
|
408
|
-
|
|
409
|
-
Built by [AI Coders Academy](http://aicoders.academy/) — Learn AI-assisted development and become a more productive developer.
|
|
410
|
-
|
|
411
|
-
- [AI Coders Academy](http://aicoders.academy/) — Courses and resources for AI-powered coding
|
|
412
|
-
- [YouTube Channel](https://www.youtube.com/@aicodersacademy) — Tutorials, demos, and best practices
|
|
413
|
-
- [Connect with Vini](https://www.linkedin.com/in/viniciuslanadepaula/) — Creator of @dotcontext/cli
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
## Why PREVC?
|
|
417
|
-
|
|
418
|
-
### English
|
|
419
|
-
|
|
420
|
-
LLMs produce better results when they follow a structured process instead of generating code blindly. PREVC ensures:
|
|
421
|
-
|
|
422
|
-
- **Specifications before code** — AI understands what to build before building it
|
|
423
|
-
- **Context awareness** — Each phase has the right documentation and agent
|
|
424
|
-
- **Human checkpoints** — Review and validate at each step, not just at the end
|
|
425
|
-
- **Reproducible quality** — Same process, consistent results across projects
|
|
426
|
-
|
|
427
|
-
### Português
|
|
428
|
-
|
|
429
|
-
LLMs produzem melhores resultados quando seguem um processo estruturado em vez de gerar código cegamente. PREVC garante:
|
|
430
|
-
|
|
431
|
-
- **Especificações antes do código** — IA entende o que construir antes de construir
|
|
432
|
-
- **Consciência de contexto** — Cada fase tem a documentação e o agente corretos
|
|
433
|
-
- **Checkpoints humanos** — Revise e valide em cada etapa, não apenas no final
|
|
434
|
-
- **Qualidade reproduzível** — Mesmo processo, resultados consistentes entre projetos
|
|
435
|
-
|
|
436
|
-
## What it does / O que faz
|
|
437
|
-
|
|
438
|
-
### English
|
|
439
|
-
|
|
440
|
-
1. **Creates documentation** — Structured docs from your codebase (architecture, data flow, decisions)
|
|
441
|
-
2. **Generates agent playbooks** — 14 specialized AI agents (code-reviewer, bug-fixer, architect, etc.)
|
|
442
|
-
3. **Smart scaffold filtering** — Automatically detects project type and generates only relevant content
|
|
443
|
-
4. **Useful out-of-the-box** — Scaffolds include practical template content, not empty placeholders
|
|
444
|
-
5. **Manages workflows** — PREVC process with scale detection, gates, and execution history
|
|
445
|
-
6. **Provides skills** — On-demand expertise (commit messages, PR reviews, security audits)
|
|
446
|
-
7. **Syncs everywhere** — Export to Cursor, Claude, Copilot, Windsurf, Cline, Codex, Antigravity, Trae, and more
|
|
447
|
-
8. **Tracks execution** — Step-level tracking with git integration for workflow phases
|
|
448
|
-
9. **Keeps it updated** — Detects code changes and suggests documentation updates
|
|
449
|
-
|
|
450
|
-
### Português
|
|
451
|
-
|
|
452
|
-
1. **Cria documentação** — Docs estruturados do seu codebase (arquitetura, fluxo de dados, decisões)
|
|
453
|
-
2. **Gera playbooks de agentes** — 14 agentes de IA especializados (code-reviewer, bug-fixer, architect, etc.)
|
|
454
|
-
3. **Filtragem inteligente de scaffold** — Detecta automaticamente o tipo de projeto e gera apenas conteúdo relevante
|
|
455
|
-
4. **Útil de imediato** — Scaffolds incluem conteúdo prático, não placeholders vazios
|
|
456
|
-
5. **Gerencia workflows** — Processo PREVC com detecção de escala, gates e histórico de execução
|
|
457
|
-
6. **Fornece skills** — Expertise sob demanda (mensagens de commit, revisões de PR, auditorias de segurança)
|
|
458
|
-
7. **Sincroniza em todos os lugares** — Exporte para Cursor, Claude, Copilot, Windsurf, Cline, Codex, Antigravity, Trae e mais
|
|
459
|
-
8. **Rastreia execução** — Rastreamento por etapa com integração git para fases de workflow
|
|
460
|
-
9. **Mantém atualizado** — Detecta mudanças no código e sugere atualizações de documentação
|
|
461
|
-
|
|
462
|
-
PT-BR Tutorial
|
|
463
|
-
https://www.youtube.com/watch?v=5BPrfZAModk
|
|
464
|
-
|
|
465
|
-
## PREVC Workflow System
|
|
466
|
-
|
|
467
|
-
A universal 5-phase process designed to improve LLM output quality through structured, spec-driven development:
|
|
468
|
-
|
|
469
|
-
| Phase | Name | Purpose |
|
|
470
|
-
|-------|------|---------|
|
|
471
|
-
| **P** | Planning | Define what to build. Gather requirements, write specs, identify scope. No code yet. |
|
|
472
|
-
| **R** | Review | Validate the approach. Architecture decisions, technical design, risk assessment. |
|
|
473
|
-
| **E** | Execution | Build it. Implementation follows the approved specs and design. |
|
|
474
|
-
| **V** | Validation | Verify it works. Tests, QA, code review against original specs. |
|
|
475
|
-
| **C** | Confirmation | Ship it. Documentation, deployment, stakeholder handoff. |
|
|
476
|
-
|
|
477
|
-
### The Problem with Autopilot AI
|
|
478
|
-
|
|
479
|
-
Most AI coding workflows look like this:
|
|
480
|
-
```
|
|
481
|
-
User: "Add authentication"
|
|
482
|
-
AI: *generates 500 lines of code*
|
|
483
|
-
User: "That's not what I wanted..."
|
|
484
|
-
```
|
|
485
|
-
|
|
486
|
-
PREVC fixes this:
|
|
487
|
-
```
|
|
488
|
-
P: What type of auth? OAuth, JWT, session? What providers?
|
|
489
|
-
R: Here's the architecture. Dependencies: X, Y. Risks: Z. Approve?
|
|
490
|
-
E: Implementing approved design...
|
|
491
|
-
V: All 15 tests pass. Security audit complete.
|
|
492
|
-
C: Deployed. Docs updated. Ready for review.
|
|
493
|
-
```
|
|
494
|
-
|
|
495
|
-
## Documentation
|
|
496
|
-
|
|
497
|
-
- [User Guide](./docs/GUIDE.md) — Complete usage guide
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
### Smart Project Detection
|
|
501
|
-
|
|
502
|
-
The system automatically detects your project type and generates only relevant scaffolds:
|
|
503
|
-
|
|
504
|
-
| Project Type | Detected By | Docs | Agents |
|
|
505
|
-
|--------------|-------------|------|--------|
|
|
506
|
-
| **CLI** | `bin` field, commander/yargs | Core docs | Core agents |
|
|
507
|
-
| **Web Frontend** | React, Vue, Angular, Svelte | + architecture, security | + frontend, devops |
|
|
508
|
-
| **Web Backend** | Express, NestJS, FastAPI | + architecture, data-flow, security | + backend, database, devops |
|
|
509
|
-
| **Full Stack** | Both frontend + backend | All docs | All agents |
|
|
510
|
-
| **Mobile** | React Native, Flutter | + architecture, security | + mobile, devops |
|
|
511
|
-
| **Library** | `main`/`exports` without `bin` | Core docs | Core agents |
|
|
512
|
-
| **Monorepo** | Lerna, Nx, Turborepo | All docs | All agents |
|
|
513
|
-
|
|
514
|
-
**Core scaffolds** (always included):
|
|
515
|
-
- Docs: project-overview, development-workflow, testing-strategy, tooling
|
|
516
|
-
- Agents: code-reviewer, bug-fixer, feature-developer, refactoring-specialist, test-writer, documentation-writer, performance-optimizer
|
|
517
|
-
|
|
518
|
-
### Scale-Adaptive Routing
|
|
519
|
-
|
|
520
|
-
The system automatically detects project scale and adjusts the workflow:
|
|
521
|
-
|
|
522
|
-
| Scale | Phases | Use Case |
|
|
523
|
-
|-------|--------|----------|
|
|
524
|
-
| QUICK | E → V | Bug fixes, small tweaks |
|
|
525
|
-
| SMALL | P → E → V | Simple features |
|
|
526
|
-
| MEDIUM | P → R → E → V | Regular features |
|
|
527
|
-
| LARGE | P → R → E → V → C | Complex systems, compliance |
|
|
528
|
-
|
|
529
|
-
## CLI Reference
|
|
530
|
-
|
|
531
|
-
### Requirements
|
|
532
|
-
|
|
533
|
-
- Node.js 20+
|
|
534
|
-
|
|
535
|
-
**Context creation, AI generation, and refresh are MCP-only.** Use `npx @dotcontext/mcp install` and let your AI tool use its own LLM.
|
|
536
|
-
|
|
537
|
-
### Available MCP Tools
|
|
538
|
-
|
|
539
|
-
Once configured, your AI assistant will have access to 9 gateway tools with action-based dispatching:
|
|
540
|
-
|
|
541
|
-
#### Gateway Tools (Primary Interface)
|
|
542
|
-
|
|
543
|
-
| Gateway | Description | Actions |
|
|
544
|
-
|---------|-------------|---------|
|
|
545
|
-
| **explore** | File and code exploration | `read`, `list`, `analyze`, `search`, `getStructure` |
|
|
546
|
-
| **context** | Context scaffolding, semantic context, and optional Q&A/flow helpers | `check`, `bootstrapStatus`, `init`, `fill`, `fillSingle`, `listToFill`, `getMap`, `buildSemantic`, `scaffoldPlan`, `searchQA`, `generateQA`, `getFlow`, `detectPatterns` |
|
|
547
|
-
| **plan** | Plan management and execution tracking | `link`, `getLinked`, `getDetails`, `getForPhase`, `updatePhase`, `recordDecision`, `updateStep`, `getStatus`, `syncMarkdown`, `commitPhase` |
|
|
548
|
-
| **agent** | Agent orchestration and discovery | `discover`, `getInfo`, `orchestrate`, `getSequence`, `getDocs`, `getPhaseDocs`, `listTypes` |
|
|
549
|
-
| **skill** | Skill management for on-demand expertise | `list`, `getContent`, `getForPhase`, `scaffold`, `export`, `fill` |
|
|
550
|
-
| **sync** | Import/export synchronization with AI tools | `exportRules`, `exportDocs`, `exportAgents`, `exportContext`, `exportSkills`, `reverseSync`, `importDocs`, `importAgents`, `importSkills` |
|
|
551
|
-
|
|
552
|
-
`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.
|
|
553
|
-
|
|
554
|
-
`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.
|
|
555
|
-
|
|
556
|
-
#### Dedicated Workflow Tools
|
|
557
|
-
|
|
558
|
-
| Tool | Description |
|
|
559
|
-
|------|-------------|
|
|
560
|
-
| **workflow-init** | Initialize a PREVC workflow with scale detection, gates, and autonomous mode |
|
|
561
|
-
| **workflow-status** | Get current workflow status, phases, and execution history |
|
|
562
|
-
| **workflow-advance** | Advance to the next PREVC phase with gate checking |
|
|
563
|
-
| **workflow-manage** | Manage handoffs, collaboration, documents, gates, and approvals |
|
|
564
|
-
|
|
565
|
-
#### Key Features in v0.7.0
|
|
566
|
-
|
|
567
|
-
- **Gateway Pattern**: Simplified, action-based tools reduce cognitive load
|
|
568
|
-
- **Plan Execution Tracking**: Step-level tracking with `updateStep`, `getStatus`, `syncMarkdown` actions
|
|
569
|
-
- **Git Integration**: `commitPhase` action for creating commits on phase completion
|
|
570
|
-
- **Q&A & Pattern Detection**: Automatic Q&A generation and functional pattern analysis
|
|
571
|
-
- **Execution History**: Comprehensive logging of all workflow actions to `.context/workflow/actions.jsonl`
|
|
572
|
-
- **Workflow Gates**: Phase transition gates based on project scale with approval requirements
|
|
573
|
-
- **Export/Import Tools**: Granular control over docs, agents, and skills sync with merge strategies
|
|
574
|
-
|
|
575
|
-
### Skills (On-Demand Expertise)
|
|
576
|
-
|
|
577
|
-
Skills are task-specific procedures that AI agents activate when needed:
|
|
578
|
-
|
|
579
|
-
| Skill | Description | Phases |
|
|
580
|
-
|-------|-------------|--------|
|
|
581
|
-
| `commit-message` | Generate conventional commits | E, C |
|
|
582
|
-
| `pr-review` | Review PRs against standards | R, V |
|
|
583
|
-
| `code-review` | Code quality review | R, V |
|
|
584
|
-
| `test-generation` | Generate test cases | E, V |
|
|
585
|
-
| `documentation` | Generate/update docs | P, C |
|
|
586
|
-
| `refactoring` | Safe refactoring steps | E |
|
|
587
|
-
| `bug-investigation` | Bug investigation flow | E, V |
|
|
588
|
-
| `feature-breakdown` | Break features into tasks | P |
|
|
589
|
-
| `api-design` | Design RESTful APIs | P, R |
|
|
590
|
-
| `security-audit` | Security review checklist | R, V |
|
|
591
|
-
|
|
592
|
-
```bash
|
|
593
|
-
npx -y @dotcontext/cli@latest admin skill list # List available skills
|
|
594
|
-
npx -y @dotcontext/cli@latest admin skill export # Export to AI tools
|
|
595
|
-
```
|
|
596
|
-
|
|
597
|
-
Use MCP tools from your AI assistant to scaffold, fill, or refresh skills and other context files.
|
|
598
|
-
|
|
599
|
-
### Agent Types
|
|
600
|
-
|
|
601
|
-
The orchestration system maps tasks to specialized agents:
|
|
602
|
-
|
|
603
|
-
| Agent | Focus |
|
|
604
|
-
|-------|-------|
|
|
605
|
-
| `architect-specialist` | System architecture and patterns |
|
|
606
|
-
| `feature-developer` | New feature implementation |
|
|
607
|
-
| `bug-fixer` | Bug identification and fixes |
|
|
608
|
-
| `test-writer` | Test suites and coverage |
|
|
609
|
-
| `code-reviewer` | Code quality and best practices |
|
|
610
|
-
| `security-auditor` | Security vulnerabilities |
|
|
611
|
-
| `performance-optimizer` | Performance bottlenecks |
|
|
612
|
-
| `documentation-writer` | Technical documentation |
|
|
613
|
-
| `backend-specialist` | Server-side logic and APIs |
|
|
614
|
-
| `frontend-specialist` | User interfaces |
|
|
615
|
-
| `database-specialist` | Database solutions |
|
|
616
|
-
| `devops-specialist` | CI/CD and deployment |
|
|
617
|
-
| `mobile-specialist` | Mobile applications |
|
|
618
|
-
| `refactoring-specialist` | Code structure improvements |
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
## Migration from @ai-coders/context
|
|
622
|
-
|
|
623
|
-
### Why the rename?
|
|
624
|
-
|
|
625
|
-
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.
|
|
626
|
-
|
|
627
|
-
### What changed
|
|
628
|
-
|
|
629
|
-
| Before | After |
|
|
630
|
-
|--------|-------|
|
|
631
|
-
| `npm install @ai-coders/context` | `npm install @dotcontext/cli` |
|
|
632
|
-
| `npx @ai-coders/context` | `npx -y @dotcontext/cli@latest` |
|
|
633
|
-
| CLI command: `ai-context` | CLI command: `dotcontext` |
|
|
634
|
-
| MCP server name: `"ai-context"` | MCP server name: `"dotcontext"` |
|
|
635
|
-
| Env var: `AI_CONTEXT_LANG` | Env var: `DOTCONTEXT_LANG` |
|
|
636
|
-
|
|
637
|
-
### What did NOT change
|
|
638
|
-
|
|
639
|
-
- The `.context/` directory structure and all its contents
|
|
640
|
-
- The PREVC workflow system
|
|
641
|
-
- All MCP tool names and actions
|
|
642
|
-
- All scaffold formats and frontmatter conventions
|
|
643
|
-
- The MIT license
|
|
644
|
-
|
|
645
|
-
### Step-by-step migration
|
|
646
|
-
|
|
647
|
-
1. **Update your global install** (if applicable):
|
|
648
|
-
```bash
|
|
649
|
-
npm uninstall -g @ai-coders/context
|
|
650
|
-
npm install -g @dotcontext/cli
|
|
651
|
-
```
|
|
652
|
-
|
|
653
|
-
2. **Update MCP configurations** -- re-run the installer:
|
|
654
|
-
```bash
|
|
655
|
-
npx @dotcontext/mcp install
|
|
656
|
-
```
|
|
657
|
-
Or manually replace `"ai-context"` with `"dotcontext"` and `"@ai-coders/context"` with `"@dotcontext/mcp"` in your MCP JSON configs.
|
|
658
|
-
|
|
659
|
-
3. **Update shell aliases** -- replace `ai-context` with `dotcontext` in your `.bashrc`, `.zshrc`, or equivalent.
|
|
660
|
-
|
|
661
|
-
4. **Update environment variables** -- rename `AI_CONTEXT_LANG` to `DOTCONTEXT_LANG` if you set it.
|
|
662
|
-
|
|
663
|
-
5. **No changes to `.context/` needed** -- the directory, files, and frontmatter are all unchanged.
|
|
664
|
-
|
|
665
|
-
## License
|
|
666
|
-
|
|
667
|
-
MIT © Vinícius Lana
|
|
12
|
+
It depends on the harness and MCP boundaries but is the user-facing entrypoint.
|
package/package.json
CHANGED
|
@@ -1,48 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotcontext/cli",
|
|
3
|
-
"version": "0.9.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
"exports": {
|
|
7
|
-
".": "./dist/cli/index.js",
|
|
8
|
-
"./package.json": "./package.json",
|
|
9
|
-
"./cli": "./dist/cli/index.js",
|
|
10
|
-
"./harness": "./dist/harness/index.js",
|
|
11
|
-
"./mcp": "./dist/mcp/index.js"
|
|
12
|
-
},
|
|
13
|
-
"bin": {
|
|
14
|
-
"dotcontext": "dist/index.js"
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"dist/**/*",
|
|
18
|
-
"README.md",
|
|
19
|
-
"LICENSE",
|
|
20
|
-
"prompts/**/*"
|
|
21
|
-
],
|
|
22
|
-
"engines": {
|
|
23
|
-
"node": ">=20.0.0"
|
|
24
|
-
},
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\" && tsc",
|
|
27
|
-
"build:packages": "npm run build && node scripts/build-package-bundles.js",
|
|
28
|
-
"smoke:packages": "node scripts/smoke-package-bundles.js",
|
|
29
|
-
"release:packages": "node scripts/release-packages.js",
|
|
30
|
-
"release:packages:patch": "node scripts/release-packages.js patch",
|
|
31
|
-
"release:packages:minor": "node scripts/release-packages.js minor",
|
|
32
|
-
"release:packages:major": "node scripts/release-packages.js major",
|
|
33
|
-
"dev": "tsx src/index.ts",
|
|
34
|
-
"start": "node dist/index.js",
|
|
35
|
-
"test": "jest",
|
|
36
|
-
"prepublishOnly": "npm run build",
|
|
37
|
-
"version": "npm run build",
|
|
38
|
-
"release": "npm version patch && npm publish --access public",
|
|
39
|
-
"release:minor": "npm version minor && npm publish --access public",
|
|
40
|
-
"release:major": "npm version major && npm publish --access public"
|
|
41
|
-
},
|
|
42
|
-
"publishConfig": {
|
|
43
|
-
"access": "public",
|
|
44
|
-
"registry": "https://registry.npmjs.org/"
|
|
45
|
-
},
|
|
3
|
+
"version": "0.9.2",
|
|
4
|
+
"description": "Operator-facing package for dotcontext",
|
|
5
|
+
"license": "MIT",
|
|
46
6
|
"repository": {
|
|
47
7
|
"type": "git",
|
|
48
8
|
"url": "git+https://github.com/vinilana/dotcontext.git"
|
|
@@ -51,14 +11,23 @@
|
|
|
51
11
|
"bugs": {
|
|
52
12
|
"url": "https://github.com/vinilana/dotcontext/issues"
|
|
53
13
|
},
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=20.0.0"
|
|
16
|
+
},
|
|
17
|
+
"main": "dist/cli/index.js",
|
|
18
|
+
"types": "dist/cli/index.d.ts",
|
|
19
|
+
"files": [
|
|
20
|
+
"dist/**/*",
|
|
21
|
+
"prompts/**/*",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE"
|
|
59
24
|
],
|
|
60
|
-
"
|
|
61
|
-
|
|
25
|
+
"exports": {
|
|
26
|
+
".": "./dist/cli/index.js"
|
|
27
|
+
},
|
|
28
|
+
"bin": {
|
|
29
|
+
"dotcontext": "dist/index.js"
|
|
30
|
+
},
|
|
62
31
|
"dependencies": {
|
|
63
32
|
"@inquirer/prompts": "^7.10.1",
|
|
64
33
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
@@ -73,21 +42,5 @@
|
|
|
73
42
|
"ora": "^5.4.1",
|
|
74
43
|
"semver": "^7.6.3",
|
|
75
44
|
"zod": "^4.3.5"
|
|
76
|
-
},
|
|
77
|
-
"devDependencies": {
|
|
78
|
-
"@types/cli-progress": "^3.11.0",
|
|
79
|
-
"@types/fs-extra": "^11.0.4",
|
|
80
|
-
"@types/inquirer": "^9.0.8",
|
|
81
|
-
"@types/jest": "^30.0.0",
|
|
82
|
-
"@types/node": "^24.5.2",
|
|
83
|
-
"@types/semver": "^7.5.8",
|
|
84
|
-
"jest": "^30.1.3",
|
|
85
|
-
"ts-jest": "^29.4.4",
|
|
86
|
-
"tsx": "^4.20.6",
|
|
87
|
-
"typescript": "^5.9.2"
|
|
88
|
-
},
|
|
89
|
-
"optionalDependencies": {
|
|
90
|
-
"tree-sitter": "^0.21.0",
|
|
91
|
-
"tree-sitter-typescript": "^0.23.2"
|
|
92
45
|
}
|
|
93
46
|
}
|