@mod-computer/mod 0.2.3 → 0.2.4
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 +77 -31
- package/dist/package.json +19 -0
- package/package.json +74 -22
- package/automerge_wasm_bg.wasm +0 -0
- package/glassware +0 -0
- /package/{cli.bundle.js → dist/cli.bundle.js} +0 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# mod
|
|
1
|
+
# mod
|
|
2
2
|
|
|
3
3
|
Spec-driven development with traceability. Connect your specs, code, and tests so reviews show the full picture.
|
|
4
4
|
|
|
@@ -6,24 +6,25 @@ Spec-driven development with traceability. Connect your specs, code, and tests s
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
# Install
|
|
9
|
-
npm install -g @mod-computer/
|
|
9
|
+
npm install -g @mod-computer/mod
|
|
10
10
|
|
|
11
|
-
# Initialize workspace (
|
|
11
|
+
# Initialize workspace (creates .mod/traces/, glassware.toml, installs mod skill)
|
|
12
12
|
mod init
|
|
13
|
-
mod auth login
|
|
14
13
|
|
|
15
14
|
# Start working
|
|
16
15
|
git checkout -b feat/user-auth
|
|
17
16
|
```
|
|
18
17
|
|
|
18
|
+
No account needed. No server connection. Just install and go.
|
|
19
|
+
|
|
19
20
|
## The Idea
|
|
20
21
|
|
|
21
22
|
You write specs. Agents implement them. But at review time, how do you know what requirement each function addresses? What's tested? What changed but isn't connected to anything?
|
|
22
23
|
|
|
23
|
-
mod
|
|
24
|
+
mod builds a trace graph as you work:
|
|
24
25
|
|
|
25
26
|
```
|
|
26
|
-
|
|
27
|
+
requirement → specification → implementation → test
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
At review, `mod trace report` shows what's connected. `mod trace diff` catches what isn't.
|
|
@@ -72,56 +73,101 @@ mod trace unmet # Requirements without implementations
|
|
|
72
73
|
### Setup
|
|
73
74
|
|
|
74
75
|
```bash
|
|
75
|
-
mod init # Initialize workspace, install
|
|
76
|
-
mod auth login # Authenticate
|
|
77
|
-
mod auth logout # Sign out
|
|
78
|
-
mod auth status # Show auth state
|
|
76
|
+
mod init # Initialize workspace, install mod skill
|
|
79
77
|
```
|
|
80
78
|
|
|
81
|
-
### Traces
|
|
79
|
+
### Add Traces
|
|
82
80
|
|
|
83
81
|
```bash
|
|
84
|
-
#
|
|
82
|
+
# Single trace
|
|
85
83
|
mod trace add <file>:<line> --type=<type> ["description"]
|
|
86
84
|
mod trace add <file>:<line> --type=<type> --link=<trace-id>
|
|
87
85
|
|
|
88
|
-
#
|
|
86
|
+
# Bulk add (agent-friendly)
|
|
87
|
+
mod trace add-bulk --json '[
|
|
88
|
+
{"file": "specs/auth.md", "line": 15, "type": "requirement"},
|
|
89
|
+
{"file": "specs/auth.md", "line": 22, "type": "requirement"}
|
|
90
|
+
]'
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Link Traces
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# Single link
|
|
89
97
|
mod trace link <source-id> <target-id>
|
|
90
98
|
|
|
91
|
-
#
|
|
99
|
+
# Bulk link
|
|
100
|
+
mod trace link-bulk --json '[
|
|
101
|
+
{"source": "impl-login--d0e6f3a4", "target": "req-login--a7f3d2c1"}
|
|
102
|
+
]'
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Unlink and Delete
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
mod trace unlink <source-id> <target-id>
|
|
109
|
+
mod trace delete <trace-id> --force
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Bulk Update
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
mod trace update-bulk --json '[
|
|
116
|
+
{"id": "req-login--a7f3d2c1", "nodeType": "specification"}
|
|
117
|
+
]'
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### View Traces
|
|
121
|
+
|
|
122
|
+
```bash
|
|
92
123
|
mod trace list # All traces
|
|
93
124
|
mod trace list --type=requirement # Filter by type
|
|
94
125
|
mod trace list --file=<path> # Filter by file
|
|
95
126
|
mod trace get <trace-id> # Get trace details
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Reports
|
|
96
130
|
|
|
97
|
-
|
|
131
|
+
```bash
|
|
98
132
|
mod trace report <file> # Per-document coverage
|
|
99
133
|
mod trace coverage # Workspace-wide stats
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Find Gaps
|
|
100
137
|
|
|
101
|
-
|
|
138
|
+
```bash
|
|
102
139
|
mod trace diff # Untraced files on branch
|
|
103
140
|
mod trace diff main..HEAD # Explicit git range
|
|
104
141
|
mod trace unmet # Requirements without implementations
|
|
105
142
|
```
|
|
106
143
|
|
|
107
|
-
|
|
144
|
+
## Schema
|
|
108
145
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
146
|
+
Define your trace graph in `glassware.toml`. The default schema:
|
|
147
|
+
|
|
148
|
+
```toml
|
|
149
|
+
node_types = ["requirement", "specification", "implementation", "test"]
|
|
113
150
|
|
|
114
|
-
|
|
151
|
+
[edge_types.specifies]
|
|
152
|
+
from = "specification"
|
|
153
|
+
to = "requirement"
|
|
154
|
+
attribute = "requirements"
|
|
155
|
+
label = "Specified"
|
|
156
|
+
|
|
157
|
+
[edge_types.implements]
|
|
158
|
+
from = "implementation"
|
|
159
|
+
to = "specification"
|
|
160
|
+
attribute = "specifications"
|
|
161
|
+
label = "Implemented"
|
|
162
|
+
|
|
163
|
+
[edge_types.tests]
|
|
164
|
+
from = "test"
|
|
165
|
+
to = "implementation"
|
|
166
|
+
attribute = "implementations"
|
|
167
|
+
label = "Tested"
|
|
168
|
+
```
|
|
115
169
|
|
|
116
|
-
|
|
117
|
-
|------|---------|
|
|
118
|
-
| `requirement` | Specs, user stories, acceptance criteria |
|
|
119
|
-
| `specification` | Detailed technical specs |
|
|
120
|
-
| `implementation` | Code that builds something |
|
|
121
|
-
| `test` | Code that verifies something |
|
|
122
|
-
| `design` | Design docs, architecture notes |
|
|
123
|
-
| `decision` | ADRs, decision records |
|
|
124
|
-
| `utility` | Helpers that don't need tracing |
|
|
170
|
+
Add custom node types and edges to match your workflow (releases, RFCs, ADRs, etc.).
|
|
125
171
|
|
|
126
172
|
## CI Integration
|
|
127
173
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mod-computer/cli",
|
|
3
|
+
"version": "0.2.6",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Mod CLI - Spec-driven development with traceability",
|
|
6
|
+
"bin": {
|
|
7
|
+
"mod": "cli.bundle.js"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=16"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"cli",
|
|
15
|
+
"mod",
|
|
16
|
+
"traceability",
|
|
17
|
+
"spec-driven"
|
|
18
|
+
]
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,23 +1,75 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
2
|
+
"name": "@mod-computer/mod",
|
|
3
|
+
"repository": {
|
|
4
|
+
"type": "git",
|
|
5
|
+
"url": "https://github.com/modcomputer/mod-monorepo"
|
|
6
|
+
},
|
|
7
|
+
"version": "0.2.4",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"bin": {
|
|
10
|
+
"mod": "dist/cli.bundle.js"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=16"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc && node fix-imports.js && cp -r source/config/release-profiles dist/config/",
|
|
18
|
+
"build:bundle": "node build-bundle.js",
|
|
19
|
+
"prepublishOnly": "pnpm build:bundle",
|
|
20
|
+
"dev": "tsc --watch",
|
|
21
|
+
"test": "vitest run",
|
|
22
|
+
"package": "node build-for-docs.js"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist/cli.bundle.js",
|
|
26
|
+
"dist/package.json"
|
|
27
|
+
],
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@ai-sdk/anthropic": "2.0.0-beta.3",
|
|
30
|
+
"@ai-sdk/openai": "2.0.0-beta.5",
|
|
31
|
+
"@automerge/automerge": "^3.1.2",
|
|
32
|
+
"@automerge/automerge-repo": "^2.3.1",
|
|
33
|
+
"@automerge/automerge-repo-network-websocket": "^2.3.1",
|
|
34
|
+
"@automerge/automerge-repo-storage-nodefs": "^2.3.1",
|
|
35
|
+
"@inquirer/prompts": "^8.1.0",
|
|
36
|
+
"ai": "5.0.0-beta.11",
|
|
37
|
+
"chokidar": "^4.0.3",
|
|
38
|
+
"dotenv": "^17.1.0",
|
|
39
|
+
"ink": "^6.0.1",
|
|
40
|
+
"ink-select-input": "^6.2.0",
|
|
41
|
+
"ink-text-input": "^6.0.0",
|
|
42
|
+
"meow": "^11.0.0",
|
|
43
|
+
"ora": "^9.0.0",
|
|
44
|
+
"react": "19.1.0",
|
|
45
|
+
"react-dom": "19.1.0",
|
|
46
|
+
"zustand": "^5.0.6"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@babel/cli": "^7.21.0",
|
|
50
|
+
"@babel/preset-react": "^7.18.6",
|
|
51
|
+
"@mod/mod-core": "workspace:*",
|
|
52
|
+
"@types/ink": "^2.0.3",
|
|
53
|
+
"@types/ink-select-input": "^3.0.5",
|
|
54
|
+
"@types/ink-text-input": "^2.0.5",
|
|
55
|
+
"@types/meow": "^5.0.0",
|
|
56
|
+
"@types/node": "^24.0.10",
|
|
57
|
+
"@types/react": "^19.1.8",
|
|
58
|
+
"@vdemedes/prettier-config": "^2.0.1",
|
|
59
|
+
"@vitest/coverage-v8": "^1.6.1",
|
|
60
|
+
"chalk": "^5.2.0",
|
|
61
|
+
"esbuild": "^0.24.0",
|
|
62
|
+
"eslint-config-xo-react": "^0.27.0",
|
|
63
|
+
"eslint-plugin-react": "^7.32.2",
|
|
64
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
65
|
+
"fast-check": "^4.5.3",
|
|
66
|
+
"import-jsx": "^5.0.0",
|
|
67
|
+
"ink-testing-library": "^3.0.0",
|
|
68
|
+
"prettier": "^2.8.7",
|
|
69
|
+
"react-test-renderer": "^19.1.0",
|
|
70
|
+
"ts-node": "^10.9.2",
|
|
71
|
+
"typescript": "^5.8.3",
|
|
72
|
+
"vitest": "^1.6.1"
|
|
73
|
+
},
|
|
74
|
+
"prettier": "@vdemedes/prettier-config"
|
|
75
|
+
}
|
package/automerge_wasm_bg.wasm
DELETED
|
Binary file
|
package/glassware
DELETED
|
Binary file
|
|
File without changes
|