@thxgg/steward 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.
- package/README.md +95 -120
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,175 +1,150 @@
|
|
|
1
1
|
# Steward
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Local-first PRD workflow steward for AI agents and developers.
|
|
4
|
+
Nuxt UI + codemode MCP + SQLite state store.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
This project is intended to be downloaded and run locally on your machine. It is not designed for public internet deployment.
|
|
8
|
-
|
|
9
|
-
## What It Does
|
|
10
|
-
|
|
11
|
-
- Scans repositories for `docs/prd/*.md` files and displays them in a focused UI.
|
|
12
|
-
- Reads task state (`tasks.json` and `progress.json`) from a global SQLite database.
|
|
13
|
-
- Supports legacy `.claude/state/*` migration into the global database.
|
|
14
|
-
- Resolves commit references for tasks, including pseudo-monorepo sub-repo contexts.
|
|
15
|
-
|
|
16
|
-
## Local-First Security Model
|
|
17
|
-
|
|
18
|
-
Steward exposes local filesystem and git metadata for convenience. Because of that:
|
|
6
|
+
- npm package: `@thxgg/steward`
|
|
7
|
+
- CLI command: `prd`
|
|
19
8
|
|
|
20
|
-
|
|
21
|
-
- Do not expose it directly to the public internet.
|
|
22
|
-
- Treat it as a developer workstation tool, not a hosted multi-user service.
|
|
9
|
+
## Acknowledgments
|
|
23
10
|
|
|
24
|
-
|
|
11
|
+
Steward is heavily inspired by work from [dmmulroy](https://github.com/dmmulroy), including the similar project [Overseer](https://github.com/dmmulroy/overseer).
|
|
25
12
|
|
|
26
|
-
|
|
27
|
-
- npm (or pnpm)
|
|
28
|
-
- Git
|
|
29
|
-
- Linux/macOS (or compatible environment)
|
|
13
|
+
## Install
|
|
30
14
|
|
|
31
|
-
|
|
15
|
+
### Via npm
|
|
32
16
|
|
|
33
17
|
```bash
|
|
34
|
-
npm install
|
|
35
|
-
npm run dev
|
|
18
|
+
npm install -g @thxgg/steward
|
|
36
19
|
```
|
|
37
20
|
|
|
38
|
-
|
|
21
|
+
### Without global install
|
|
39
22
|
|
|
40
23
|
```bash
|
|
41
|
-
|
|
42
|
-
pnpm run dev
|
|
24
|
+
npx -y @thxgg/steward ui
|
|
43
25
|
```
|
|
44
26
|
|
|
45
|
-
|
|
27
|
+
## Usage
|
|
46
28
|
|
|
47
|
-
|
|
29
|
+
### MCP Server
|
|
48
30
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
31
|
+
Add to your MCP client config:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"mcpServers": {
|
|
36
|
+
"prd": {
|
|
37
|
+
"command": "npx",
|
|
38
|
+
"args": ["-y", "@thxgg/steward", "mcp"]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
52
42
|
```
|
|
53
43
|
|
|
54
|
-
|
|
44
|
+
### CLI
|
|
55
45
|
|
|
56
46
|
```bash
|
|
57
|
-
pnpm add -g @thxgg/steward
|
|
58
47
|
prd ui
|
|
48
|
+
prd ui --preview
|
|
49
|
+
prd ui --port 3100 --host 127.0.0.1
|
|
50
|
+
prd mcp
|
|
59
51
|
```
|
|
60
52
|
|
|
61
|
-
|
|
53
|
+
## Architecture
|
|
62
54
|
|
|
63
|
-
```bash
|
|
64
|
-
npx -y @thxgg/steward ui
|
|
65
55
|
```
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
56
|
+
┌─────────────────────────────────────────┐
|
|
57
|
+
│ Steward CLI (Node) │
|
|
58
|
+
│ - `prd ui` launches Nuxt app │
|
|
59
|
+
│ - `prd mcp` starts MCP over stdio │
|
|
60
|
+
└─────────────────────────────────────────┘
|
|
61
|
+
│
|
|
62
|
+
▼
|
|
63
|
+
┌─────────────────────────────────────────┐
|
|
64
|
+
│ Codemode MCP (`execute`) │
|
|
65
|
+
│ - VM sandbox │
|
|
66
|
+
│ - APIs: repos, prds, git, state │
|
|
67
|
+
└─────────────────────────────────────────┘
|
|
68
|
+
│
|
|
69
|
+
▼
|
|
70
|
+
┌─────────────────────────────────────────┐
|
|
71
|
+
│ Local SQLite PRD State │
|
|
72
|
+
│ - Global store shared across repos │
|
|
73
|
+
└─────────────────────────────────────────┘
|
|
71
74
|
```
|
|
72
75
|
|
|
73
|
-
##
|
|
74
|
-
|
|
75
|
-
- `npm run dev` - Start local dev server
|
|
76
|
-
- `npm run typecheck` - Run Nuxt type checking
|
|
77
|
-
- `npm run build` - Build production bundle
|
|
78
|
-
- `npm run preview` - Preview the production build locally
|
|
79
|
-
- `npm run ui` - Launch `prd ui` (dev mode)
|
|
80
|
-
- `npm run mcp` - Start MCP server over stdio
|
|
76
|
+
## Codemode Pattern
|
|
81
77
|
|
|
82
|
-
|
|
78
|
+
Steward exposes one MCP tool: `execute`.
|
|
83
79
|
|
|
84
|
-
|
|
80
|
+
```js
|
|
81
|
+
const reposList = await repos.list()
|
|
82
|
+
const repo = reposList[0]
|
|
83
|
+
if (!repo) return { error: 'No repos configured' }
|
|
85
84
|
|
|
86
|
-
|
|
85
|
+
const prdList = await prds.list(repo.id)
|
|
86
|
+
if (prdList.length === 0) return { repo: repo.name, prds: 0 }
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
npm link
|
|
97
|
-
prd ui
|
|
88
|
+
const slug = prdList[0].slug
|
|
89
|
+
return {
|
|
90
|
+
doc: await prds.getDocument(repo.id, slug),
|
|
91
|
+
tasks: await prds.getTasks(repo.id, slug),
|
|
92
|
+
progress: await prds.getProgress(repo.id, slug)
|
|
93
|
+
}
|
|
98
94
|
```
|
|
99
95
|
|
|
100
|
-
##
|
|
96
|
+
## APIs
|
|
101
97
|
|
|
102
|
-
|
|
98
|
+
Inside `execute`, these APIs are available:
|
|
103
99
|
|
|
104
|
-
|
|
100
|
+
- `repos` - register/list/remove repos and refresh discovered git repos
|
|
101
|
+
- `prds` - list/read PRD docs, tasks, progress, and task commit refs
|
|
102
|
+
- `git` - commit metadata, diffs, file diffs, and file contents
|
|
103
|
+
- `state` - direct PRD state get/upsert by repo id or path
|
|
105
104
|
|
|
106
|
-
|
|
107
|
-
- `prds` - list/get PRD documents and state-backed task/progress data
|
|
108
|
-
- `git` - commit metadata, diffs, and file content lookups
|
|
109
|
-
- `state` - direct PRD state reads/writes in SQLite
|
|
105
|
+
Detailed API docs and examples: `docs/MCP.md`
|
|
110
106
|
|
|
111
|
-
|
|
107
|
+
## Local-First Security Model
|
|
112
108
|
|
|
113
|
-
|
|
114
|
-
{
|
|
115
|
-
"mcpServers": {
|
|
116
|
-
"prd": {
|
|
117
|
-
"command": "prd",
|
|
118
|
-
"args": ["mcp"]
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
```
|
|
109
|
+
Steward reads local filesystem and git metadata by design.
|
|
123
110
|
|
|
124
|
-
|
|
111
|
+
- Run only on trusted local machines
|
|
112
|
+
- Do not expose directly to the public internet
|
|
113
|
+
- Treat as a workstation tool, not a hosted multi-user service
|
|
125
114
|
|
|
126
|
-
##
|
|
115
|
+
## Storage
|
|
127
116
|
|
|
128
|
-
PRD state is
|
|
117
|
+
PRD state is stored in SQLite at:
|
|
129
118
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
119
|
+
1. `PRD_STATE_DB_PATH` (if set)
|
|
120
|
+
2. `PRD_STATE_HOME/state.db` (if set)
|
|
121
|
+
3. `${XDG_DATA_HOME:-~/.local/share}/prd/state.db`
|
|
133
122
|
|
|
134
|
-
|
|
123
|
+
## Development
|
|
135
124
|
|
|
136
|
-
|
|
125
|
+
```bash
|
|
126
|
+
npm install
|
|
127
|
+
npm run dev
|
|
128
|
+
npm run typecheck
|
|
129
|
+
npm run build
|
|
130
|
+
```
|
|
137
131
|
|
|
138
|
-
|
|
132
|
+
## Environment Variables
|
|
139
133
|
|
|
140
|
-
| Variable |
|
|
141
|
-
| --- | --- |
|
|
142
|
-
| `PRD_STATE_DB_PATH` |
|
|
143
|
-
| `PRD_STATE_HOME` |
|
|
144
|
-
| `XDG_DATA_HOME` |
|
|
134
|
+
| Variable | Description |
|
|
135
|
+
| --- | --- |
|
|
136
|
+
| `PRD_STATE_DB_PATH` | Absolute path to SQLite DB file |
|
|
137
|
+
| `PRD_STATE_HOME` | Base directory for DB (`state.db` inside) |
|
|
138
|
+
| `XDG_DATA_HOME` | Fallback base path for default DB location |
|
|
145
139
|
|
|
146
|
-
## OpenCode Bundle
|
|
140
|
+
## OpenCode Bundle
|
|
147
141
|
|
|
148
|
-
This
|
|
142
|
+
This repo includes curated OpenCode assets under `opencode/`:
|
|
149
143
|
|
|
150
144
|
- Commands: `prd`, `prd-task`, `complete-next-task`, `commit`
|
|
151
145
|
- Skills: `prd`, `prd-task`, `complete-next-task`, `commit`
|
|
152
146
|
- Script: `prd-db.mjs`
|
|
153
147
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
To install into a local OpenCode config:
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
mkdir -p ~/.config/opencode
|
|
160
|
-
cp -R opencode/commands ~/.config/opencode/
|
|
161
|
-
cp -R opencode/skills ~/.config/opencode/
|
|
162
|
-
cp -R opencode/scripts ~/.config/opencode/
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
## CI
|
|
166
|
-
|
|
167
|
-
GitHub Actions runs:
|
|
168
|
-
|
|
169
|
-
- Typecheck + build validation
|
|
170
|
-
- Secret scanning with gitleaks
|
|
171
|
-
|
|
172
|
-
## Roadmap
|
|
148
|
+
## License
|
|
173
149
|
|
|
174
|
-
|
|
175
|
-
- Expand codemode APIs and automation patterns
|
|
150
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thxgg/steward",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Local-first PRD workflow steward with codemode MCP and web UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "thxgg",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/thxgg/
|
|
10
|
+
"url": "git+https://github.com/thxgg/steward.git"
|
|
11
11
|
},
|
|
12
12
|
"bugs": {
|
|
13
|
-
"url": "https://github.com/thxgg/
|
|
13
|
+
"url": "https://github.com/thxgg/steward/issues"
|
|
14
14
|
},
|
|
15
|
-
"homepage": "https://github.com/thxgg/
|
|
15
|
+
"homepage": "https://github.com/thxgg/steward#readme",
|
|
16
16
|
"keywords": [
|
|
17
17
|
"prd",
|
|
18
18
|
"mcp",
|