@popoverai/dotrequirements 0.13.0 → 0.14.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/README.md +47 -47
- package/dist/cli.js +0 -10
- package/dist/commands/init.js +166 -226
- package/dist/commands/link.d.ts +9 -10
- package/dist/commands/link.js +81 -106
- package/dist/commands/mcp-setup.js +77 -94
- package/dist/commands/pull.js +7 -29
- package/dist/commands/push.js +4 -13
- package/dist/harness/cache.d.ts +0 -5
- package/dist/harness/cache.js +0 -48
- package/dist/harness/convexReporting.js +7 -14
- package/dist/harness/finalize.js +7 -12
- package/dist/harness/prepare.js +7 -9
- package/dist/mcp/convexClient.d.ts +5 -1
- package/dist/mcp/convexClient.js +14 -34
- package/dist/mcp/index.js +12 -73
- package/dist/templates/context-file-section.md +59 -0
- package/dist/utils/context-file.d.ts +38 -0
- package/dist/utils/context-file.js +94 -0
- package/dist/utils/env.d.ts +0 -13
- package/dist/utils/env.js +0 -19
- package/dist/utils/gitignore.d.ts +2 -2
- package/dist/utils/gitignore.js +4 -4
- package/dist/utils/oauth-flow.d.ts +0 -1
- package/dist/utils/oauth-flow.js +0 -9
- package/dist/utils/project-discovery.d.ts +3 -5
- package/dist/utils/project-discovery.js +18 -42
- package/dist/utils/project-selector.d.ts +17 -3
- package/dist/utils/project-selector.js +35 -3
- package/dist/utils/project-settings.d.ts +47 -0
- package/dist/utils/project-settings.js +110 -0
- package/dist/utils/templates.d.ts +0 -24
- package/dist/utils/templates.js +0 -39
- package/package.json +1 -1
- package/dist/harness/localReporting.d.ts +0 -6
- package/dist/harness/localReporting.js +0 -49
- package/dist/templates/antigravity-gemini.md +0 -3
- package/dist/templates/antigravity-overview-rule.md +0 -3
- package/dist/templates/antigravity-test-rule.md +0 -3
- package/dist/templates/behavioral-core.md +0 -25
- package/dist/templates/claude-code-overview-skill.md +0 -6
- package/dist/templates/claude-code-skill.md +0 -6
- package/dist/templates/claude-code-test-skill.md +0 -6
- package/dist/templates/codex-agents.md +0 -3
- package/dist/templates/codex-overview-agents.md +0 -3
- package/dist/templates/codex-test-agents.md +0 -3
- package/dist/templates/cursor-overview-rule.mdc +0 -5
- package/dist/templates/cursor-rule.mdc +0 -5
- package/dist/templates/cursor-test-rule.mdc +0 -5
- package/dist/templates/overview-core.md +0 -27
- package/dist/templates/test-writing-core.md +0 -72
- package/dist/utils/detect-existing-project.d.ts +0 -5
- package/dist/utils/detect-existing-project.js +0 -34
package/README.md
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
# dot•requirements
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**One source of truth for what your software should do.**
|
|
4
|
+
Readable. Testable. AI-accessible.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Tests prove *something* works—but nobody is certain it's the right something. Requirements live scattered across docs, issue trackers, and people's heads. They drift out of sync with actual code. And AI assistants can't access them at all.
|
|
9
|
+
|
|
10
|
+
**dot•requirements** closes this gap. Write requirements as structured Markdown, reference them directly in tests, and see coverage update automatically. When a requirement changes, the tests that validate it are one click away.
|
|
11
|
+
|
|
12
|
+
> **Alpha Software** — Under active development. Please report issues to support@popover.ca.
|
|
6
13
|
|
|
7
|
-
|
|
14
|
+
## Who Is This For?
|
|
15
|
+
|
|
16
|
+
- **Developers** who want tests that prove the right behavior, not just "80% coverage"
|
|
17
|
+
- **Product managers** who want visibility into what's actually being tested
|
|
18
|
+
- **AI-first builders** who want clear requirements for faster, more accurate implementations
|
|
8
19
|
|
|
9
20
|
## Installation
|
|
10
21
|
|
|
@@ -76,27 +87,6 @@ After running tests, you'll see a coverage report showing which requirements hav
|
|
|
76
87
|
|
|
77
88
|
---
|
|
78
89
|
|
|
79
|
-
## What Works Locally
|
|
80
|
-
|
|
81
|
-
The following features work fully offline—no account required:
|
|
82
|
-
|
|
83
|
-
- Write requirements (`.requirements.md` files)
|
|
84
|
-
- Validate requirements (`dotreq test`)
|
|
85
|
-
- Reference requirements in tests (`requirement()`)
|
|
86
|
-
- Coverage reporting (console output)
|
|
87
|
-
- MCP tools (search, validate, explore)
|
|
88
|
-
|
|
89
|
-
The following features require a dot•requirements cloud account:
|
|
90
|
-
|
|
91
|
-
- Sync requirements (`pull` / `push`)
|
|
92
|
-
- Historical coverage tracking
|
|
93
|
-
- AI-powered style checking
|
|
94
|
-
- Team collaboration
|
|
95
|
-
|
|
96
|
-
To enable cloud features, run `dotreq login`.
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
90
|
## CLI Commands
|
|
101
91
|
|
|
102
92
|
### `dotreq init`
|
|
@@ -145,15 +135,6 @@ dotreq test
|
|
|
145
135
|
dotreq test --file .requirements/auth.requirements.md
|
|
146
136
|
```
|
|
147
137
|
|
|
148
|
-
### `dotreq login` / `logout`
|
|
149
|
-
|
|
150
|
-
Authenticate with dot•requirements cloud.
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
dotreq login
|
|
154
|
-
dotreq logout
|
|
155
|
-
```
|
|
156
|
-
|
|
157
138
|
### `dotreq mcp-setup`
|
|
158
139
|
|
|
159
140
|
Configure the MCP server for AI assistants (Claude Code, Cursor, etc.).
|
|
@@ -172,9 +153,30 @@ dotreq mcp
|
|
|
172
153
|
|
|
173
154
|
---
|
|
174
155
|
|
|
156
|
+
## What Works Locally
|
|
157
|
+
|
|
158
|
+
The following features work fully offline—no account required:
|
|
159
|
+
|
|
160
|
+
- Write requirements (`.requirements.md` files)
|
|
161
|
+
- Validate requirements (`dotreq test`)
|
|
162
|
+
- Reference requirements in tests (`requirement()`)
|
|
163
|
+
- Coverage reporting (console output)
|
|
164
|
+
- MCP tools (search, validate, explore)
|
|
165
|
+
|
|
166
|
+
The following features require a dot•requirements cloud account:
|
|
167
|
+
|
|
168
|
+
- Sync requirements (`pull` / `push`)
|
|
169
|
+
- Historical coverage tracking
|
|
170
|
+
- AI-powered style checking
|
|
171
|
+
- Team collaboration
|
|
172
|
+
|
|
173
|
+
To enable cloud features, run `dotreq link` to connect your project to the cloud.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
175
177
|
## Test Harness
|
|
176
178
|
|
|
177
|
-
The test harness tracks which requirements are exercised by your tests.
|
|
179
|
+
Stop wondering "did we test that?" The test harness tracks which requirements are exercised by your tests and shows gaps instantly.
|
|
178
180
|
|
|
179
181
|
### Setup with Vitest
|
|
180
182
|
|
|
@@ -290,6 +292,8 @@ test(requirement('AUTH-LOGIN-1', 'AUTH-SECURITY-1'), () => {
|
|
|
290
292
|
|
|
291
293
|
### Coverage Reporting
|
|
292
294
|
|
|
295
|
+
Coverage isn't just a number—it's a map of which features have been tested and which haven't.
|
|
296
|
+
|
|
293
297
|
#### Local Report
|
|
294
298
|
|
|
295
299
|
After tests complete, a coverage summary prints to the console:
|
|
@@ -321,12 +325,7 @@ With cloud credentials configured, coverage is automatically reported to dot•r
|
|
|
321
325
|
- Branch-based coverage (tracks `main`, feature branches, etc.)
|
|
322
326
|
- Query coverage via the MCP server
|
|
323
327
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
```bash
|
|
327
|
-
DOTREQUIREMENTS_PROJECT_ID=your-project-id
|
|
328
|
-
DOTREQUIREMENTS_PROJECT_SECRET=your-project-secret
|
|
329
|
-
```
|
|
328
|
+
Run `dotreq link` to connect your project to the cloud and enable coverage reporting.
|
|
330
329
|
|
|
331
330
|
Cloud reporting is fire-and-forget—it never blocks or fails your tests.
|
|
332
331
|
|
|
@@ -399,7 +398,7 @@ See [MARKDOWN_SCHEMA.md](https://github.com/PopoverAI/dotrequirements/blob/main/
|
|
|
399
398
|
|
|
400
399
|
## MCP Server
|
|
401
400
|
|
|
402
|
-
|
|
401
|
+
AI assistants can read your requirements in context, draft new ones, and verify tests actually validate what they claim to. The MCP server makes this possible through a standard protocol that works with Claude Code, Cursor, and other AI coding assistants.
|
|
403
402
|
|
|
404
403
|
### Setup
|
|
405
404
|
|
|
@@ -458,15 +457,16 @@ import '@popoverai/dotrequirements/mcp';
|
|
|
458
457
|
|
|
459
458
|
## Configuration
|
|
460
459
|
|
|
461
|
-
The CLI stores
|
|
460
|
+
The CLI stores project credentials in `.requirements/project-settings.json`:
|
|
462
461
|
|
|
463
|
-
```
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
462
|
+
```json
|
|
463
|
+
{
|
|
464
|
+
"projectId": "your-project-id",
|
|
465
|
+
"projectSecret": "your-project-secret"
|
|
466
|
+
}
|
|
467
467
|
```
|
|
468
468
|
|
|
469
|
-
|
|
469
|
+
This file is automatically added to `.gitignore` during initialization.
|
|
470
470
|
|
|
471
471
|
---
|
|
472
472
|
|
package/dist/cli.js
CHANGED
|
@@ -7,8 +7,6 @@ import { pushCommand } from './commands/push.js';
|
|
|
7
7
|
import { testCommand } from './commands/test.js';
|
|
8
8
|
import { mcpCommand } from './commands/mcp.js';
|
|
9
9
|
import { mcpSetupCommand } from './commands/mcp-setup.js';
|
|
10
|
-
import { loginCommand } from './commands/login.js';
|
|
11
|
-
import { logoutCommand } from './commands/logout.js';
|
|
12
10
|
import { loadEnvFile } from './utils/env.js';
|
|
13
11
|
import { readFileSync } from 'fs';
|
|
14
12
|
import { fileURLToPath } from 'url';
|
|
@@ -78,13 +76,5 @@ program
|
|
|
78
76
|
.command('mcp-setup')
|
|
79
77
|
.description('Configure MCP server for your AI assistant (Claude Code, Claude Desktop, etc.)')
|
|
80
78
|
.action(wrapCommand(mcpSetupCommand));
|
|
81
|
-
program
|
|
82
|
-
.command('login')
|
|
83
|
-
.description('Authenticate with dot•requirements and enable cloud features')
|
|
84
|
-
.action(wrapCommand(loginCommand));
|
|
85
|
-
program
|
|
86
|
-
.command('logout')
|
|
87
|
-
.description('Clear stored authentication tokens')
|
|
88
|
-
.action(wrapCommand(logoutCommand));
|
|
89
79
|
program.parse();
|
|
90
80
|
//# sourceMappingURL=cli.js.map
|