dotdog 0.3.5 → 0.4.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 +106 -52
- package/dist/cli.js +763 -118
- package/kits/defi/SPEC.dog +21 -0
- package/kits/defi/constitution.dog +8 -0
- package/kits/defi/data-model.dog +131 -0
- package/kits/erc20/SPEC.dog +20 -0
- package/kits/erc20/constitution.dog +8 -0
- package/kits/erc20/data-model.dog +97 -0
- package/kits/hackathon/SPEC.dog +20 -0
- package/kits/hackathon/constitution.dog +8 -0
- package/kits/hackathon/data-model.dog +64 -0
- package/kits/nft/SPEC.dog +21 -0
- package/kits/nft/constitution.dog +8 -0
- package/kits/nft/data-model.dog +131 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,76 +1,130 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dotdog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/dotdog)
|
|
4
|
+
[](https://www.npmjs.com/package/dotdog)
|
|
5
|
+
[](https://github.com/specdog/dotdog/blob/main/LICENSE)
|
|
6
|
+
[](https://github.com/specdog/dotdog/actions)
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
> **Feed the dog. Ship with specs.** Write .dog specs. Dog checks them. AI agents fetch them.
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g dotdog
|
|
9
14
|
```
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
Requires Node.js >= 20.
|
|
12
17
|
|
|
13
|
-
##
|
|
18
|
+
## Quick Start
|
|
14
19
|
|
|
20
|
+
```bash
|
|
21
|
+
dotdog init my-project # scaffold a spec genome
|
|
22
|
+
dotdog validate # score completeness (0-100%)
|
|
23
|
+
dotdog analyze # deep analysis : gaps, suggestions, entity audit
|
|
15
24
|
```
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
|
|
26
|
+
## Commands
|
|
27
|
+
|
|
28
|
+
| Command | Description |
|
|
29
|
+
|---------|-------------|
|
|
30
|
+
| `dotdog validate [dir]` | Score spec completeness. Checks file existence, entity descriptions, section counts. |
|
|
31
|
+
| `dotdog analyze [dir]` | Deep analysis. Detects domain, stack, gaps with severity, entity quality audit. |
|
|
32
|
+
| `dotdog parse <file>` | Parse a `.dog` file into sections. |
|
|
33
|
+
| `dotdog compile [dir]` | Compile `.dog` files into a `.dag` graph (JSON). |
|
|
34
|
+
| `dotdog visualize [dir]` | Output Mermaid graph from `.dag`. `--save` writes `.md` for GitHub rendering. |
|
|
35
|
+
| `dotdog serve [dir]` | Start MCP server over stdio. AI agents query specs without hallucination. |
|
|
36
|
+
| `dotdog staleness [dir]` | Detect drift between spec and reality. Compares plan.dog tasks against code. |
|
|
37
|
+
| `dotdog generate [dir]` | Generate missing spec files from SPEC.dog (data-model, COPY, INDEX). |
|
|
38
|
+
| `dotdog simulate <scenario>` | Run a simulation scenario. Reads SPEC.dog scenarios, checks pre/postconditions. |
|
|
39
|
+
| `dotdog init <project>` | Scaffold a new spec genome project with templates. |
|
|
40
|
+
| `dotdog list` | List all projects and their `.dog` file counts. |
|
|
41
|
+
|
|
42
|
+
## File Formats
|
|
43
|
+
|
|
44
|
+
### `.dog` : Human-Written Spec Genome
|
|
45
|
+
|
|
46
|
+
Markdown prose + YAML structured blocks. Free and open source. Define entities, relationships, events, predictions, and copy in a single format that both humans and parsers understand.
|
|
47
|
+
|
|
48
|
+
```markdown
|
|
49
|
+
### Entity: User
|
|
50
|
+
|
|
51
|
+
A person who uses the app.
|
|
52
|
+
|
|
53
|
+
` ``yaml
|
|
54
|
+
entity: User
|
|
55
|
+
type: entity
|
|
56
|
+
properties:
|
|
57
|
+
id:
|
|
58
|
+
type: string
|
|
59
|
+
required: true
|
|
60
|
+
email:
|
|
61
|
+
type: string
|
|
62
|
+
required: true
|
|
63
|
+
states: [active, suspended]
|
|
64
|
+
lifecycle: active → suspended
|
|
65
|
+
` ``
|
|
29
66
|
```
|
|
30
67
|
|
|
31
|
-
|
|
68
|
+
### `.dag` : Machine-Compiled Graph
|
|
32
69
|
|
|
33
|
-
|
|
34
|
-
bun install
|
|
35
|
-
cd projects/spec-platform/specs
|
|
70
|
+
JSON graph compiled from `.dog` files. Nodes, edges, properties, and states in a deterministic structure. 85% token savings vs raw `.dog` files for AI agents.
|
|
36
71
|
|
|
37
|
-
|
|
38
|
-
bun ../../../packages/spec-cli/src/index.ts validate ../..
|
|
72
|
+
## MCP Server : AI Agent Integration
|
|
39
73
|
|
|
40
|
-
|
|
41
|
-
bun ../../../packages/spec-cli/src/index.ts list
|
|
42
|
-
```
|
|
74
|
+
`dotdog serve` exposes specs to any MCP-compatible AI agent over stdio. Six tools:
|
|
43
75
|
|
|
44
|
-
|
|
76
|
+
| Tool | Description |
|
|
77
|
+
|------|-------------|
|
|
78
|
+
| `getEntity` | Exact entity with properties, states, lifecycle, and connected edges |
|
|
79
|
+
| `traverse` | BFS subgraph from any starting node to any depth |
|
|
80
|
+
| `search` | Find entities by name or type |
|
|
81
|
+
| `schema` | Property definitions only : zero prose, agent-optimized |
|
|
82
|
+
| `summary` | Node count, edge count, file count, compile time |
|
|
83
|
+
| `listProjects` | Array of project names |
|
|
45
84
|
|
|
46
|
-
|
|
47
|
-
|-----------|-----------|------|
|
|
48
|
-
| Runtime | Bun | $0 |
|
|
49
|
-
| Database | bun:sqlite (embedded) | $0 |
|
|
50
|
-
| Types | TypeScript (strict) | $0 |
|
|
51
|
-
| CLI | Commander.js + chalk | $0 |
|
|
52
|
-
| MCP Server | @modelcontextprotocol/sdk (stdio) | $0 |
|
|
53
|
-
| Embeddings | all-MiniLM-L6-v2 (local) | $0 |
|
|
54
|
-
| Hosting | None needed (local-first) | $0 |
|
|
85
|
+
Agent workflow: `listProjects` → `getEntity` → `traverse` graph.
|
|
55
86
|
|
|
56
|
-
##
|
|
87
|
+
## Dogfood
|
|
57
88
|
|
|
58
|
-
|
|
89
|
+
dotdog validates its own specs. Every PR:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
dotdog validate → find gaps → fix spec → PR → merge → tag → CI publish
|
|
93
|
+
```
|
|
59
94
|
|
|
60
|
-
|
|
61
|
-
- **Edges**: contains, depends_on, implements, references, calls, precedes
|
|
62
|
-
- **Vectors**: every section embedded for semantic search, contradiction detection, staleness checks
|
|
63
|
-
- **Predictions**: forecasts with triggers, timeframes, confidence, and actual outcome tracking
|
|
95
|
+
Eat your own dogfood. The tool is the project.
|
|
64
96
|
|
|
65
|
-
|
|
97
|
+
## VS Code Extension
|
|
66
98
|
|
|
67
|
-
|
|
99
|
+
Syntax highlighting for `.dog` files. Install:
|
|
68
100
|
|
|
101
|
+
```bash
|
|
102
|
+
cp -r extensions/vscode ~/.vscode/extensions/dotdog
|
|
69
103
|
```
|
|
70
|
-
spec validate → 43% complete
|
|
71
104
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
105
|
+
## Format Specifications
|
|
106
|
+
|
|
107
|
+
- [`.dog` format spec](spec/format-spec.dog) : language definition, EBNF grammar, validation rules
|
|
108
|
+
- [`.dag` format spec](spec/format-spec-dag.dog) : graph definition, MCP API, token efficiency
|
|
109
|
+
|
|
110
|
+
## Links
|
|
111
|
+
|
|
112
|
+
- **GitHub:** [specdog/dotdog](https://github.com/specdog/dotdog)
|
|
113
|
+
- **npm:** [dotdog](https://www.npmjs.com/package/dotdog)
|
|
114
|
+
- **Docs:** [GitHub Pages](https://specdog.github.io/dotdog)
|
|
115
|
+
- **llms.txt:** [llms.txt](llms.txt) : structured for AI agent discovery
|
|
116
|
+
- **AGENTS.md:** [AGENTS.md](AGENTS.md) : instructions for AI coding agents
|
|
117
|
+
|
|
118
|
+
## Spec-Driven Development
|
|
119
|
+
|
|
120
|
+
dotdog is built for SDD. Write your spec first. Validate it. Compile it. Let AI agents query it. The spec is the source of truth.
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
spec → validate → compile → serve → AI agent queries
|
|
76
124
|
```
|
|
125
|
+
|
|
126
|
+
No more specs that rot in a wiki. No more agents guessing from prose. One source. Zero ambiguity.
|
|
127
|
+
|
|
128
|
+
## License
|
|
129
|
+
|
|
130
|
+
MIT
|