@mod-computer/mod 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +147 -0
  2. package/package.json +6 -2
package/README.md ADDED
@@ -0,0 +1,147 @@
1
+ # mod-cli
2
+
3
+ Spec-driven development with traceability. Connect your specs, code, and tests so reviews show the full picture.
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ # Install
9
+ npm install -g @mod-computer/cli
10
+
11
+ # Initialize workspace (installs /mod skill for Claude Code)
12
+ mod init
13
+ mod auth login
14
+
15
+ # Start working
16
+ git checkout -b feat/user-auth
17
+ ```
18
+
19
+ ## The Idea
20
+
21
+ 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
+ mod-cli builds a trace graph as you work:
24
+
25
+ ```
26
+ Spec requirement → Implementation → Tests
27
+ ```
28
+
29
+ At review, `mod trace report` shows what's connected. `mod trace diff` catches what isn't.
30
+
31
+ ## Usage
32
+
33
+ ### With Claude Code (Recommended)
34
+
35
+ `mod init` installs the `/mod` skill automatically. Use it to implement specs:
36
+
37
+ ```bash
38
+ # Write a spec
39
+ claude "Write a spec for user authentication in specs/auth.md"
40
+
41
+ # Implement from spec - agent handles traces
42
+ claude "/mod implement specs/auth.md"
43
+
44
+ # Add tests - agent traces them to implementations
45
+ claude "/mod test specs/auth.md"
46
+
47
+ # Review coverage
48
+ mod trace report specs/auth.md
49
+ ```
50
+
51
+ ### Manual Workflow
52
+
53
+ ```bash
54
+ # Add traces as you work
55
+ mod trace add specs/auth.md:15 --type=requirement
56
+ mod trace add src/auth/login.ts:42 --type=implementation --link=req-login--a1b2
57
+
58
+ # Link existing traces
59
+ mod trace link impl-login--a1b2 spec-login--c3d4
60
+
61
+ # View connections
62
+ mod trace report specs/auth.md
63
+ mod trace coverage
64
+
65
+ # Find gaps before merge
66
+ mod trace diff # Untraced files on branch
67
+ mod trace unmet # Requirements without implementations
68
+ ```
69
+
70
+ ## Commands
71
+
72
+ ### Setup
73
+
74
+ ```bash
75
+ mod init # Initialize workspace, install /mod skill
76
+ mod auth login # Authenticate
77
+ mod auth logout # Sign out
78
+ mod auth status # Show auth state
79
+ ```
80
+
81
+ ### Traces
82
+
83
+ ```bash
84
+ # Add traces
85
+ mod trace add <file>:<line> --type=<type> ["description"]
86
+ mod trace add <file>:<line> --type=<type> --link=<trace-id>
87
+
88
+ # Link traces
89
+ mod trace link <source-id> <target-id>
90
+
91
+ # View traces
92
+ mod trace list # All traces
93
+ mod trace list --type=requirement # Filter by type
94
+ mod trace list --file=<path> # Filter by file
95
+ mod trace get <trace-id> # Get trace details
96
+
97
+ # Reports
98
+ mod trace report <file> # Per-document coverage
99
+ mod trace coverage # Workspace-wide stats
100
+
101
+ # Find gaps
102
+ mod trace diff # Untraced files on branch
103
+ mod trace diff main..HEAD # Explicit git range
104
+ mod trace unmet # Requirements without implementations
105
+ ```
106
+
107
+ ### Comments
108
+
109
+ ```bash
110
+ mod comment add <file>:<line> "text"
111
+ mod comment list [file]
112
+ ```
113
+
114
+ ## Trace Types
115
+
116
+ | Type | Use For |
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 |
125
+
126
+ ## CI Integration
127
+
128
+ Commands exit non-zero when issues exist:
129
+
130
+ ```bash
131
+ # Pre-merge validation
132
+ mod trace diff && mod trace unmet && git push
133
+ ```
134
+
135
+ | Command | Exit 0 | Exit 1 |
136
+ |---------|--------|--------|
137
+ | `mod trace diff` | All changed files traced | Untraced files exist |
138
+ | `mod trace unmet` | All requirements implemented | Unmet requirements |
139
+
140
+ ## Development
141
+
142
+ ```bash
143
+ pnpm install # Install dependencies
144
+ pnpm build # Build CLI
145
+ pnpm dev # Watch mode
146
+ pnpm test # Run tests
147
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mod-computer/mod",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "license": "MIT",
5
5
  "description": "Mod CLI - Spec-driven development with traceability",
6
6
  "bin": {
@@ -10,10 +10,14 @@
10
10
  "engines": {
11
11
  "node": ">=16"
12
12
  },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/modcomputer/mod-monorepo"
16
+ },
13
17
  "keywords": [
14
18
  "cli",
15
19
  "mod",
16
20
  "traceability",
17
21
  "spec-driven"
18
22
  ]
19
- }
23
+ }