create-pmos 0.6.3 → 0.7.0
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 +54 -1
- package/package.json +1 -1
- package/payload/KIT-VERSION +2 -2
- package/payload/scripts/gate-initiative.sh +4 -1
- package/workspace/lib/apply-change.js +106 -0
- package/workspace/lib/correction-record.js +127 -0
- package/workspace/lib/finding-contract.js +162 -0
- package/workspace/lib/git-info.js +71 -0
- package/workspace/lib/harness-parse.js +5 -1
- package/workspace/lib/layout.js +171 -0
- package/workspace/lib/skill-store.js +28 -9
- package/workspace/lib/tmux-control.js +124 -0
- package/workspace/public/app.js +862 -89
- package/workspace/public/index.html +113 -23
- package/workspace/public/styles.css +232 -19
- package/workspace/server.js +384 -16
- package/workspace/skills/doc-review.skill +114 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: doc-review
|
|
3
|
+
label: "Review documents"
|
|
4
|
+
description: "Read the planning documents you name and report only defects the artifact cannot detect about itself — never lint. Each finding carries its evidence and, where one exists, a proposed change you dispose of."
|
|
5
|
+
run: agent
|
|
6
|
+
agent: claude
|
|
7
|
+
output:
|
|
8
|
+
- Read
|
|
9
|
+
- Findings
|
|
10
|
+
- Withheld
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
You are running the "Review documents" skill in this PMOS workspace (local, file mode). Work only
|
|
14
|
+
from this repository's own files, git, and CLIs — no network (D54).
|
|
15
|
+
|
|
16
|
+
Goal: surface defects in the named documents that **the artifact cannot detect about itself**, and
|
|
17
|
+
file them as a contract-checked review the PM disposes of one at a time.
|
|
18
|
+
|
|
19
|
+
## What counts as a finding — and what does not
|
|
20
|
+
|
|
21
|
+
The whole value of this review is that the PM keeps reading it. A review that reports what a linter
|
|
22
|
+
already reports becomes a linter with manners, and gets ignored by Thursday.
|
|
23
|
+
|
|
24
|
+
**Report only defects the document cannot detect about itself.** The four kinds that recur:
|
|
25
|
+
|
|
26
|
+
- **A metric that does not measure its own claim** — a PRD bets on an outcome, then defines success as
|
|
27
|
+
a capability demo, so it can score full marks and move the outcome not at all.
|
|
28
|
+
- **An anchor that cannot score wrong** — a rubric dimension whose anchors award credit for descoping,
|
|
29
|
+
or that cannot distinguish a correct implementation from an absent one.
|
|
30
|
+
- **A gate that scripts away its own question** — a rubric prescribing the Acceptance Gate as the same
|
|
31
|
+
checklist it already scored, turning D12's strategic judgement into a second review pass.
|
|
32
|
+
- **A constraint contradicted elsewhere** — a non-goal or design rule in one shipped document that
|
|
33
|
+
silently rules out what another document proposes.
|
|
34
|
+
|
|
35
|
+
**NEVER report** — these belong to lint and the Frontmatter Gate, and emitting them fails the
|
|
36
|
+
contract outright: frontmatter or schema validity · broken links or missing paths · string/regex
|
|
37
|
+
matches · counting occurrences · spelling, typos, formatting.
|
|
38
|
+
|
|
39
|
+
**Say nothing when there is nothing to say.** An empty findings list is a correct and valued outcome.
|
|
40
|
+
Do not pad a review to look thorough — a false finding costs the PM more than a missed one, because
|
|
41
|
+
they pay for it every time.
|
|
42
|
+
|
|
43
|
+
## The withheld class — where you must NOT propose a fix
|
|
44
|
+
|
|
45
|
+
Some defects are not defects. Before proposing any change, ask: **would applying this close a
|
|
46
|
+
question the PM has parked, or overwrite a decision they recorded?** Check `pm-decisions.md`,
|
|
47
|
+
`DECISIONS.md`, and the document's own history.
|
|
48
|
+
|
|
49
|
+
If yes, the finding is **withheld**: `"withheld": true`, `"proposal": null`, and a
|
|
50
|
+
`"withheld_reason"` saying why it is the PM's to settle. The client renders no Apply control for it —
|
|
51
|
+
the absence of the button is the guard, so a withheld finding carrying a proposal is rejected by the
|
|
52
|
+
contract, not merely discouraged.
|
|
53
|
+
|
|
54
|
+
The recorded instance: `CLAUDE.md` points file-mode state at `pmos/state/*.jsonl`, which looks stale
|
|
55
|
+
and is not — it is a measured open question (`pm-decisions.md` 491–503).
|
|
56
|
+
|
|
57
|
+
## Procedure
|
|
58
|
+
|
|
59
|
+
1. **Take the scope.** Read exactly the documents the PM named. Do not widen it.
|
|
60
|
+
*Done when:* every named path has been read in full, and you can list them.
|
|
61
|
+
|
|
62
|
+
2. **Find, then cut.** For each document, ask the four questions above. Then remove every candidate
|
|
63
|
+
that a regex could have found, and every one you cannot evidence to a specific line.
|
|
64
|
+
*Done when:* each surviving finding names, in one sentence, what the artifact cannot see about
|
|
65
|
+
itself — the `self_undetectable` field. If you cannot write that sentence, drop the finding.
|
|
66
|
+
|
|
67
|
+
3. **Propose, or withhold.** Where a change would genuinely fix it, write `proposal.before` as text
|
|
68
|
+
copied **verbatim** from the file and `proposal.after` as its replacement. `before` must appear in
|
|
69
|
+
the file **exactly once** — the apply path refuses a stale or ambiguous anchor rather than
|
|
70
|
+
guessing. Where the withheld test fires, propose nothing.
|
|
71
|
+
*Done when:* every finding either carries an exact-match proposal or is explicitly withheld.
|
|
72
|
+
|
|
73
|
+
4. **File the review.** Pick a run id (`doc-review-<UTC-timestamp>`), then write
|
|
74
|
+
`workspace/state/reviews/<run-id>.json` with exactly this shape:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"at": "<ISO 8601>",
|
|
79
|
+
"read": ["planning/prd/example-prd.md"],
|
|
80
|
+
"findings": [
|
|
81
|
+
{
|
|
82
|
+
"title": "One sentence, the defect stated plainly.",
|
|
83
|
+
"file": "planning/prd/example-prd.md",
|
|
84
|
+
"kind": "metric-claim-mismatch",
|
|
85
|
+
"argument": "Why this is a defect — the reasoning, not a restatement.",
|
|
86
|
+
"self_undetectable": "What this artifact cannot see about itself.",
|
|
87
|
+
"evidence": [{ "file": "planning/prd/example-prd.md", "line": 17 }],
|
|
88
|
+
"withheld": false,
|
|
89
|
+
"proposal": { "before": "<verbatim text from the file>", "after": "<replacement>" }
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
`withheld` is a required boolean on every finding and is never inferred. A withheld finding sets
|
|
96
|
+
`"proposal": null` and adds `"withheld_reason"`.
|
|
97
|
+
*Done when:* the file is valid JSON and `GET /api/review` returns `ok: true` for it. If it returns
|
|
98
|
+
`422`, the contract rejected a finding — fix it; do not file it anyway.
|
|
99
|
+
|
|
100
|
+
5. **Tell the PM it is ready.** Read `workspace/state/needs.json` (a missing file is `[]`), append
|
|
101
|
+
exactly this object, and write the whole array back — it must stay a valid JSON array:
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{"run_id":"<run-id>","kind":"review","initiative_id":"workspace-review-and-edit","question":"Document review — <n> findings"}
|
|
105
|
+
```
|
|
106
|
+
*Done when:* `needs.json` is a valid array containing the new object.
|
|
107
|
+
|
|
108
|
+
## Output contract — produce EXACTLY these sections
|
|
109
|
+
|
|
110
|
+
- **Read** — the documents actually read, one per line.
|
|
111
|
+
- **Findings** — one line per finding: the title and its `file:line`. `None this review.` if empty,
|
|
112
|
+
which is a good outcome, not a failed run.
|
|
113
|
+
- **Withheld** — findings deliberately left for the PM, with the one-line reason. `None this review.`
|
|
114
|
+
if empty.
|