pm-ops 2026.7.6
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/CHANGELOG.md +15 -0
- package/LICENSE +21 -0
- package/README.md +179 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1007 -0
- package/dist/index.js.map +1 -0
- package/manifest.json +15 -0
- package/package.json +96 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 2026.7.6 - 2026-07-06
|
|
4
|
+
|
|
5
|
+
### Other
|
|
6
|
+
|
|
7
|
+
- Align Node engine with pm CLI runtime ([ops-45xp](https://github.com/unbraind/pm-ops/blob/main/.agents/pm/tasks/ops-45xp.toon))
|
|
8
|
+
- Refresh pm-ops to latest pm CLI and changelog toolchain ([ops-xfit](https://github.com/unbraind/pm-ops/blob/main/.agents/pm/tasks/ops-xfit.toon))
|
|
9
|
+
- Output rendering via renderer-override marker ([ops-kmjq](https://github.com/unbraind/pm-ops/blob/main/.agents/pm/decisions/ops-kmjq.toon))
|
|
10
|
+
- Real-data test suite against pm fleet ([ops-hadw](https://github.com/unbraind/pm-ops/blob/main/.agents/pm/tasks/ops-hadw.toon))
|
|
11
|
+
- CI + daily release workflow setup ([ops-8d93](https://github.com/unbraind/pm-ops/blob/main/.agents/pm/tasks/ops-8d93.toon))
|
|
12
|
+
- Implement ops report command ([ops-u5t3](https://github.com/unbraind/pm-ops/blob/main/.agents/pm/tasks/ops-u5t3.toon))
|
|
13
|
+
- Implement ops verify-release command ([ops-621x](https://github.com/unbraind/pm-ops/blob/main/.agents/pm/tasks/ops-621x.toon))
|
|
14
|
+
- Implement ops policy command ([ops-b9rl](https://github.com/unbraind/pm-ops/blob/main/.agents/pm/tasks/ops-b9rl.toon))
|
|
15
|
+
- Implement ops scan command ([ops-jxpd](https://github.com/unbraind/pm-ops/blob/main/.agents/pm/tasks/ops-jxpd.toon))
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 unbraind
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# pm-ops
|
|
2
|
+
|
|
3
|
+
Multi-repo fleet operations for [pm-cli](https://github.com/unbraind/pm-cli).
|
|
4
|
+
|
|
5
|
+
`pm-ops` gives coding agents one command surface for operating across **many** `pm-*` repositories: audit release readiness, enforce naming/workflow policies, run a release-gate matrix, and emit concise fleet reports. Zero external runtime dependencies — Node built-ins only.
|
|
6
|
+
|
|
7
|
+
> Philosophy: _project management = context management_, applied to a **fleet** of repos.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pm install github.com/unbraind/pm-ops --project
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or install globally:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pm install github.com/unbraind/pm-ops --global
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Commands
|
|
26
|
+
|
|
27
|
+
### `pm ops scan`
|
|
28
|
+
|
|
29
|
+
Scan a set of repos and produce a per-repo release-readiness snapshot.
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pm ops scan
|
|
33
|
+
pm ops scan --repos ./pm-csv ./pm-github
|
|
34
|
+
pm ops scan --repos ./pm-csv,./pm-github --json
|
|
35
|
+
pm ops scan --format markdown
|
|
36
|
+
pm ops scan --repos ~/container/pm-* --format markdown --output FLEET.md
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
For each repo `scan` checks:
|
|
40
|
+
|
|
41
|
+
- `package.json` present (name, version)
|
|
42
|
+
- `tsconfig.json` with `strict: true`
|
|
43
|
+
- `CHANGELOG.md` present
|
|
44
|
+
- `.github/workflows/release.yml` and `ci.yml` present
|
|
45
|
+
- `.agents/pm` workspace + open/in_progress item counts (`pm list --json`)
|
|
46
|
+
- `pm-changelog` wired into devDependencies
|
|
47
|
+
- `npm outdated` count
|
|
48
|
+
- `npm audit --omit=dev` critical/high counts
|
|
49
|
+
- open PRs/issues via `gh` (when the repo is a GitHub repo)
|
|
50
|
+
|
|
51
|
+
A repo is `ready` when it has a package.json, strict TS, a changelog, both CI/release workflows, pm-changelog wired, and zero critical audit vulnerabilities.
|
|
52
|
+
|
|
53
|
+
**Flags**
|
|
54
|
+
|
|
55
|
+
| Flag | Type | Default | Description |
|
|
56
|
+
|---|---|---|---|
|
|
57
|
+
| `--repos <paths>` | string[] | current dir | Repo paths to scan (comma-separated or repeatable) |
|
|
58
|
+
| `--json` | boolean | false | Emit clean JSON to stdout (progress on stderr) |
|
|
59
|
+
| `--format <toon\|json\|markdown>` | string | `toon` | Output format |
|
|
60
|
+
| `--output <file>` | string | — | Write the rendered output to a file instead of stdout |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### `pm ops policy`
|
|
65
|
+
|
|
66
|
+
Validate a policy bundle against repos. The default policy (no file needed) checks:
|
|
67
|
+
|
|
68
|
+
- **naming** — repo name matches `^pm-[a-z][a-z0-9-]*$` (no `pm-ext-` / `pm-preset-` prefixes)
|
|
69
|
+
- **required-scripts** — `package.json` has `typecheck`, `test`, `build`, `release:check`, `changelog`, `changelog:check`
|
|
70
|
+
- **required-workflows** — `ci.yml` + `release.yml` present
|
|
71
|
+
- **private-no-runners** — private repos must NOT use `runs-on: github-hosted` / `macos-` / `windows-` / `ubuntu-` (skipped for public repos)
|
|
72
|
+
- **pm-duplicate-titles** — no two OPEN pm items share the same title
|
|
73
|
+
- **pm-changelog-wired** — `pm-changelog` in devDeps AND a `changelog` script exists
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pm ops policy
|
|
77
|
+
pm ops policy --repos ./pm-csv ./pm-github
|
|
78
|
+
pm ops policy --policy ./fleet-policy.json --strict
|
|
79
|
+
pm ops policy --format markdown
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`--policy <file>` loads a JSON bundle overriding the defaults:
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"checks": [
|
|
87
|
+
{ "id": "naming", "severity": "error" },
|
|
88
|
+
{ "id": "required-scripts", "severity": "error", "repo_filter": "pm-csv",
|
|
89
|
+
"params": { "scripts": ["typecheck", "test", "build"] } }
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`--strict` exits non-zero on any failed check (any severity).
|
|
95
|
+
|
|
96
|
+
**Flags**
|
|
97
|
+
|
|
98
|
+
| Flag | Type | Default | Description |
|
|
99
|
+
|---|---|---|---|
|
|
100
|
+
| `--repos <paths>` | string[] | current dir | Repo paths to check |
|
|
101
|
+
| `--policy <file>` | string | built-in | JSON policy bundle |
|
|
102
|
+
| `--json` | boolean | false | Emit clean JSON to stdout |
|
|
103
|
+
| `--format <toon\|json\|markdown>` | string | `toon` | Output format |
|
|
104
|
+
| `--strict` | boolean | false | Exit non-zero on any failure |
|
|
105
|
+
| `--output <file>` | string | — | Write the rendered output to a file instead of stdout |
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
### `pm ops verify-release`
|
|
110
|
+
|
|
111
|
+
Run the release gate matrix per repo: executes `npm run release:check` (or the individual `typecheck` / `build` / `test` / `audit:prod` / `pack:dry-run` / `changelog:check` steps when `release:check` is missing) and reports pass/fail with per-step timing. **Does NOT publish.** Exits non-zero if any repo fails.
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
pm ops verify-release
|
|
115
|
+
pm ops verify-release --repos ./pm-csv ./pm-github
|
|
116
|
+
pm ops verify-release --json
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Flags**
|
|
120
|
+
|
|
121
|
+
| Flag | Type | Default | Description |
|
|
122
|
+
|---|---|---|---|
|
|
123
|
+
| `--repos <paths>` | string[] | current dir | Repo paths to verify |
|
|
124
|
+
| `--json` | boolean | false | Emit clean JSON to stdout |
|
|
125
|
+
| `--format <toon\|json\|markdown>` | string | `toon` | Output format |
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### `pm ops report`
|
|
130
|
+
|
|
131
|
+
Emit a concise fleet report combining scan + policy results.
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
pm ops report
|
|
135
|
+
pm ops report --repos ./pm-csv ./pm-github --format markdown
|
|
136
|
+
pm ops report --format markdown --output FLEET.md
|
|
137
|
+
pm ops report --json
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Flags**
|
|
141
|
+
|
|
142
|
+
| Flag | Type | Default | Description |
|
|
143
|
+
|---|---|---|---|
|
|
144
|
+
| `--repos <paths>` | string[] | current dir | Repo paths to report on |
|
|
145
|
+
| `--json` | boolean | false | Emit clean JSON to stdout |
|
|
146
|
+
| `--format <toon\|json\|markdown>` | string | `toon` | Output format |
|
|
147
|
+
| `--output <file>` | string | — | Write the report to a file instead of stdout |
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Agent usage
|
|
152
|
+
|
|
153
|
+
`pm-ops` is designed for coding agents operating across a fleet of `pm-*` repos:
|
|
154
|
+
|
|
155
|
+
- **Deterministic JSON.** Every command supports `--json` for strict parsing; human-readable progress goes to stderr so stdout stays clean.
|
|
156
|
+
- **Stable ordering.** Repo results are emitted in the order passed on `--repos`.
|
|
157
|
+
- **Failure diagnostics.** `verify-release` writes the full per-check matrix to stdout _then_ throws a non-zero exit on failure, so agents get both the diagnostics and the exit code.
|
|
158
|
+
- **Offline mode.** Set `PM_OPS_OFFLINE=1` to skip `npm outdated` / `npm audit` / `gh` calls (useful in air-gapped CI); file-based checks still run.
|
|
159
|
+
- **No shell injection.** All subprocess calls (`pm`, `npm`, `gh`) pass args as arrays via `spawnSync` — never through a shell.
|
|
160
|
+
- **Zero runtime deps.** Only Node built-ins, so the package installs fast and audits clean.
|
|
161
|
+
|
|
162
|
+
### Output formats
|
|
163
|
+
|
|
164
|
+
- **toon** (default) — compact, host-rendered TOON of the structured result; easy to read in a terminal.
|
|
165
|
+
- **json** — `JSON.stringify(result, null, 2)`; the same object shape for every command.
|
|
166
|
+
- **markdown** — GitHub-flavoured tables suitable for pasting into PRs, issues, or a `FLEET.md`.
|
|
167
|
+
|
|
168
|
+
### Result shapes
|
|
169
|
+
|
|
170
|
+
`scan` → `{ repos: RepoScan[], summary: { total, ready, not_ready } }`
|
|
171
|
+
`policy` → `{ repos: RepoPolicy[], summary: { total, passed, failed, by_severity } }`
|
|
172
|
+
`verify-release` → `{ repos: RepoRelease[], summary: { total, passed, failed } }`
|
|
173
|
+
`report` → `{ generated_at, scan: ScanResult, policy: PolicyResult }`
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## License
|
|
178
|
+
|
|
179
|
+
MIT © unbraind
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;kBA4+BgB,GAAG;;AAJnB,wBAsLG"}
|