phronesis 1.0.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.
Files changed (142) hide show
  1. package/README.md +66 -0
  2. package/package.json +34 -0
  3. package/src/act.js +61 -0
  4. package/src/active-context.js +56 -0
  5. package/src/adapter.js +386 -0
  6. package/src/cli.js +1893 -0
  7. package/src/codex-hooks-schema.js +92 -0
  8. package/src/compile.js +513 -0
  9. package/src/doctor.js +303 -0
  10. package/src/due.js +271 -0
  11. package/src/eval.js +467 -0
  12. package/src/event.js +212 -0
  13. package/src/export.js +136 -0
  14. package/src/guard.js +89 -0
  15. package/src/hooks.js +230 -0
  16. package/src/ingest.js +965 -0
  17. package/src/init.js +150 -0
  18. package/src/layout.js +394 -0
  19. package/src/links.js +83 -0
  20. package/src/lint.js +58 -0
  21. package/src/profile.js +116 -0
  22. package/src/prompts.js +26 -0
  23. package/src/registry.js +190 -0
  24. package/src/scaffold.js +134 -0
  25. package/src/search.js +139 -0
  26. package/src/skill-discovery.js +117 -0
  27. package/src/skills-bump.js +885 -0
  28. package/src/skills.js +355 -0
  29. package/src/subscription.js +5 -0
  30. package/src/validate.js +152 -0
  31. package/templates/claude/settings.json +86 -0
  32. package/templates/codex/INDEX.md +68 -0
  33. package/templates/codex/seed/ai-practice/compile-dont-just-capture.md +42 -0
  34. package/templates/codex/seed/ai-practice/design-for-the-distribution.md +42 -0
  35. package/templates/codex/seed/ai-practice/from-spec-author-to-outcome-curator.md +43 -0
  36. package/templates/codex/seed/ai-practice/recall-builds-trust-when-calibrated.md +70 -0
  37. package/templates/codex/seed/ai-practice/the-eval-is-the-spec.md +42 -0
  38. package/templates/codex/seed/ai-practice/the-gold-dust-leaves-no-trace.md +72 -0
  39. package/templates/codex/seed/ai-practice/the-model-is-not-the-moat.md +40 -0
  40. package/templates/codex/seed/ai-practice/when-generation-is-cheap-judgment-is-the-work.md +39 -0
  41. package/templates/codex/seed/judgment/contextual-stewardship-is-the-senior-skill.md +50 -0
  42. package/templates/codex/seed/judgment/decision-quality-is-distinct-from-outcome-quality.md +39 -0
  43. package/templates/codex/seed/judgment/embrace-reality-ego-and-blind-spots.md +38 -0
  44. package/templates/codex/seed/judgment/groups-seek-consensus-individuals-seek-truth.md +44 -0
  45. package/templates/codex/seed/judgment/heresies-are-where-the-edge-lives.md +42 -0
  46. package/templates/codex/seed/judgment/judgment-compounds-through-honest-reflection.md +38 -0
  47. package/templates/codex/seed/judgment/phronesis-is-judgment-in-the-particular.md +67 -0
  48. package/templates/codex/seed/judgment/show-me-the-apparatus.md +40 -0
  49. package/templates/codex/seed/judgment/small-judgment-gaps-compound-under-leverage.md +37 -0
  50. package/templates/codex/seed/judgment/taste-is-compressed-judgment.md +38 -0
  51. package/templates/codex/seed/judgment/trust-taste-only-where-feedback-is-valid.md +42 -0
  52. package/templates/codex/seed/judgment/weigh-the-reasoning-not-the-recommendation.md +43 -0
  53. package/templates/codex/seed/leadership/a-managers-output-is-the-teams-output.md +35 -0
  54. package/templates/codex/seed/leadership/most-team-problems-are-structural.md +40 -0
  55. package/templates/codex/seed/leadership/next-play.md +36 -0
  56. package/templates/codex/seed/leadership/psychological-safety.md +39 -0
  57. package/templates/codex/seed/leadership/right-size-your-teams.md +38 -0
  58. package/templates/codex/seed/leadership/spend-time-on-high-leverage-activities.md +36 -0
  59. package/templates/codex/seed/leadership/talent-density-is-the-master-variable.md +39 -0
  60. package/templates/codex/seed/leadership/under-pressure-calm-is-contagious.md +36 -0
  61. package/templates/codex/seed/leadership/your-best-alternative-is-your-leverage.md +37 -0
  62. package/templates/codex/seed/pm/a-problem-well-stated-is-half-solved.md +39 -0
  63. package/templates/codex/seed/pm/a-real-strategy-makes-planning-trivial.md +40 -0
  64. package/templates/codex/seed/pm/barrels-and-ammunition.md +39 -0
  65. package/templates/codex/seed/pm/develop-taste-in-your-beliefs.md +38 -0
  66. package/templates/codex/seed/pm/hire-for-progress.md +44 -0
  67. package/templates/codex/seed/pm/jobs-are-stable-solutions-churn.md +39 -0
  68. package/templates/codex/seed/pm/level-by-the-ambiguity-someone-can-own.md +39 -0
  69. package/templates/codex/seed/pm/listen-before-you-prescribe.md +38 -0
  70. package/templates/codex/seed/pm/live-in-the-future-and-build-whats-missing.md +38 -0
  71. package/templates/codex/seed/pm/match-effort-to-leverage.md +37 -0
  72. package/templates/codex/seed/pm/not-my-fault-but-my-problem.md +40 -0
  73. package/templates/codex/seed/pm/pick-the-job-then-refuse-everything-outside-it.md +37 -0
  74. package/templates/codex/seed/pm/retention-sets-the-ceiling.md +38 -0
  75. package/templates/codex/seed/pm/scale-with-leaders-not-process.md +38 -0
  76. package/templates/codex/seed/pm/solution-discovery-over-problem-validation.md +38 -0
  77. package/templates/codex/seed/pm/tenfold-better-on-a-painful-problem.md +40 -0
  78. package/templates/codex-surface/README.md +73 -0
  79. package/templates/codex-surface/hooks/_resolve.sh +36 -0
  80. package/templates/codex-surface/hooks/recall-guard.sh +30 -0
  81. package/templates/codex-surface/hooks/session-start.sh +18 -0
  82. package/templates/codex-surface/hooks/session-sweep-precompact.sh +20 -0
  83. package/templates/codex-surface/hooks/session-sweep-subagent.sh +23 -0
  84. package/templates/codex-surface/hooks/session-sweep.sh +19 -0
  85. package/templates/codex-surface/hooks.json +69 -0
  86. package/templates/domains/pm/AGENTS.md +111 -0
  87. package/templates/domains/pm/MEMORY.md +7 -0
  88. package/templates/domains/pm/USER.md +8 -0
  89. package/templates/phronesis-hooks/compile-active-context.sh +38 -0
  90. package/templates/phronesis-hooks/recall-guard.sh +103 -0
  91. package/templates/phronesis-hooks/session-start.sh +90 -0
  92. package/templates/phronesis-hooks/session-sweep.sh +140 -0
  93. package/templates/phronesis-hooks/skill-lifecycle.sh +37 -0
  94. package/templates/skills/compile/SKILL.md +279 -0
  95. package/templates/skills/compile/evals/rubric.md +75 -0
  96. package/templates/skills/decision-log/SKILL.md +156 -0
  97. package/templates/skills/decision-log/evals/rubric.md +97 -0
  98. package/templates/skills/extract-gold-dust/SKILL.md +311 -0
  99. package/templates/skills/extract-gold-dust/evals/rubric.md +52 -0
  100. package/templates/skills/ingest/SKILL.md +204 -0
  101. package/templates/skills/ingest/evals/rubric.md +117 -0
  102. package/templates/skills/lint/SKILL.md +246 -0
  103. package/templates/skills/lint/evals/rubric.md +139 -0
  104. package/templates/skills/meeting-prep/SKILL.md +195 -0
  105. package/templates/skills/meeting-prep/evals/rubric.md +93 -0
  106. package/templates/skills/onboard/SKILL.md +258 -0
  107. package/templates/skills/onboard/evals/rubric.md +60 -0
  108. package/templates/skills/prd-draft/SKILL.md +193 -0
  109. package/templates/skills/prd-draft/evals/rubric.md +38 -0
  110. package/templates/skills/prep-extraction/SKILL.md +217 -0
  111. package/templates/skills/prep-extraction/evals/rubric.md +45 -0
  112. package/templates/skills/recall/SKILL.md +155 -0
  113. package/templates/skills/recall/evals/rubric.md +37 -0
  114. package/templates/skills/research/SKILL.md +247 -0
  115. package/templates/skills/research/evals/rubric.md +139 -0
  116. package/templates/skills/stakeholder-update/SKILL.md +163 -0
  117. package/templates/skills/stakeholder-update/evals/rubric.md +111 -0
  118. package/vendor/core/package.json +25 -0
  119. package/vendor/core/src/action-registry.js +459 -0
  120. package/vendor/core/src/action-writers.js +201 -0
  121. package/vendor/core/src/actions.js +2140 -0
  122. package/vendor/core/src/active-context.js +167 -0
  123. package/vendor/core/src/artifacts.js +301 -0
  124. package/vendor/core/src/content-digest.js +21 -0
  125. package/vendor/core/src/contract.js +245 -0
  126. package/vendor/core/src/event-log.js +338 -0
  127. package/vendor/core/src/guard.js +398 -0
  128. package/vendor/core/src/hook-executor.js +527 -0
  129. package/vendor/core/src/index.js +180 -0
  130. package/vendor/core/src/ingest.js +286 -0
  131. package/vendor/core/src/install-root.js +42 -0
  132. package/vendor/core/src/layout.js +13 -0
  133. package/vendor/core/src/link-index.js +198 -0
  134. package/vendor/core/src/lint.js +368 -0
  135. package/vendor/core/src/schedule.js +535 -0
  136. package/vendor/core/src/search.js +534 -0
  137. package/vendor/core/src/session-hooks.js +129 -0
  138. package/vendor/core/src/skill-lifecycle.js +479 -0
  139. package/vendor/core/src/skill-registry.js +524 -0
  140. package/vendor/core/src/subscription.js +84 -0
  141. package/vendor/core/src/validate-object.js +62 -0
  142. package/vendor/core/src/workspace-scan.js +125 -0
@@ -0,0 +1,258 @@
1
+ ---
2
+ name: onboard
3
+ version: 0.2.0
4
+ invocation:
5
+ explicit:
6
+ - "onboard me"
7
+ - "get me started"
8
+ - "set up my workspace"
9
+ suggested:
10
+ - "new Phronesis install"
11
+ - "first run"
12
+ - "empty workspace"
13
+ woven: false
14
+ weight: heavy
15
+ reads:
16
+ - domains/{active_domain}/AGENTS.md
17
+ - domains/{active_domain}/USER.md
18
+ - domains/{active_domain}/MEMORY.md
19
+ - domains/{active_domain}/raw/inbox/*
20
+ - domains/{active_domain}/raw/transcripts/*
21
+ - domains/{active_domain}/compiled/people/*
22
+ - domains/{active_domain}/compiled/projects/*
23
+ - domains/{active_domain}/compiled/decisions/*
24
+ - domains/{active_domain}/compiled/commitments/*
25
+ - domains/{active_domain}/compiled/insights/*
26
+ - domains/{active_domain}/compiled/organizations/*
27
+ - codex/INDEX.md
28
+ - codex/seed/*/*
29
+ - codex/personal/*
30
+ writes:
31
+ - domains/{active_domain}/raw/inbox/*
32
+ - domains/{active_domain}/raw/transcripts/*
33
+ - domains/{active_domain}/raw/degraded/*
34
+ - via_action_types: []
35
+ sub_agents: []
36
+ requires_model_tier: frontier
37
+ prompt_pin: claude-opus-4-8@2026-06-25
38
+ ---
39
+
40
+ # Skill: Onboard
41
+
42
+ Take a new operator from an empty install to a live Phronesis workspace using their
43
+ own material. This is the V1 local first-run skill: a guided conversation, not a
44
+ hosted wizard, not a bulk migration tool, and not a new CLI verb.
45
+
46
+ **The bar this workflow is written to clear is `evals/rubric.md` - seven
47
+ orchestration criteria, pass is >=4 on all seven.** Read the rubric before you
48
+ run; it is the acceptance spine.
49
+
50
+ ## What onboard is - and is not
51
+
52
+ - **Talk-first first run.** The primary path is a short conversation about the
53
+ operator's world. Folder import and pasted transcripts are supported, but only
54
+ after the operator confirms what matters.
55
+ - **A playbook over existing primitives.** Onboard guides separate invocations:
56
+ stage material with `ingest`, hand off to the `compile` skill, review and
57
+ accept drafts, query the accepted material, then guide deliberate seed adoption.
58
+ It does not compose skills internally and does not introduce a `via_skills`
59
+ protocol.
60
+ - **Issues no action types itself.** The frontmatter declares
61
+ `via_action_types: []`. The mesh is the downstream `compile` invocation's
62
+ responsibility. Seed adoption is a deliberate operator act through
63
+ `promote_to_codex`, not a hidden skill write.
64
+ - **Small-batch, confirm-each.** Onboard never silently imports a pile. It
65
+ discovers, presents, asks what to stage, then stages only the confirmed subset.
66
+ - **Local-first storage, honest model boundary.** Phronesis stores no hosted
67
+ telemetry or index, but the conversation is processed by the operator's chosen
68
+ AI surface unless they run a local model. Say that plainly before sensitive
69
+ material enters the interview.
70
+
71
+ ## Surface precondition
72
+
73
+ Run only after the operator has opened a wired surface for the install. If
74
+ `phronesis doctor` reports a failing native-hook install, or the operator is on a
75
+ guard-wrapper/manual surface they have not wired yet, stop and point them at
76
+ `docs/surface-setup.md` and `docs/dogfood-runbook.md`. Surface setup is a
77
+ precondition, not one of the onboarding beats.
78
+
79
+ ## Expectation contract - open every beat with it
80
+
81
+ Before each beat acts, state one line: **Next** - what the run will do now; and
82
+ **Pass-shape** - the concrete evidence the operator should see if it worked (a file,
83
+ path, event, command result, or operator-visible result). Name an honest negative as a
84
+ valid pass-shape when the workspace has nothing to return. Keep it lean; this is
85
+ orientation, not ceremony. It lets the operator grade reality without already knowing
86
+ the product (rubric criterion 7).
87
+
88
+ ## Beat 1 - Welcome and profile
89
+
90
+ > **Next:** confirm your profile (name, role) and choose how we map your world.
91
+ > **Pass-shape:** your profile fields are confirmed or an explicit gap is named, and you
92
+ > have picked one input mode after the model/storage boundary is stated.
93
+
94
+ Read `USER.md`, `MEMORY.md`, and the domain `AGENTS.md`. Confirm the operator's
95
+ name and role if present. If either is still a placeholder, ask for the missing
96
+ field and write it only through the existing profile/init path when available; if
97
+ not available, state that the profile remains incomplete and continue.
98
+
99
+ Tell the operator what will happen in one breath: "We'll map your world from a
100
+ short conversation or transcript, compile the first anchors, query them back, and
101
+ adopt only the seed principles you choose."
102
+
103
+ > **Checkpoint 1 - Consent and boundary.** Before taking material, confirm the
104
+ > operator understands the model boundary and chooses one input mode: live
105
+ > interview, bring-a-transcript, or confirmed folder/paste subset.
106
+
107
+ ## Beat 2 - Tell me about your world
108
+
109
+ > **Next:** identify candidate material from your answers or files and ask what to stage.
110
+ > **Pass-shape:** an `ingest --json` staging report with `staged >= 1` (lane named), or an
111
+ > explicit "no real material yet" fallback to the fixed first-session sample.
112
+
113
+ Use the seed library as an interview prompt bank. Read `codex/INDEX.md`, then read
114
+ only the seed articles whose `## Interview Prompt` sections match the operator's
115
+ energy and domain. Ask the smallest useful set of questions first:
116
+
117
+ 1. What product, team, or problem space are you responsible for?
118
+ 2. Who are the people or groups whose preferences shape the work?
119
+ 3. What decisions are already made, and what is still unresolved?
120
+ 4. What recurring lesson or belief guides how you operate here?
121
+ 5. What is the one pressing thing on your plate right now?
122
+
123
+ If the operator has a transcript, ask them to paste or provide the file after you
124
+ shape what to cover. If they point at a folder, list the candidate files and ask
125
+ which subset to stage. Do not ingest unconfirmed material.
126
+
127
+ Stage confirmed material as raw source:
128
+
129
+ ```text
130
+ phronesis ingest <file-or-dir> --domain <active-domain> --lane inbox --json
131
+ ```
132
+
133
+ Use `--lane transcripts` only when the input is a transcript. The pass signal is
134
+ the `--json` report with `staged >= 1` and no unexpected failures.
135
+
136
+ > **Checkpoint 2 - Curation.** Name what was discovered, what the operator
137
+ > confirmed, what was staged, and what was deliberately left out. If nothing real
138
+ > is available, fall back to the fixed first-session sample rather than inventing
139
+ > material.
140
+
141
+ ## Beat 3 - Your world, mapped
142
+
143
+ > **Next:** compile the staged material, then show a ranked anchor list before anything
144
+ > becomes canonical.
145
+ > **Pass-shape:** you see the ranking and its reasons, make an
146
+ > accept/tighten/drop/different-slice call, and only your approved drafts become canonical
147
+ > (`compile.accepted`).
148
+
149
+ Hand off to the separate `compile` skill. Treat this as its own invocation:
150
+
151
+ ```text
152
+ compile the inbox
153
+ ```
154
+
155
+ Because first-run material is normally untrusted, expect drafts under
156
+ `.phronesis/drafts/`. Do not dump every possible object at once, and do not silently
157
+ pick one. Present a **ranked anchor list with salience reasoning**: for each top
158
+ candidate, name why it is load-bearing, and name the lower-priority or ambiguous
159
+ candidates you set aside and why. Then offer the operator the choice set **accept /
160
+ tighten / drop / different-slice**, and act on their correction before accepting
161
+ anything. The operator must approve what becomes canonical.
162
+
163
+ Accept only operator-approved drafts:
164
+
165
+ ```text
166
+ PHRONESIS_APPROVAL_SOURCE=operator:interactive \
167
+ phronesis compile accept <draft_path> --session <session-id>
168
+ ```
169
+
170
+ Use the batch `compile review` path when several clean drafts are ready and the
171
+ operator gives one rationale. Record which accepted paths now exist in
172
+ `compiled/`.
173
+
174
+ > **Checkpoint 3 - Trust beat.** State what is still raw/draft, what became
175
+ > canonical, and which event proves it: `compile.accepted` for insight/org
176
+ > drafts, or `action_type.committed` for deterministic typed captures. Include the
177
+ > salience-review evidence: the ranked anchors you showed, the operator's
178
+ > accept/tighten/drop/different-slice decision, and the accepted or rejected paths.
179
+
180
+ ## Beat 4 - The one pressing thing
181
+
182
+ > **Next:** take your one pressing thing and query the accepted workspace for a real anchor.
183
+ > **Pass-shape:** a real compiled path, an existing seed slug, a staged source line, a
184
+ > concrete next step, or an honest "nothing connects yet" that names what is missing.
185
+
186
+ Return value inside the same session. Ask for the one thing that matters now,
187
+ then connect it to the freshly accepted workspace state:
188
+
189
+ - Query the operator's accepted material with `phronesis query "<terms>" --json`.
190
+ - Show one real anchor if it exists: a compiled path, a seed slug that actually
191
+ exists, or a source line from the staged dump.
192
+ - If nothing connects, say the honest negative and do not fabricate a bridge.
193
+ - Capture only warranted material. If the pressing thing is raw context, stage it
194
+ first. If compile or an action type is warranted, route it through the same
195
+ draft/action gates as above.
196
+
197
+ > **Checkpoint 4 - Reciprocity.** The operator must leave with a useful response:
198
+ > a real connection, a concrete next step, or an honest "nothing connects yet"
199
+ > that explains what the workspace is missing.
200
+
201
+ ## Beat 5 - Adopt 2-3 seed principles by choice
202
+
203
+ > **Next:** rank the installed seeds against your just-compiled material and recommend at
204
+ > most three, with a redirect open before anything is adopted.
205
+ > **Pass-shape:** you see why each seed matched (and any keyword-near distractor set
206
+ > aside), and adopt only the ones you choose, with your rationale, via `promote_to_codex`.
207
+
208
+ Seed principles are external starter material, not the operator's earned codex.
209
+ They stay quarantined until adopted. Browse the installed seed library through
210
+ `codex/INDEX.md` and read a few relevant seed articles. Before recommending, **show the
211
+ ranked seed candidates**: for each, say why it matched the operator's just-compiled
212
+ material or interview answers, name any plausible but lower-ranked distractor you set
213
+ aside (topic-keyword nearness is not a match), and recommend at most three. Invite the
214
+ operator to redirect to a different seed before any adoption.
215
+
216
+ For each recommended seed, ask the operator whether to adopt it and why it is theirs
217
+ now. Only then guide the existing operator-gated action:
218
+
219
+ ```text
220
+ PHRONESIS_APPROVAL_SOURCE=operator:interactive \
221
+ phronesis act promote_to_codex --session <session-id> --domain <active-domain> \
222
+ --json '{"from_seed":"<collection>/<slug>","rationale":"<operator rationale>"}'
223
+ ```
224
+
225
+ The payload uses `from_seed` inside `--json`. A bare `<slug>` is allowed only when
226
+ it resolves unambiguously, but the `{collection}/{slug}` form is preferred.
227
+
228
+ If no seed collection exists, say that seeds are coming and skip this beat. Do not
229
+ fabricate a seed or copy a seed into `codex/personal/` by hand.
230
+
231
+ > **Checkpoint 5 - Close the loop.** End with the accepted compiled paths, any
232
+ > adopted seed paths, the one pressing thing's next step, and the next suggested
233
+ > skill or doc. Include the seed salience evidence: the ranked seed recommendations,
234
+ > the operator's rationale or redirect, the adopted paths, and any skipped seeds. Do
235
+ > not claim a clean workspace; first-run lint may still show expected orphans.
236
+
237
+ ## Without the runtime
238
+
239
+ The interview, curation, and synthesis still run as a plain workflow. Reads are
240
+ unchanged: inspect `USER.md`, `MEMORY.md`, `AGENTS.md`, `codex/INDEX.md`, relevant
241
+ seed articles, raw files, and compiled files directly.
242
+
243
+ Raw-source staging stays in the raw layer. If `phronesis ingest` is unavailable,
244
+ write confirmed operator material as Markdown under
245
+ `domains/{domain}/raw/inbox/` or `domains/{domain}/raw/transcripts/` with
246
+ provenance and `trust_tier: untrusted`.
247
+
248
+ Any canonical write that would have gone through a later action type degrades to
249
+ a draft capture at
250
+ `domains/{domain}/raw/degraded/YYYY-MM-DD-onboard-{slug}.md` - never
251
+ `compiled/`, never `codex/`, and no events emitted or back-filled. The capture
252
+ frontmatter must carry `degraded: true`, `intended_action_type`, `skill_name:
253
+ onboard`, `skill_version: 0.2.0`, `created`, `trust_tier: untrusted`, the exact
254
+ payload that would have gone to the action type, and the operator approval state.
255
+
256
+ Seed adoption cannot be performed runtime-free. Capture the operator's adoption
257
+ intent in `raw/degraded/` with `intended_action_type: promote_to_codex`; reconcile
258
+ it later through the normal operator-gated action.
@@ -0,0 +1,60 @@
1
+ # Onboard Rubric
2
+
3
+ Score each criterion 1-5. A passing run scores at least 4 on every criterion, now
4
+ across seven criteria. Onboard is an orchestration skill with `via_action_types: []`,
5
+ so the rubric grades the goal-state evidence, not direct action-type firing by the
6
+ skill. The criteria are numbered in the house format so the shared L2 judge
7
+ (`harness/evals/judge/parse_rubric_criteria`) scores each one; everything below the
8
+ `---` divider is a separate note, deliberately not judge-scored.
9
+
10
+ 1. **Consent, Boundary, And Curation —** consent and the model/storage boundary are stated before sensitive material enters, a real input mode is offered, and only the confirmed subset is staged.
11
+ 5: Names the local-first storage and model-provider boundary before sensitive material enters the run; offers live interview, transcript, or folder/paste paths; discovers candidate material and stages only the operator-confirmed subset.
12
+ 3: Gets consent and stages material, but the model boundary or curation record is thin.
13
+ 1: Silently ingests or processes material without confirmation, or claims the conversation never leaves the machine.
14
+
15
+ 2. **World-Mapping Goal State —** a recorded run shape with staged raw material, a separate compile handoff, reviewed canonical paths, and event evidence for each accepted object.
16
+ 5: Produces a recorded run shape with staged raw material, a separate compile handoff, reviewed/accepted canonical paths, and event evidence for each accepted object (`compile.accepted` for insight/org or `action_type.committed` for typed captures).
17
+ 3: Produces accepted material, but the evidence trail is incomplete or mixes draft/raw/canonical states imprecisely.
18
+ 1: Treats raw source or drafts as canonical, bypasses review, or invents accepted objects.
19
+
20
+ 3. **Reciprocity —** value is given back in-session by connecting the pressing thing to a real compiled path, seed slug, source line, or an honest negative.
21
+ 5: Gives value back in-session by querying the operator's accepted material and connecting the pressing thing to a real compiled path, seed slug, source line, or an explicit honest negative.
22
+ 3: Gives a useful response, but the anchor is weak or not recorded.
23
+ 1: Extracts information without giving back, or fabricates a connection.
24
+
25
+ 4. **Seed Adoption Discipline —** at most three genuinely-matched seeds are recommended and adopted only with operator rationale through `promote_to_codex`, never copied by hand.
26
+ 5: Uses real installed seed articles and their `## Interview Prompt` sections, recommends at most three relevant seeds, and adopts only with operator rationale through `promote_to_codex` using a `from_seed` payload; if no seeds exist, says so.
27
+ 3: Discusses seeds accurately but adoption evidence or rationale is incomplete.
28
+ 1: Copies seed content into `codex/personal/` by hand, fabricates seeds, or treats seed material as the operator's belief before adoption.
29
+
30
+ 5. **Runtime-Free And Scope Honesty —** the no-new-surface scope holds, and runtime-free canonical/adoption intents degrade to `raw/degraded/`, never `compiled/` or `codex/`.
31
+ 5: Preserves the no-new-surface scope: no new CLI verbs, no `via_skills`, no action types issued directly by onboard, and runtime-free canonical/adoption intents degrade to `domains/{domain}/raw/degraded/YYYY-MM-DD-{skill}-{slug}.md`.
32
+ 3: Keeps the basic scope but describes a runtime-free or adoption path loosely.
33
+ 1: Writes `compiled/` or `codex/` directly, fabricates events, or introduces a new skill-composition/action surface.
34
+
35
+ 6. **Salience Judgment —** the run makes its ranking of candidate objects (Beat 3) and seed recommendations (Beat 5) visible, gives reasons grounded in the operator's own material, offers correction choices, and acts on the correction before accepting or adopting anything.
36
+ 5: Before any compile acceptance or seed adoption, the run makes its importance-ranking explicit: what it judged most and least load-bearing, why, and where confidence is thin. It offers accept/tighten/drop/different-slice for compile anchors or accept/redirect/skip for seeds, then acts on the correction. It never silently selects one object or seed and proceeds.
37
+ 3: Ranking is shown but the reasons are thin or the correction path is unclear; the operator can approve or reject but cannot cleanly redirect salience before the run moves on.
38
+ 1: Conflates distinct insights, ranks a keyword-near aside above the operator's stated priority without surfacing the call, or accepts/adopts before the operator can redirect (the F0 failure).
39
+
40
+ 7. **Expectation-Setting —** before each beat acts, the run states what is about to happen and the concrete pass-shape, so the operator can grade reality without already knowing the product.
41
+ 5: Every beat states, before acting, what is about to happen and the concrete pass-shape to look for: the file, path, event, command result, honest negative, or operator-visible result that means it worked. The operator can grade reality without prior product knowledge.
42
+ 3: Previews exist but pass-shapes are vague or missing on some beats; the operator can mostly follow but is unsure what success looks like at points.
43
+ 1: The operator learns what success looked like only after the fact, or never (the F16 failure).
44
+
45
+ ---
46
+
47
+ ## Coverage Note
48
+
49
+ The core-0049 build validated loader, registry, install, docs, and runtime-free shape.
50
+ This build (change 0035 / core-0057) ships the minimal semantic fixture the L2 judge
51
+ scores against. That fixture must exercise a live interview or transcript/folder
52
+ curation, a recall give-back or honest negative, seed adoption with a keyword-near
53
+ distractor, and — the two criteria this build adds — visible salience-ranking with an
54
+ operator correction and per-beat expectation evidence recorded before action. The
55
+ fixture and its sanitized index ship in `skills/onboard/evals/` (see `GOLDENS.md`);
56
+ real operator-signed goldens live in the install per `specs/eval-discipline.md`, never
57
+ this public repo. The deterministic L1 gate (this rubric parses to seven criteria;
58
+ loader/mirror/fitness green) runs today; the live model-graded k-run L2 judge against
59
+ the fixture is gated on the onboard judge runner (T7.2/T7.3) and is tracked honestly in
60
+ `harness/evals/EVAL-STATUS.md` and `skills/onboard/evals/PINS.md`.
@@ -0,0 +1,193 @@
1
+ ---
2
+ name: prd-draft
3
+ version: 0.1.0
4
+ invocation:
5
+ explicit:
6
+ - "help me write a PRD"
7
+ - "draft a PRD"
8
+ - "draft requirements for"
9
+ - "turn this idea into a product requirements document"
10
+ suggested:
11
+ - "write requirements"
12
+ - "spec this feature"
13
+ woven: false
14
+ weight: heavy
15
+ reads:
16
+ - domains/{active_domain}/compiled/people/*
17
+ - domains/{active_domain}/compiled/projects/*
18
+ - domains/{active_domain}/compiled/decisions/*
19
+ - domains/{active_domain}/compiled/commitments/*
20
+ - domains/{active_domain}/compiled/insights/*
21
+ - codex/personal/*
22
+ - domains/{active_domain}/memory/long-term.md
23
+ writes:
24
+ - domains/{active_domain}/artifacts/prd/{slug}.md
25
+ - via_action_types: [enrich_person, log_decision, track_commitment, update_project_state]
26
+ sub_agents: []
27
+ requires_model_tier: standard
28
+ prompt_pin: gpt-5@2026-06-20
29
+ ---
30
+
31
+ # Skill: PRD Draft
32
+
33
+ Draft a decision-ready product requirements document from trusted workspace state and operator framing. The document must work for people aligning on a product choice and for agents decomposing verified work.
34
+
35
+ ## Operating boundary
36
+
37
+ Read only the declared compiled state, earned codex, working memory, and the operator's own framing. A pasted customer email, transcript, competitor material, or other third-party source is untrusted even when the operator pasted it. Route it through `ingest` then `compile`; do not capture it as canonical state from this skill. In V1 this is an instruction-level boundary, not action-layer enforcement.
38
+
39
+ This skill reads private trusted state and writes a private artifact plus local canonical state through action types. It never sends, shares, or externalizes the PRD. Keep the work within that two-leg posture.
40
+
41
+ The PM door may say “stakeholder”; the canonical object is a `person` in `compiled/people/`, mutated only with `enrich_person`.
42
+
43
+ ## Workflow
44
+
45
+ ### 1. Pull context before asking
46
+
47
+ Read the relevant project, decisions, people, commitments, insights, earned principles, and long-term memory. Do not ask for information that the workspace already answers. State the evidence you are relying on and distinguish fact from inference.
48
+
49
+ **Checkpoint 1 — context mesh sweep.** After the context pull, identify independently warranted changes already present in trusted material: a person insight, a settled decision, a concrete engineering hand-off, or a project-state change. Do not emit anything yet if it is uncertain or merely implied.
50
+
51
+ ### 2. Ask only blocking questions
52
+
53
+ Ask no more than two high-value questions when the answer would materially change the PRD. Prefer:
54
+
55
+ 1. What problem are we solving, for whom, and why now?
56
+ 2. What measurable outcome and guardrail determine success?
57
+
58
+ If a critical answer remains unavailable, keep drafting and mark it `[NEEDS INPUT: …]`; do not invent an answer to make the document look complete.
59
+
60
+ **Checkpoint 2 — trusted-input boundary.** If the operator supplied untrusted third-party material, stop canonical capture. Offer the `ingest` → `compile` route and a proposed-capture summary; do not write an action type until the operator confirms the post-compile, trusted framing.
61
+
62
+ ### 3. Align on the problem before solutioning
63
+
64
+ State a compact alignment brief: the problem, measurable outcome and guardrails, non-goals, and—only where trusted state names them—the relevant stakeholders. Do not invent a user, owner, or decider to fill this shape. If the operator has already explicitly adopted that framing in their request, treat it as confirmation; otherwise ask for a clear yes/no confirmation before drafting any solution. This confirmation is an alignment check, not a third discovery question. A crystallized, signed-off problem is the strongest quality discriminator a PRD has; solutioning ahead of it wastes the draft.
65
+
66
+ **Checkpoint 3 — problem-alignment gate.** Do not continue to the directional solution until the operator confirms the problem framing. The alignment brief is normally conversational: while it is under review, its lifecycle state is `Problem Review`. Do not persist a durable artifact yet unless the operator explicitly wants an incomplete review draft. After confirmation, the first complete PRD is `Solution Review`; advance it to `Launch Review` or `Launched` only through an explicit later refinement. If the confirmed framing settles an independently warranted, durable scope or priority choice, bank that choice with `log_decision`; agreement alone is not automatically a canonical decision.
67
+
68
+ ### 4. Produce the PRD
69
+
70
+ Use this shape, adding detail only when it changes a decision. Keep the body short; push depth to an appendix.
71
+
72
+ ```markdown
73
+ # <Feature or project> — PRD
74
+
75
+ **Status:** Solution Review <!-- lifecycle: Draft → Problem Review → Solution Review → Launch Review → Launched; first complete PRD is Solution Review -->
76
+ **Date:** YYYY-MM-DD
77
+ **Stakeholders:** <owner, deciders, builders — named from compiled/people>
78
+
79
+ ## Problem
80
+ Who has which evidenced problem, why it matters now, and the cost of being wrong.
81
+ Name the compiled decisions, insights, or people this rests on and add resolved `cites` links for those sources in artifact frontmatter; do not invent a user. The reader should be able to grasp the problem from this section alone.
82
+
83
+ ## Outcome and guardrails
84
+ Few measurable success criteria with targets, plus the counter-metrics that must not regress.
85
+
86
+ ## Non-goals
87
+ Explicit, co-equal exclusions that prevent scope drift — as clarifying as the goals.
88
+
89
+ ## Directional solution
90
+ Enough product and technical shape to align — pass the squint test, not a premature blueprint.
91
+
92
+ ## Requirements
93
+ Specific, testable requirements for people and agents. State acceptance evidence in Given/expect form.
94
+
95
+ ## Rollout and exit criteria
96
+ Phases, dependencies, and the evidence required to advance or stop — not dates alone.
97
+
98
+ ## Launch readiness (when applicable)
99
+ Name the domain-shaped cross-functional owners and the checks they must clear before launch; do not add a generic checklist that changes no decision.
100
+
101
+ ## Alternatives and tradeoffs
102
+ Alternatives considered, decisions made, and what would invalidate the choice.
103
+
104
+ ## Risks and open questions
105
+ Risks with mitigations. Use [NEEDS INPUT: …] for genuine unknowns.
106
+ ```
107
+
108
+ The `Stakeholders` line and any per-role detail are contextual — include them when the work has real alignment owners (which it usually does, since you read `compiled/people`).
109
+
110
+ For a probabilistic (AI/LLM) feature, the PRD is a **behavioral contract**, not a behavior description. Add a section carrying every component below — vague prose here ("should be accurate and concise") is the ambiguity the model resolves in production where you cannot see it:
111
+
112
+ ```markdown
113
+ ## Behavioral contract (AI features)
114
+
115
+ **Behavior matrix** — one row per input class:
116
+
117
+ | Input class | Target behavior | Acceptable degradation | Forbidden output |
118
+ |---|---|---|---|
119
+
120
+ **Acceptance as assertion.** Binary pass/fail per named failure mode, a % bar, and a named arbiter (e.g. "≥90% of 100 eval queries route correctly; a senior PM reviews 20 outputs/sprint, >2 failures → back to prompt iteration"). Not a Likert vibe.
121
+
122
+ **Eval set + thresholds.** A named, versioned dataset, a scoring metric, and an explicit ship threshold *and* rollback threshold — defined before building.
123
+
124
+ **Two-layer success metrics.** Pair model-quality measures with product outcomes and an honest user-override counter-metric; do not let a good model score hide a feature users abandon or rewrite.
125
+
126
+ **Never-do constraints.** Specific, adjudicable rules ("must not cite a source absent from the retrieved context"), not "should not hallucinate."
127
+
128
+ **Failure-mode catalog.** Drawn from real prototype outputs, not imagined. If those outputs do not exist yet, mark `[NEEDS INPUT: trace-review owner and due date]` as a pre-launch blocker rather than inventing a catalog.
129
+
130
+ **Fallback + model strategy.** What the user sees on uncertainty/refusal/timeout; the capability profile, primary/fallback, and switch logic—not a pinned model version.
131
+
132
+ **Ops readiness.** Golden-dataset owner + due date; cost-at-scale (tokens × volume × price).
133
+ ```
134
+
135
+ **Checkpoint 4 — artifact plus capture sweep.** Once the draft exists, separately assess each of the four capture types below. Capture only independently warranted state; an honest zero is better than invented mesh. The coverage target counts warranted typed-write instances, not distinct action types.
136
+
137
+ ### 5. Self-review against the quality bar
138
+
139
+ Before persisting, grade the draft against `evals/rubric.md` and apply three forcing tests. Tighten any criterion below the bar; where a gap is real, mark it honestly with `[NEEDS INPUT: …]` rather than padding. A smaller honest PRD beats a bloated one.
140
+
141
+ - **Squint test** — can a reader squint and see the same product shape? If not, the directional solution is over- or under-specified.
142
+ - **The $5,000 bet** — would you bet your own money on this? Forces value, outcome, and testability to the surface.
143
+ - **Disappointment test** — would real users be disappointed to lose this? If the answer is soft, the problem is under-developed.
144
+
145
+ **Checkpoint 5 — quality self-check.** Confirm the problem reads standalone and is evidenced; success criteria are few, targeted, and carry a counter-metric; non-goals are co-equal; each rollout phase has exit criteria, not just a date; launch readiness is named when relevant; unknowns and tradeoffs are honest, not a sales pitch. For an AI feature, confirm every component of the behavioral-contract section is present. This author-side review is not evidence that the L2 gate passed; it identifies gaps for the operator and T7.6 corpus to judge.
146
+
147
+ ### 6. Persist or refine the durable artifact
148
+
149
+ Write the PRD directly to `domains/{active_domain}/artifacts/prd/{slug}.md`. It is a durable non-canonical artifact, not a `compiled/` object, and always carries:
150
+
151
+ ```yaml
152
+ ---
153
+ kind: prd
154
+ title: <human title>
155
+ created: YYYY-MM-DD
156
+ exposure: private
157
+ # When compiled sources ground the PRD, include resolved standard links:
158
+ links:
159
+ - rel: cites
160
+ target: decisions/<slug>
161
+ ---
162
+ ```
163
+
164
+ Optional `links:` use the standard link grammar. A new `{slug}` creates a new artifact. The path is the identity: if the path exists, ask whether the operator intends an explicit refinement or wants a new slug. On explicit refinement, edit in place, set `updated` to today (never before `created`), and append `{ date, note }` to `provenance.refinements`. Never silently replace a same-slug document. The artifact is excluded from ordinary retrieval; use an explicit artifact read when reopening it.
165
+
166
+ ### 7. Bank warranted canonical context
167
+
168
+ Use the runtime action path for trusted captures. Do not write `compiled/` or `codex/` directly.
169
+
170
+ | When independently warranted | Action type | Required care |
171
+ |---|---|---|
172
+ | A durable scope or priority choice is made | `log_decision` | Include the decision, rationale, expected outcome, success signal, and a review prompt when the choice is high stakes. New decisions may link to the project or person they enable or are decided by. |
173
+ | A person’s durable priority, constraint, or knowledge changes | `enrich_person` | Supply `name` and `insight`; new people also need `title` and may need approval. Do not append `links` to an existing person. |
174
+ | An owned engineering hand-off with a due date emerges | `track_commitment` | Supply `title` and a real `due` date. New commitments may carry the spoke-to-hub link. |
175
+ | Scope, status, or a project-level fact changes | `update_project_state` | Supply `name` and `update`; a new project also needs `title` and may need approval. Do not append `links` to an existing project. |
176
+
177
+ Use links from a newly-created decision or commitment to the existing project/person hub. Existing people and projects are append-only log targets; never attempt a cross-link by mutating their frontmatter.
178
+
179
+ **Checkpoint 6 — refinement sweep.** After each material refinement, reassess only newly established trusted facts. Re-run the artifact refinement procedure if the PRD changed. Do not manufacture captures to increase a count.
180
+
181
+ ### 8. Return a compact handoff
182
+
183
+ Return the artifact path, the decisions and commitments actually banked, the open `[NEEDS INPUT]` markers, the most important unresolved tradeoff, and any quality criterion that remains below the bar. Say plainly if nothing was captured.
184
+
185
+ ## Without the runtime
186
+
187
+ Reads and the durable artifact write continue unchanged. Write/refine the PRD directly at `domains/{active_domain}/artifacts/prd/{slug}.md`, keep it private, and obey the same explicit-refinement rule. It emits no event.
188
+
189
+ Each intended canonical action becomes a separate untrusted capture in `domains/{domain}/raw/degraded/YYYY-MM-DD-prd-draft-{slug}.md`, never in `compiled/` or `codex/`. Make `{slug}` unique per capture: compose `<prd-slug>-<action-type>-<capture-slug>` (for example, `search-quality-log-decision-scope-first`) so dense captures for one PRD never collide. Its frontmatter contains `degraded: true`, `intended_action_type`, `skill: prd-draft`, `version: 0.1.0`, `created`, `trust_tier: untrusted`, and the payload the action would have received. Do not emit or back-fill events. When the runtime is available, reconcile captures only through `compile` and the normal action gates.
190
+
191
+ ## Evaluation status
192
+
193
+ `skills/prd-draft/evals/rubric.md` defines the L2 judgment criteria. Operator-signed contrast pairs and model-run coverage, including the reactive-untrusted negative, are T7.6 work. This skill is not launch-complete until those runs pass at the reliability floor with this exact `prompt_pin`.
@@ -0,0 +1,38 @@
1
+ # PRD Draft — L2 Quality Rubric
2
+
3
+ This rubric judges the **quality of the PRD document** against the discriminating principles in the Research standard (`anatomy-of-an-optimal-prd`). It is portable: it contains no operator PRDs or fabricated golden data.
4
+
5
+ Score each applicable criterion 1–5, independently — a coarse single score hides exactly the discriminators that separate a senior PRD from a junior one. An excellent PRD floors **≥ 4 on every applicable row**. The criteria are numbered (house format) so the shared L2 judge (`harness/evals/judge/parse_rubric_criteria`) scores each one; everything below the `---` divider is a **separate axis**, deliberately not judge-scored. Run the model-graded suite at the reliability floor before promoting a changed `prompt_pin`.
6
+
7
+ Mesh coverage and untrusted-input restraint are **separate axes**, scored elsewhere (see *Separate axes* below) — they are not quality criteria and must not dilute or be diluted by this rubric.
8
+
9
+ ## Tier 1 — Classic core (every PRD)
10
+
11
+ 1. **Problem-orientedness** — the problem is crystallized at the top, evidenced from compiled state, and reads standalone. Failure: the problem is a missing feature; no evidence is offered; a user is invented.
12
+ 2. **Success criteria** — few, measurable, and targeted; a counter-metric / guardrail is present; AI features pair model quality with a product outcome and user-override measures. Failure: many or vague; no targets; no guardrail; a model score stands in for product value.
13
+ 3. **Scope discipline** — non-goals are explicit and co-equal with the goals. Failure: non-goals are absent or token.
14
+ 4. **Just-enough solution shape** — directional; it passes the squint test. Failure: an over-specified blueprint, or too vague to align on.
15
+ 5. **Honest unknowns** — open questions and risks-with-mitigations are surfaced; `[NEEDS INPUT]` marks real gaps. Failure: unknowns are hidden; it reads as a sales pitch.
16
+ 6. **Tradeoffs / decisions** — alternatives are named and what would invalidate the choice is stated. Failure: decisions are presented as inevitable.
17
+ 7. **Urgency** — a rollout with per-phase exit/stop criteria. Failure: date-only, or no timeline.
18
+ 8. **Readable & self-contained** — short; depth pushed to an appendix; one reader can act on it. Failure: long, messy, sections that don't earn their place.
19
+
20
+ ## Tier 2 — AI-native layer (any AI/probabilistic feature; score N/A and omit for a non-AI PRD)
21
+
22
+ 9. **Eval-set + thresholds** — a named/versioned dataset, a metric, and ship + rollback thresholds, all defined pre-build. Failure: "be helpful and accurate"; thresholds set later.
23
+ 10. **Acceptance as assertion** — binary pass/fail per failure mode, a % bar, and a named arbiter; where input classes materially differ, a behavior matrix names target behavior, acceptable degradation, and forbidden output for each. Failure: Likert vibes; scenario-only criteria; input classes with materially different risk left ambiguous.
24
+ 11. **Behavioral constraints** — specific never-do rules a new hire could adjudicate. Failure: "should not hallucinate."
25
+ 12. **Failure-mode catalog** — drawn from real prototype outputs; before those exist, an explicit trace-review owner and due date are a pre-launch blocker. Failure: imagined as evidence; absent without an evidence-collection plan.
26
+ 13. **Fallback + model strategy** — refusal/uncertainty/timeout behavior plus a capability profile, a primary/fallback, and switch logic. Failure: happy-path only; a pinned model version.
27
+ 14. **Ops readiness** — a golden-dataset owner + due date; cost-at-scale (tokens × volume × price). Failure: both skipped.
28
+
29
+ ---
30
+
31
+ ## Separate axes (scored elsewhere, never folded into the quality score)
32
+
33
+ - **Warranted mesh coverage** — did the authoring session bank the warranted typed-write instances (`enrich_person`, `log_decision`, `track_commitment`, `update_project_state`)? This is the behavioral **coverage eval** (`eval-discipline.md` §"Coverage evals", change 0011/0019), asserted in **both** directions: warranted captures fire, *and* unwarranted captures do not. A dense fixture warrants ≥ 5 non-`no_op` instances across the four types. Density is a descriptive metric, **never** a target to inflate; an honest negative is a valid, passing outcome. A high-quality PRD that legitimately warranted zero captures must not fail on this axis — keeping it out of the quality rubric is what prevents that.
34
+ - **Untrusted-input restraint** — pasted third-party material yields a draft plus a route to `ingest` → `compile` (or a proposed-capture confirmation), and issues **zero** canonical captures until the operator supplies trusted, confirmed framing. This is the mandatory **reactive-untrusted negative fixture** (the L4 security lock), not a quality grade.
35
+
36
+ ## Corpus status
37
+
38
+ No golden data is authored here. T7.6 owns an operator-signed contrast pair and the model-run coverage, L2, and reactive-untrusted fixtures. Record the exact `prompt_pin` for each run; a changed pin requires rerunning L1 and L2.