@thxgg/steward 0.1.0 → 0.1.1
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 +93 -122
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,175 +1,146 @@
|
|
|
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:
|
|
19
|
-
|
|
20
|
-
- Run it only on trusted local machines.
|
|
21
|
-
- Do not expose it directly to the public internet.
|
|
22
|
-
- Treat it as a developer workstation tool, not a hosted multi-user service.
|
|
23
|
-
|
|
24
|
-
## Requirements
|
|
6
|
+
- npm package: `@thxgg/steward`
|
|
7
|
+
- CLI command: `prd`
|
|
25
8
|
|
|
26
|
-
|
|
27
|
-
- npm (or pnpm)
|
|
28
|
-
- Git
|
|
29
|
-
- Linux/macOS (or compatible environment)
|
|
9
|
+
## Install
|
|
30
10
|
|
|
31
|
-
|
|
11
|
+
### Via npm
|
|
32
12
|
|
|
33
13
|
```bash
|
|
34
|
-
npm install
|
|
35
|
-
npm run dev
|
|
14
|
+
npm install -g @thxgg/steward
|
|
36
15
|
```
|
|
37
16
|
|
|
38
|
-
|
|
17
|
+
### Without global install
|
|
39
18
|
|
|
40
19
|
```bash
|
|
41
|
-
|
|
42
|
-
pnpm run dev
|
|
20
|
+
npx -y @thxgg/steward ui
|
|
43
21
|
```
|
|
44
22
|
|
|
45
|
-
|
|
23
|
+
## Usage
|
|
46
24
|
|
|
47
|
-
|
|
25
|
+
### MCP Server
|
|
48
26
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
27
|
+
Add to your MCP client config:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"mcpServers": {
|
|
32
|
+
"prd": {
|
|
33
|
+
"command": "npx",
|
|
34
|
+
"args": ["-y", "@thxgg/steward", "mcp"]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
52
38
|
```
|
|
53
39
|
|
|
54
|
-
|
|
40
|
+
### CLI
|
|
55
41
|
|
|
56
42
|
```bash
|
|
57
|
-
pnpm add -g @thxgg/steward
|
|
58
43
|
prd ui
|
|
44
|
+
prd ui --preview
|
|
45
|
+
prd ui --port 3100 --host 127.0.0.1
|
|
46
|
+
prd mcp
|
|
59
47
|
```
|
|
60
48
|
|
|
61
|
-
|
|
49
|
+
## Architecture
|
|
62
50
|
|
|
63
|
-
```bash
|
|
64
|
-
npx -y @thxgg/steward ui
|
|
65
51
|
```
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
52
|
+
┌─────────────────────────────────────────┐
|
|
53
|
+
│ Steward CLI (Node) │
|
|
54
|
+
│ - `prd ui` launches Nuxt app │
|
|
55
|
+
│ - `prd mcp` starts MCP over stdio │
|
|
56
|
+
└─────────────────────────────────────────┘
|
|
57
|
+
│
|
|
58
|
+
▼
|
|
59
|
+
┌─────────────────────────────────────────┐
|
|
60
|
+
│ Codemode MCP (`execute`) │
|
|
61
|
+
│ - VM sandbox │
|
|
62
|
+
│ - APIs: repos, prds, git, state │
|
|
63
|
+
└─────────────────────────────────────────┘
|
|
64
|
+
│
|
|
65
|
+
▼
|
|
66
|
+
┌─────────────────────────────────────────┐
|
|
67
|
+
│ Local SQLite PRD State │
|
|
68
|
+
│ - Global store shared across repos │
|
|
69
|
+
└─────────────────────────────────────────┘
|
|
71
70
|
```
|
|
72
71
|
|
|
73
|
-
##
|
|
72
|
+
## Codemode Pattern
|
|
74
73
|
|
|
75
|
-
|
|
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
|
|
74
|
+
Steward exposes one MCP tool: `execute`.
|
|
81
75
|
|
|
82
|
-
|
|
76
|
+
```js
|
|
77
|
+
const reposList = await repos.list()
|
|
78
|
+
const repo = reposList[0]
|
|
79
|
+
if (!repo) return { error: 'No repos configured' }
|
|
83
80
|
|
|
84
|
-
|
|
81
|
+
const prdList = await prds.list(repo.id)
|
|
82
|
+
if (prdList.length === 0) return { repo: repo.name, prds: 0 }
|
|
85
83
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
For local shell usage while developing this repo:
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
npm link
|
|
97
|
-
prd ui
|
|
84
|
+
const slug = prdList[0].slug
|
|
85
|
+
return {
|
|
86
|
+
doc: await prds.getDocument(repo.id, slug),
|
|
87
|
+
tasks: await prds.getTasks(repo.id, slug),
|
|
88
|
+
progress: await prds.getProgress(repo.id, slug)
|
|
89
|
+
}
|
|
98
90
|
```
|
|
99
91
|
|
|
100
|
-
##
|
|
92
|
+
## APIs
|
|
101
93
|
|
|
102
|
-
|
|
94
|
+
Inside `execute`, these APIs are available:
|
|
103
95
|
|
|
104
|
-
|
|
96
|
+
- `repos` - register/list/remove repos and refresh discovered git repos
|
|
97
|
+
- `prds` - list/read PRD docs, tasks, progress, and task commit refs
|
|
98
|
+
- `git` - commit metadata, diffs, file diffs, and file contents
|
|
99
|
+
- `state` - direct PRD state get/upsert by repo id or path
|
|
105
100
|
|
|
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
|
|
101
|
+
Detailed API docs and examples: `docs/MCP.md`
|
|
110
102
|
|
|
111
|
-
|
|
103
|
+
## Local-First Security Model
|
|
112
104
|
|
|
113
|
-
|
|
114
|
-
{
|
|
115
|
-
"mcpServers": {
|
|
116
|
-
"prd": {
|
|
117
|
-
"command": "prd",
|
|
118
|
-
"args": ["mcp"]
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
```
|
|
105
|
+
Steward reads local filesystem and git metadata by design.
|
|
123
106
|
|
|
124
|
-
|
|
107
|
+
- Run only on trusted local machines
|
|
108
|
+
- Do not expose directly to the public internet
|
|
109
|
+
- Treat as a workstation tool, not a hosted multi-user service
|
|
125
110
|
|
|
126
|
-
##
|
|
111
|
+
## Storage
|
|
127
112
|
|
|
128
|
-
PRD state is
|
|
113
|
+
PRD state is stored in SQLite at:
|
|
129
114
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
115
|
+
1. `PRD_STATE_DB_PATH` (if set)
|
|
116
|
+
2. `PRD_STATE_HOME/state.db` (if set)
|
|
117
|
+
3. `${XDG_DATA_HOME:-~/.local/share}/prd/state.db`
|
|
133
118
|
|
|
134
|
-
|
|
119
|
+
## Development
|
|
135
120
|
|
|
136
|
-
|
|
121
|
+
```bash
|
|
122
|
+
npm install
|
|
123
|
+
npm run dev
|
|
124
|
+
npm run typecheck
|
|
125
|
+
npm run build
|
|
126
|
+
```
|
|
137
127
|
|
|
138
|
-
|
|
128
|
+
## Environment Variables
|
|
139
129
|
|
|
140
|
-
| Variable |
|
|
141
|
-
| --- | --- |
|
|
142
|
-
| `PRD_STATE_DB_PATH` |
|
|
143
|
-
| `PRD_STATE_HOME` |
|
|
144
|
-
| `XDG_DATA_HOME` |
|
|
130
|
+
| Variable | Description |
|
|
131
|
+
| --- | --- |
|
|
132
|
+
| `PRD_STATE_DB_PATH` | Absolute path to SQLite DB file |
|
|
133
|
+
| `PRD_STATE_HOME` | Base directory for DB (`state.db` inside) |
|
|
134
|
+
| `XDG_DATA_HOME` | Fallback base path for default DB location |
|
|
145
135
|
|
|
146
|
-
## OpenCode Bundle
|
|
136
|
+
## OpenCode Bundle
|
|
147
137
|
|
|
148
|
-
This
|
|
138
|
+
This repo includes curated OpenCode assets under `opencode/`:
|
|
149
139
|
|
|
150
140
|
- Commands: `prd`, `prd-task`, `complete-next-task`, `commit`
|
|
151
141
|
- Skills: `prd`, `prd-task`, `complete-next-task`, `commit`
|
|
152
142
|
- Script: `prd-db.mjs`
|
|
153
143
|
|
|
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
|
|
144
|
+
## License
|
|
173
145
|
|
|
174
|
-
|
|
175
|
-
- Expand codemode APIs and automation patterns
|
|
146
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thxgg/steward",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
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",
|