projectstore-codex 0.0.1 → 0.28.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.
Files changed (184) hide show
  1. package/.codex-plugin/plugin.json +48 -0
  2. package/README.md +15 -7
  3. package/bin/projectstore-codex.mjs +88 -0
  4. package/hooks/hooks.json +59 -0
  5. package/node_modules/projectstore/.claude-plugin/marketplace.json +40 -0
  6. package/node_modules/projectstore/.claude-plugin/plugin.json +23 -0
  7. package/node_modules/projectstore/.mcp.json +14 -0
  8. package/node_modules/projectstore/AGENTS.md +26 -0
  9. package/node_modules/projectstore/LICENSE +21 -0
  10. package/node_modules/projectstore/README.md +284 -0
  11. package/node_modules/projectstore/agents/archaeologist.md +76 -0
  12. package/node_modules/projectstore/agents/clerk.md +93 -0
  13. package/node_modules/projectstore/agents/critic.md +94 -0
  14. package/node_modules/projectstore/agents/librarian.md +81 -0
  15. package/node_modules/projectstore/agents/planner.md +80 -0
  16. package/node_modules/projectstore/agents/reviewer.md +98 -0
  17. package/node_modules/projectstore/bin/projectstore.mjs +7 -0
  18. package/node_modules/projectstore/commands/adr.md +57 -0
  19. package/node_modules/projectstore/commands/agents.md +180 -0
  20. package/node_modules/projectstore/commands/bind.md +128 -0
  21. package/node_modules/projectstore/commands/codemap.md +50 -0
  22. package/node_modules/projectstore/commands/concept.md +17 -0
  23. package/node_modules/projectstore/commands/doctor.md +166 -0
  24. package/node_modules/projectstore/commands/epic.md +40 -0
  25. package/node_modules/projectstore/commands/graph.md +56 -0
  26. package/node_modules/projectstore/commands/kanban.md +40 -0
  27. package/node_modules/projectstore/commands/meeting.md +17 -0
  28. package/node_modules/projectstore/commands/reconcile.md +73 -0
  29. package/node_modules/projectstore/commands/research.md +17 -0
  30. package/node_modules/projectstore/commands/review.md +89 -0
  31. package/node_modules/projectstore/commands/runbook.md +17 -0
  32. package/node_modules/projectstore/commands/scaffold.md +23 -0
  33. package/node_modules/projectstore/commands/search.md +22 -0
  34. package/node_modules/projectstore/commands/spec.md +91 -0
  35. package/node_modules/projectstore/commands/status.md +27 -0
  36. package/node_modules/projectstore/commands/statusline.md +46 -0
  37. package/node_modules/projectstore/commands/story.md +113 -0
  38. package/node_modules/projectstore/docs/extending.md +172 -0
  39. package/node_modules/projectstore/docs/getting-started.md +133 -0
  40. package/node_modules/projectstore/docs/harnesses.md +176 -0
  41. package/node_modules/projectstore/docs/how-it-works.md +263 -0
  42. package/node_modules/projectstore/docs/images/loop-light.svg +94 -0
  43. package/node_modules/projectstore/docs/images/loop.svg +93 -0
  44. package/node_modules/projectstore/docs/images/statusline-hud.png +0 -0
  45. package/node_modules/projectstore/docs/images/team-light.svg +79 -0
  46. package/node_modules/projectstore/docs/images/team.svg +79 -0
  47. package/node_modules/projectstore/harnesses/claude-code.json +483 -0
  48. package/node_modules/projectstore/harnesses/codex.json +332 -0
  49. package/node_modules/projectstore/hooks/hooks.json +59 -0
  50. package/node_modules/projectstore/hooks/pre-compact.mjs +121 -0
  51. package/node_modules/projectstore/hooks/session-rules.mjs +63 -0
  52. package/node_modules/projectstore/hooks/session-start.mjs +301 -0
  53. package/node_modules/projectstore/hooks/session-stop.mjs +84 -0
  54. package/node_modules/projectstore/package.json +70 -0
  55. package/node_modules/projectstore/scaffold/checklists.json +88 -0
  56. package/node_modules/projectstore/scaffold/headings.json +171 -0
  57. package/node_modules/projectstore/scaffold/layouts/engineering.json +85 -0
  58. package/node_modules/projectstore/scripts/binding.mjs +165 -0
  59. package/node_modules/projectstore/scripts/build-adapters.mjs +264 -0
  60. package/node_modules/projectstore/scripts/cli.mjs +595 -0
  61. package/node_modules/projectstore/scripts/codemap.mjs +99 -0
  62. package/node_modules/projectstore/scripts/diff-refs.mjs +127 -0
  63. package/node_modules/projectstore/scripts/doctor.mjs +2127 -0
  64. package/node_modules/projectstore/scripts/draft.mjs +261 -0
  65. package/node_modules/projectstore/scripts/graph.mjs +219 -0
  66. package/node_modules/projectstore/scripts/harness.mjs +608 -0
  67. package/node_modules/projectstore/scripts/install-harness.mjs +1387 -0
  68. package/node_modules/projectstore/scripts/kanban.mjs +174 -0
  69. package/node_modules/projectstore/scripts/lib.mjs +3085 -0
  70. package/node_modules/projectstore/scripts/mcp.mjs +391 -0
  71. package/node_modules/projectstore/scripts/portable-registration.mjs +198 -0
  72. package/node_modules/projectstore/scripts/provenance.mjs +375 -0
  73. package/node_modules/projectstore/scripts/query.mjs +490 -0
  74. package/node_modules/projectstore/scripts/reconcile.mjs +422 -0
  75. package/node_modules/projectstore/scripts/statusline-launcher.mjs +141 -0
  76. package/node_modules/projectstore/scripts/statusline.mjs +253 -0
  77. package/node_modules/projectstore/scripts/story-section.mjs +209 -0
  78. package/node_modules/projectstore/scripts/surfaces.mjs +421 -0
  79. package/node_modules/projectstore/scripts/tokens.mjs +449 -0
  80. package/node_modules/projectstore/scripts/touch-session.mjs +336 -0
  81. package/node_modules/projectstore/scripts/version-guard.mjs +261 -0
  82. package/node_modules/projectstore/scripts/worktree.mjs +109 -0
  83. package/node_modules/projectstore/skills/projectstore-decision-detector/SKILL.md +40 -0
  84. package/node_modules/projectstore/skills/projectstore-peer-reviewer/SKILL.md +38 -0
  85. package/node_modules/projectstore/skills/projectstore-story-completion/SKILL.md +50 -0
  86. package/node_modules/projectstore/skills/projectstore-vault-communication/SKILL.md +96 -0
  87. package/node_modules/projectstore/templates/claude-md-block.md.tmpl +26 -0
  88. package/node_modules/projectstore/templates/de/adr.md.tmpl +67 -0
  89. package/node_modules/projectstore/templates/de/concept.md.tmpl +43 -0
  90. package/node_modules/projectstore/templates/de/epic.md.tmpl +59 -0
  91. package/node_modules/projectstore/templates/de/folder-readme.md.tmpl +14 -0
  92. package/node_modules/projectstore/templates/de/kanban.md.tmpl +36 -0
  93. package/node_modules/projectstore/templates/de/meeting.md.tmpl +38 -0
  94. package/node_modules/projectstore/templates/de/research.md.tmpl +47 -0
  95. package/node_modules/projectstore/templates/de/runbook.md.tmpl +53 -0
  96. package/node_modules/projectstore/templates/de/spec.md.tmpl +64 -0
  97. package/node_modules/projectstore/templates/de/story.md.tmpl +76 -0
  98. package/node_modules/projectstore/templates/de/strings.json +6 -0
  99. package/node_modules/projectstore/templates/en/adr.md.tmpl +67 -0
  100. package/node_modules/projectstore/templates/en/concept.md.tmpl +43 -0
  101. package/node_modules/projectstore/templates/en/epic.md.tmpl +59 -0
  102. package/node_modules/projectstore/templates/en/folder-readme.md.tmpl +14 -0
  103. package/node_modules/projectstore/templates/en/kanban.md.tmpl +36 -0
  104. package/node_modules/projectstore/templates/en/meeting.md.tmpl +38 -0
  105. package/node_modules/projectstore/templates/en/research.md.tmpl +47 -0
  106. package/node_modules/projectstore/templates/en/runbook.md.tmpl +53 -0
  107. package/node_modules/projectstore/templates/en/spec.md.tmpl +64 -0
  108. package/node_modules/projectstore/templates/en/story.md.tmpl +76 -0
  109. package/node_modules/projectstore/templates/en/strings.json +6 -0
  110. package/node_modules/projectstore/templates/es/adr.md.tmpl +67 -0
  111. package/node_modules/projectstore/templates/es/concept.md.tmpl +43 -0
  112. package/node_modules/projectstore/templates/es/epic.md.tmpl +59 -0
  113. package/node_modules/projectstore/templates/es/folder-readme.md.tmpl +14 -0
  114. package/node_modules/projectstore/templates/es/kanban.md.tmpl +36 -0
  115. package/node_modules/projectstore/templates/es/meeting.md.tmpl +38 -0
  116. package/node_modules/projectstore/templates/es/research.md.tmpl +47 -0
  117. package/node_modules/projectstore/templates/es/runbook.md.tmpl +53 -0
  118. package/node_modules/projectstore/templates/es/spec.md.tmpl +64 -0
  119. package/node_modules/projectstore/templates/es/story.md.tmpl +76 -0
  120. package/node_modules/projectstore/templates/es/strings.json +6 -0
  121. package/node_modules/projectstore/templates/fr/adr.md.tmpl +67 -0
  122. package/node_modules/projectstore/templates/fr/concept.md.tmpl +43 -0
  123. package/node_modules/projectstore/templates/fr/epic.md.tmpl +59 -0
  124. package/node_modules/projectstore/templates/fr/folder-readme.md.tmpl +14 -0
  125. package/node_modules/projectstore/templates/fr/kanban.md.tmpl +36 -0
  126. package/node_modules/projectstore/templates/fr/meeting.md.tmpl +38 -0
  127. package/node_modules/projectstore/templates/fr/research.md.tmpl +47 -0
  128. package/node_modules/projectstore/templates/fr/runbook.md.tmpl +53 -0
  129. package/node_modules/projectstore/templates/fr/spec.md.tmpl +64 -0
  130. package/node_modules/projectstore/templates/fr/story.md.tmpl +76 -0
  131. package/node_modules/projectstore/templates/fr/strings.json +6 -0
  132. package/node_modules/projectstore/templates/ru/adr.md.tmpl +67 -0
  133. package/node_modules/projectstore/templates/ru/concept.md.tmpl +43 -0
  134. package/node_modules/projectstore/templates/ru/epic.md.tmpl +59 -0
  135. package/node_modules/projectstore/templates/ru/folder-readme.md.tmpl +14 -0
  136. package/node_modules/projectstore/templates/ru/kanban.md.tmpl +36 -0
  137. package/node_modules/projectstore/templates/ru/meeting.md.tmpl +38 -0
  138. package/node_modules/projectstore/templates/ru/research.md.tmpl +47 -0
  139. package/node_modules/projectstore/templates/ru/runbook.md.tmpl +53 -0
  140. package/node_modules/projectstore/templates/ru/spec.md.tmpl +64 -0
  141. package/node_modules/projectstore/templates/ru/story.md.tmpl +76 -0
  142. package/node_modules/projectstore/templates/ru/strings.json +6 -0
  143. package/node_modules/projectstore/templates/zh/adr.md.tmpl +67 -0
  144. package/node_modules/projectstore/templates/zh/concept.md.tmpl +43 -0
  145. package/node_modules/projectstore/templates/zh/epic.md.tmpl +59 -0
  146. package/node_modules/projectstore/templates/zh/folder-readme.md.tmpl +14 -0
  147. package/node_modules/projectstore/templates/zh/kanban.md.tmpl +36 -0
  148. package/node_modules/projectstore/templates/zh/meeting.md.tmpl +38 -0
  149. package/node_modules/projectstore/templates/zh/research.md.tmpl +47 -0
  150. package/node_modules/projectstore/templates/zh/runbook.md.tmpl +53 -0
  151. package/node_modules/projectstore/templates/zh/spec.md.tmpl +64 -0
  152. package/node_modules/projectstore/templates/zh/story.md.tmpl +76 -0
  153. package/node_modules/projectstore/templates/zh/strings.json +6 -0
  154. package/package.json +35 -14
  155. package/skills/projectstore-adr/SKILL.md +76 -0
  156. package/skills/projectstore-agents/SKILL.md +50 -0
  157. package/skills/projectstore-archaeologist/SKILL.md +109 -0
  158. package/skills/projectstore-bind/SKILL.md +44 -0
  159. package/skills/projectstore-clerk/SKILL.md +126 -0
  160. package/skills/projectstore-codemap/SKILL.md +69 -0
  161. package/skills/projectstore-concept/SKILL.md +36 -0
  162. package/skills/projectstore-critic/SKILL.md +127 -0
  163. package/skills/projectstore-decision-detector/SKILL.md +59 -0
  164. package/skills/projectstore-doctor/SKILL.md +33 -0
  165. package/skills/projectstore-epic/SKILL.md +59 -0
  166. package/skills/projectstore-graph/SKILL.md +75 -0
  167. package/skills/projectstore-kanban/SKILL.md +60 -0
  168. package/skills/projectstore-librarian/SKILL.md +114 -0
  169. package/skills/projectstore-meeting/SKILL.md +36 -0
  170. package/skills/projectstore-peer-reviewer/SKILL.md +57 -0
  171. package/skills/projectstore-planner/SKILL.md +113 -0
  172. package/skills/projectstore-reconcile/SKILL.md +92 -0
  173. package/skills/projectstore-research/SKILL.md +36 -0
  174. package/skills/projectstore-review/SKILL.md +108 -0
  175. package/skills/projectstore-reviewer/SKILL.md +131 -0
  176. package/skills/projectstore-runbook/SKILL.md +36 -0
  177. package/skills/projectstore-scaffold/SKILL.md +42 -0
  178. package/skills/projectstore-search/SKILL.md +41 -0
  179. package/skills/projectstore-spec/SKILL.md +110 -0
  180. package/skills/projectstore-status/SKILL.md +47 -0
  181. package/skills/projectstore-statusline/SKILL.md +29 -0
  182. package/skills/projectstore-story/SKILL.md +132 -0
  183. package/skills/projectstore-story-completion/SKILL.md +69 -0
  184. package/skills/projectstore-vault-communication/SKILL.md +115 -0
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: projectstore-critic
3
+ description: "adversarial critic for projectstore artifacts (ADR / research / epic / story) and design proposals. Pre-commits to likely problems, verifies claims against source, rates assumptions, runs gap-analysis + pre-mortem, applies multi-perspective + self-audit + realist-check. An independent, fresh-context pass to avoid self-approval bias. Read-only, no sycophancy. Invoke after authoring/revising an artifact, before treating it final."
4
+ ---
5
+
6
+ ## Runtime path
7
+
8
+ Resolve paths from this skill's own directory, never from the checkout or a
9
+ remembered cache path. The plugin root is two directories above this SKILL.md;
10
+ the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
11
+ any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
12
+ path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
13
+ Do not prefix the command with the assignment: a shell expands the quoted path
14
+ before that inline assignment takes effect. If the bundled core is missing, stop
15
+ and report a broken plugin install; do not fetch a different version from npm.
16
+
17
+ ## User arguments
18
+
19
+ The source command's host-substituted argument token is rendered here as
20
+ `<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
21
+ shown command, replace that token with the actual arguments from the user's
22
+ request and shell-quote values safely. Never pass the angle-bracket token
23
+ literally and never treat it as a shell variable.
24
+
25
+ ## Codex orchestration
26
+
27
+ This is a role-orchestration skill, not a native agent registration. Resolve the
28
+ role model by running:
29
+
30
+ ```bash
31
+ node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" agents model critic --json --project "$PWD"
32
+ ```
33
+
34
+ Spawn a collaboration agent for the bounded task. If the result names a model,
35
+ pass that model and use an empty or bounded context fork; otherwise inherit the
36
+ current model. Do not pass a reasoning-effort override: per-role effort belongs
37
+ to a separate accepted story. Give the spawned agent the role contract below
38
+ and the exact artifact/diff it must inspect. Wait for its final result.
39
+
40
+ ## Role contract
41
+
42
+ You are an adversarial technical critic running independently, with a fresh
43
+ context separate from the author — the final quality gate, not a helpful assistant. The author is
44
+ presenting a projectstore artifact (ADR / research / epic / story) or design
45
+ proposal for approval. A false approval costs 10-100× more than a false
46
+ rejection. Find what's wrong, weak, or missing BEFORE it ships — don't praise it.
47
+ Treat the text as a draft to stress-test.
48
+
49
+ Read the file and follow its load-bearing links (a referenced research note, ADR,
50
+ or the actual code/data behind a claim). **Verify every technical claim against
51
+ the real source** — don't trust an assertion because it's written confidently.
52
+
53
+ **Evidence through the MCP tools when they are available.** When the projectstore MCP read tools are exposed to you (`status`, `orientation`, `search`, `get_artifact`, `neighbors`, `lineage`, `code_refs`, `doctor`), gather evidence through them: they answer from the live vault, so no freshness question arises, and an artifact's neighbourhood costs one call instead of a grep plus a read; every result is the CLI's `--json` envelope. When they are not — a host without MCP, or an install older than 0.28 — the derived views below are the fallback, under the rule that follows. `neighbors` and `lineage` are how you follow an artifact's load-bearing links; `get_artifact` with `section` reads one section without the whole file.
54
+
55
+ Derived views (kanban.md, code-map.md, graph.md) are precomputed vault indexes —
56
+ prefer them for orientation, but fall back to a frontmatter sweep when a view is
57
+ missing or its `generated_at` predates recent artifact changes (compare file mtimes; a false-stale just costs a sweep).
58
+
59
+ **Batch independent evidence calls into one turn.** Every turn re-reads your whole
60
+ accumulated context, so N single-call turns cost ~N× more input than one turn with
61
+ N parallel calls — with identical evidence collected. When your next checks don't
62
+ depend on each other's results (read the artifact + its linked ADR + grep the
63
+ implementation), issue them together; go sequential only when a result genuinely
64
+ decides what to look at next. Quote paths with spaces (vaults often live under
65
+ iCloud paths).
66
+
67
+ ## Phase 0 — Pre-commitment (before reading in detail)
68
+ From the artifact's type + domain, predict the 3-5 most likely problem areas ("a
69
+ caching fix here probably ignores eviction"; "these acceptance criteria are
70
+ probably not measurable"). Write them, then investigate each.
71
+
72
+ ## Phase 1 — Verify & stress-test
73
+ - **Technical correctness** — does the mechanism actually WORK? Systems gotchas:
74
+ caching (prefix/KV-cache invalidation, eviction, hit-rate), concurrency /
75
+ ordering / idempotency, retries, timeouts, partial failure, data-loss, protocol
76
+ invariants (e.g. request/response or tool-call/tool-result pairing). A plausible
77
+ fix that breaks a cache or an invariant is a blocker.
78
+ - **Assumptions** — extract every assumption (explicit AND implicit) and rate it:
79
+ VERIFIED (evidence in code/docs) / REASONABLE (plausible, untested) / FRAGILE
80
+ (could easily be wrong). Fragile assumptions stated as fact are top targets.
81
+ - **Missing alternatives** — a simpler / cheaper / more robust approach the author
82
+ didn't consider or dismiss with a reason?
83
+ - **Scope / altitude** — band-aid vs root cause; whack-a-mole risk; redone in
84
+ three months?
85
+ - **Internal consistency & testability** — does the decomposition deliver the
86
+ stated goal? Are the acceptance criteria objectively verifiable, and do they
87
+ cover the failure modes the problem statement raised?
88
+
89
+ ## Phase 2 — Gap analysis ("What's Missing") — highest-leverage step
90
+ Standard reviews evaluate what IS present; explicitly hunt what ISN'T: "What would
91
+ break this? What edge case isn't handled? What assumption could be wrong? What was
92
+ conveniently left out? What modality / source / claim is unverified?" The gaps are
93
+ often worse than the stated flaws.
94
+
95
+ ## Phase 3 — Pre-mortem (design proposals / plans)
96
+ "Assume this shipped exactly as written and failed — generate 5-7 concrete failure
97
+ scenarios." Then check: does the artifact address each? Unaddressed = findings.
98
+
99
+ ## Multi-perspective
100
+ Use lenses the author wouldn't naturally adopt: **operator** (what breaks at scale
101
+ / under load / when a dependency fails — blast radius?), **future maintainer**
102
+ (could someone unfamiliar follow this; what context is assumed but unstated?),
103
+ **skeptic** (strongest argument this is WRONG; what alternative was rejected — was
104
+ the rejection sound or hand-waved?).
105
+
106
+ ## Self-audit + realist check (before finalizing)
107
+ Re-read each blocker/should-fix: confidence HIGH/MED/LOW; could the author refute
108
+ it with context you lack; genuine flaw or stylistic preference. Move
109
+ low-confidence / refutable to **Open Questions**. Then pressure-test severity:
110
+ realistic worst case (not theoretical max), mitigating factors (existing tests,
111
+ gates, monitoring), detection speed. Downgrade only with an explicit "Mitigated
112
+ by: …" — but NEVER downgrade data-loss, security, or a wrong core claim. Don't
113
+ manufacture findings; if an aspect is genuinely solid, one sentence and move on.
114
+
115
+ ## Output — your LAST message IS the deliverable returned to the caller
116
+ 1. **Verdict** — `ship` / `revise` / `rethink` + the single most important reason.
117
+ 2. **Findings** — severity-rated, highest first: `🔴 blocker` / `🟡 should-fix` /
118
+ `🟢 nice`. Each: problem in one sentence (cite the exact claim / line /
119
+ acceptance-criterion), confidence, *why it matters* (concrete consequence),
120
+ *fix* (specific). Prefer 5-8 high-signal findings.
121
+ 3. **What's Missing** — the gap-analysis list.
122
+ 4. **Open Questions** — low-confidence / refutable findings, surfaced not blocking.
123
+ 5. **What's good** — genuine strengths only, one line each. Skip if none.
124
+
125
+ No sycophancy, no softening to be polite, no manufactured outrage. State problems
126
+ plainly with the fix and the evidence. Read-only: report as text; never edit the
127
+ artifact.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: projectstore-decision-detector
3
+ description: "When the user makes or accepts an architectural/technical decision (choosing between alternatives, locking in a pattern, picking a library or tool, settling a trade-off), suggest capturing it as an ADR via $projectstore-adr. Never write to the vault directly — only suggest, and let the $projectstore-adr command handle approval."
4
+ ---
5
+
6
+ ## Runtime path
7
+
8
+ Resolve paths from this skill's own directory, never from the checkout or a
9
+ remembered cache path. The plugin root is two directories above this SKILL.md;
10
+ the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
11
+ any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
12
+ path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
13
+ Do not prefix the command with the assignment: a shell expands the quoted path
14
+ before that inline assignment takes effect. If the bundled core is missing, stop
15
+ and report a broken plugin install; do not fetch a different version from npm.
16
+
17
+ ## User arguments
18
+
19
+ The source command's host-substituted argument token is rendered here as
20
+ `<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
21
+ shown command, replace that token with the actual arguments from the user's
22
+ request and shell-quote values safely. Never pass the angle-bracket token
23
+ literally and never treat it as a shell variable.
24
+
25
+ # Decision detector
26
+
27
+ You watch for **decision moments** in the conversation:
28
+
29
+ - The user explicitly chose between two or more alternatives ("we'll go with X over Y").
30
+ - A trade-off was settled ("let's accept the latency hit for stronger consistency").
31
+ - A library, framework, pattern, or tool was committed to.
32
+ - An architectural property was fixed (auth model, storage layout, transport protocol, deployment topology).
33
+
34
+ ## When you detect such a moment
35
+
36
+ 1. **Check if a vault is bound**: confirm `.projectstore/projectstore.json` exists in the current project. If not, do nothing — this skill is silent without binding.
37
+
38
+ 2. **Check `active_skills` in the config**. If `false`, do nothing.
39
+
40
+ 3. **Check for an existing ADR** on the same topic first:
41
+ ```bash
42
+ grep -rli "<key-term>" "<vault>/adr/" 2>/dev/null
43
+ ```
44
+ If a matching ADR exists, suggest **updating** it (Read + propose Edit through normal approval flow) rather than creating a duplicate.
45
+
46
+ 4. **Suggest, do not act**. Write one short message to the user:
47
+
48
+ > 💡 *This looks like a decision worth recording. Want me to draft an ADR? Run `$projectstore-adr "<your-title>"` or just say "yes" and I'll fire it with the title above.*
49
+
50
+ Propose a concise title (≤80 chars), e.g. *"Use BFF pattern for OIDC"*.
51
+
52
+ 5. **Wait for explicit user confirmation** before invoking `$projectstore-adr`. Never auto-execute.
53
+
54
+ ## Anti-patterns (do not do)
55
+
56
+ - Don't suggest an ADR for trivial choices (variable names, formatting).
57
+ - Don't suggest an ADR more than once per detected decision — if the user said "not now", drop it for the session.
58
+ - Don't write any vault file directly from this skill. ADR creation always goes through `$projectstore-adr` which gates writes with `the harness's user-input mechanism`.
59
+ - Don't change the ADR template, status, or numbering — that's `$projectstore-adr`'s job.
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: projectstore-doctor
3
+ description: "Diagnose the ProjectStore install and vault through the harness-neutral doctor; fixes remain previewed and approval-gated. Arguments: [--install | --vault] [--fix]."
4
+ ---
5
+
6
+ ## Runtime path
7
+
8
+ Resolve paths from this skill's own directory, never from the checkout or a
9
+ remembered cache path. The plugin root is two directories above this SKILL.md;
10
+ the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
11
+ any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
12
+ path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
13
+ Do not prefix the command with the assignment: a shell expands the quoted path
14
+ before that inline assignment takes effect. If the bundled core is missing, stop
15
+ and report a broken plugin install; do not fetch a different version from npm.
16
+
17
+ ## User arguments
18
+
19
+ The source command's host-substituted argument token is rendered here as
20
+ `<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
21
+ shown command, replace that token with the actual arguments from the user's
22
+ request and shell-quote values safely. Never pass the angle-bracket token
23
+ literally and never treat it as a shell variable.
24
+
25
+ Run the deterministic doctor through the bundled core with the user's
26
+ arguments and `--json`. Summarize every finding without re-deriving it.
27
+
28
+ When `--fix` is absent, remain read-only. When it is present, separate fixes
29
+ by owner: derived vault views use `$projectstore-reconcile`; Codex plugin or
30
+ agents-block drift uses the core's `upgrade --harness codex` path. Preview
31
+ each mutation and ask for explicit approval before running it. Unsupported
32
+ surfaces remain unsupported; do not create host configuration by hand. Never
33
+ claim a fix after a non-zero exit.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: projectstore-epic
3
+ description: "Create a new epic (with stories subfolder) in the bound vault. Arguments: <epic-id> <title>."
4
+ ---
5
+
6
+ ## Runtime path
7
+
8
+ Resolve paths from this skill's own directory, never from the checkout or a
9
+ remembered cache path. The plugin root is two directories above this SKILL.md;
10
+ the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
11
+ any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
12
+ path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
13
+ Do not prefix the command with the assignment: a shell expands the quoted path
14
+ before that inline assignment takes effect. If the bundled core is missing, stop
15
+ and report a broken plugin install; do not fetch a different version from npm.
16
+
17
+ ## User arguments
18
+
19
+ The source command's host-substituted argument token is rendered here as
20
+ `<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
21
+ shown command, replace that token with the actual arguments from the user's
22
+ request and shell-quote values safely. Never pass the angle-bracket token
23
+ literally and never treat it as a shell variable.
24
+
25
+ You are creating a new epic.
26
+
27
+ Steps:
28
+
29
+ 1. **Check config**: if `.projectstore/projectstore.json` is missing — instruct user to `$projectstore-bind` and stop.
30
+
31
+ 2. **Validate args**: `<user-arguments>` must contain at least an ID and a title. ID is a short uppercase token (e.g. `AUTH-001`, `RECPLAT-269`). If only one word was given, ask user for the title via the harness's user-input mechanism.
32
+
33
+ 3. **Render draft**:
34
+
35
+ ```bash
36
+ node "${PROJECTSTORE_CORE_ROOT}/scripts/draft.mjs" epic "<user-arguments>"
37
+ ```
38
+
39
+ Capture the JSON output.
40
+
41
+ 4. **Check collision**: if `<vault>/epics/<id>/epic.md` already exists, ask user via the harness's user-input mechanism: "Epic `<id>` exists. [Open existing / Overwrite / Cancel]".
42
+
43
+ 5. **Preview**: show path + content excerpt. When `index` is non-null, print `index.line` too — the exact row that will appear in `epics/README.md`, unless the index step reports a failure and no row lands at all.
44
+
45
+ 6. **Approval** via the harness's user-input mechanism: Yes / Edit / No. This is the only gate: **Yes** covers the epic and its index row. Disclose in the question that the folder's whole managed index table is regenerated from vault state at write time, so the update may also repair a stale row for another epic.
46
+
47
+ 7. **Pre-write race check** (Layer 1): run `test -e "<path>"`. The earlier collision check (step 4) covers most cases, but another session could have created this epic during the approval delay. If exists now → ask the user via the harness's user-input mechanism whether to **Overwrite** or **Cancel**. Do not silently overwrite.
48
+
49
+ 8. **On Yes** (path free or overwrite confirmed): Write the file (parent directories are created by the file-writing tool), then create the stories directory: `mkdir -p "<vault>/epics/<id>/stories"`. The draft script itself never touches the disk — declining at step 6 leaves the vault unchanged.
50
+
51
+ 9. **Index update**: if `index` is non-null in the draft JSON, apply the row through the core — never the Write/file-editing tools, no second gate (the step-6 approval covers it). Must run **after** step 8: the regeneration scans the disk, so an epic written later would be missing from the table.
52
+
53
+ ```bash
54
+ node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" reconcile --write --only indexes=<index.folder>
55
+ ```
56
+
57
+ The row is derived state — regenerated in canonical order, written atomically, manual prose preserved. The epic is already on disk, so a nonzero exit is a warning naming the folder (stderr with no JSON = rejected before any write, fix the header or restore the README; per-target `error` in JSON = I/O failure, suggest `$projectstore-reconcile`), never a failed creation.
58
+
59
+ 10. **Suggest next**: print "Add the first story: `$projectstore-story <epic-id> \"<first story title>\"`".
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: projectstore-graph
3
+ description: "Regenerate graph.md — the vault link graph (nodes + typed edges) derived from body links and frontmatter relations. Compute → preview → approval → apply through the core."
4
+ ---
5
+
6
+ ## Runtime path
7
+
8
+ Resolve paths from this skill's own directory, never from the checkout or a
9
+ remembered cache path. The plugin root is two directories above this SKILL.md;
10
+ the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
11
+ any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
12
+ path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
13
+ Do not prefix the command with the assignment: a shell expands the quoted path
14
+ before that inline assignment takes effect. If the bundled core is missing, stop
15
+ and report a broken plugin install; do not fetch a different version from npm.
16
+
17
+ ## User arguments
18
+
19
+ The source command's host-substituted argument token is rendered here as
20
+ `<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
21
+ shown command, replace that token with the actual arguments from the user's
22
+ request and shell-quote values safely. Never pass the angle-bracket token
23
+ literally and never treat it as a shell variable.
24
+
25
+ You are managing the vault link graph — the third root-level derived view
26
+ beside kanban.md and code-map.md (spec:
27
+ vault-link-graph-derived-view-and-shared-link-resolver).
28
+
29
+ ## Steps
30
+
31
+ 1. **Check config**; stop if missing.
32
+
33
+ 2. **Compute** (read-only, the unified reconcile path):
34
+
35
+ ```bash
36
+ node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" reconcile --only graph
37
+ ```
38
+
39
+ The `graph` entry carries `{ path, changed, content?, stats }` — stats:
40
+ node count, edge count, edges by kind.
41
+
42
+ 3. **Nothing changed** (`changed: false`) → report "graph.md already matches
43
+ the vault — nothing to regenerate." and stop.
44
+
45
+ 4. **Preview**: show `stats` and the first ~15 lines of `content`. Surface
46
+ `dead` and `ambiguous` edge counts FIRST — they are the actionable part
47
+ (the same facts doctor reports as wikilink findings, from the same
48
+ resolver).
49
+
50
+ 5. **Approval** via the harness's user-input mechanism: Yes / No. Disclose that content is
51
+ recomputed from vault state at write time — the preview is advisory, the
52
+ approval covers the regeneration action. On Yes → apply through the core,
53
+ never the file-writing tool:
54
+
55
+ ```bash
56
+ node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" reconcile --write --only graph
57
+ ```
58
+
59
+ Explicit selection creates graph.md when absent — bare reconcile
60
+ deliberately never mints it (first creation and re-minting after deletion
61
+ are this command's job). Render the report's `graph` entry; nonzero exit —
62
+ surface the `error`.
63
+
64
+ 6. **Verify**: run `node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" doctor --vault` (exit 1 = findings, not failure)
65
+ and show the summary line.
66
+
67
+ ## Notes
68
+
69
+ - The grep contract: `grep '<vault-relative-path>' graph.md` returns an
70
+ artifact's full typed neighborhood — outgoing AND incoming edges — in one
71
+ call. Node keys are full vault-relative paths, never short names.
72
+ - Edge kinds: wikilink, mdlink, supersedes, spec-covers, spec-implements-adr,
73
+ epic-contains, dead, ambiguous, out-of-scope. Nothing resolves silently.
74
+ - Hand-edits to graph.md never stick: doctor flags staleness, reconcile
75
+ repairs. Fix the source artifact, then regenerate.
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: projectstore-kanban
3
+ description: "Regenerate the kanban board from story frontmatter (status, priority, title)."
4
+ ---
5
+
6
+ ## Runtime path
7
+
8
+ Resolve paths from this skill's own directory, never from the checkout or a
9
+ remembered cache path. The plugin root is two directories above this SKILL.md;
10
+ the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
11
+ any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
12
+ path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
13
+ Do not prefix the command with the assignment: a shell expands the quoted path
14
+ before that inline assignment takes effect. If the bundled core is missing, stop
15
+ and report a broken plugin install; do not fetch a different version from npm.
16
+
17
+ ## User arguments
18
+
19
+ The source command's host-substituted argument token is rendered here as
20
+ `<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
21
+ shown command, replace that token with the actual arguments from the user's
22
+ request and shell-quote values safely. Never pass the angle-bracket token
23
+ literally and never treat it as a shell variable.
24
+
25
+ You are regenerating the kanban board.
26
+
27
+ Steps:
28
+
29
+ 1. **Check config**. Stop if missing.
30
+
31
+ 2. **Compute** (read-only, the unified reconcile path):
32
+
33
+ ```bash
34
+ node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" reconcile --only kanban
35
+ ```
36
+
37
+ The `kanban` entry carries `{ path, changed, content?, stats }`.
38
+
39
+ 3. **Show stats**: print `stats.total` (total stories) and `stats.by_column`
40
+ (how many in each column). If `changed` is false, report "board already
41
+ matches frontmatter" and stop.
42
+
43
+ 4. **Diff preview**: if `<vault>/kanban.md` already exists, read it and show a brief textual diff vs the generated content (count of added/removed lines per column is enough). If it doesn't exist, just preview the first column.
44
+
45
+ 5. **Approval** via the harness's user-input mechanism:
46
+ - **Yes** — regenerate the board (content is recomputed from story
47
+ frontmatter at write time; the preview is advisory)
48
+ - **No** — abort, keep current file
49
+
50
+ 6. **On Yes**: apply through the core — never the file-writing tool:
51
+
52
+ ```bash
53
+ node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" reconcile --write --only kanban
54
+ ```
55
+
56
+ The write is atomic (temp + rename) and recomputed at write time. Render
57
+ the report's `kanban` entry; its `stats` mirror step 3. Nonzero exit —
58
+ surface the `error`.
59
+
60
+ 7. **Final**: confirm and suggest opening the file in Obsidian (the `kanban-plugin: board` frontmatter triggers the Kanban view automatically).
@@ -0,0 +1,114 @@
1
+ ---
2
+ name: projectstore-librarian
3
+ description: "semantic vault curator for projectstore vaults. Invoke periodically, before releases, or after heavy vault growth — AFTER running $projectstore-doctor (doctor catches mechanical drift; librarian catches SEMANTIC drift that no deterministic rule can). Finds duplicate or contradicting artifacts (research vs an accepted ADR), missing wiki-links between related ADRs/epics/research, misplaced or misnamed files, and archive candidates. Read-only, suggest-only, no sycophancy: it reports concrete curation proposals; every fix goes through the normal approval-gated commands."
4
+ ---
5
+
6
+ ## Runtime path
7
+
8
+ Resolve paths from this skill's own directory, never from the checkout or a
9
+ remembered cache path. The plugin root is two directories above this SKILL.md;
10
+ the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
11
+ any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
12
+ path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
13
+ Do not prefix the command with the assignment: a shell expands the quoted path
14
+ before that inline assignment takes effect. If the bundled core is missing, stop
15
+ and report a broken plugin install; do not fetch a different version from npm.
16
+
17
+ ## User arguments
18
+
19
+ The source command's host-substituted argument token is rendered here as
20
+ `<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
21
+ shown command, replace that token with the actual arguments from the user's
22
+ request and shell-quote values safely. Never pass the angle-bracket token
23
+ literally and never treat it as a shell variable.
24
+
25
+ ## Codex orchestration
26
+
27
+ This is a role-orchestration skill, not a native agent registration. Resolve the
28
+ role model by running:
29
+
30
+ ```bash
31
+ node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" agents model librarian --json --project "$PWD"
32
+ ```
33
+
34
+ Spawn a collaboration agent for the bounded task. If the result names a model,
35
+ pass that model and use an empty or bounded context fork; otherwise inherit the
36
+ current model. Do not pass a reasoning-effort override: per-role effort belongs
37
+ to a separate accepted story. Give the spawned agent the role contract below
38
+ and the exact artifact/diff it must inspect. Wait for its final result.
39
+
40
+ ## Role contract
41
+
42
+ You are the vault librarian — a semantic curator running as an independent,
43
+ fresh-context pass over a projectstore vault. The deterministic doctor has
44
+ already handled (or will handle) mechanical drift: stale indexes, dead links,
45
+ status mismatches. Your subject is what no rule can check: does this vault still
46
+ tell one coherent, non-redundant, well-connected story? Run
47
+ `node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" doctor --vault` first (exit 1 = findings, not failure) and skip anything
48
+ it already flags — do not duplicate mechanical findings.
49
+
50
+ Locate the vault via `.projectstore/projectstore.json` → `vault_path`. Read the folder
51
+ READMEs for orientation, then the artifacts themselves (frontmatter + content),
52
+ prioritizing accepted ADRs and active epics.
53
+
54
+ **Evidence through the MCP tools when they are available.** When the projectstore MCP read tools are exposed to you (`status`, `orientation`, `search`, `get_artifact`, `neighbors`, `lineage`, `code_refs`, `doctor`), gather evidence through them: they answer from the live vault, so no freshness question arises, and an artifact's neighbourhood costs one call instead of a grep plus a read; every result is the CLI's `--json` envelope. When they are not — a host without MCP, or an install older than 0.28 — the derived views below are the fallback, under the rule that follows. Your baseline is the whole edge set, which is one read of the `projectstore://graph` resource (or `graph.md`), never one `neighbors` call per artifact; `neighbors` is for confirming a candidate pair.
55
+
56
+ Derived views (kanban.md, code-map.md, graph.md) are precomputed vault indexes —
57
+ prefer them for orientation, but fall back to a frontmatter sweep when a view is
58
+ missing or its `generated_at` predates recent artifact changes (compare file mtimes; a false-stale just costs a sweep). graph.md in
59
+ particular is YOUR input: its Edges table is the complete set of existing links
60
+ and typed relations (including dead and ambiguous ones), so read existing
61
+ connections from there instead of rediscovering them file by file — your job
62
+ starts where the graph's edges end.
63
+
64
+ **Batch independent evidence calls into one turn.** Every turn re-reads your
65
+ whole accumulated context, so N single-call turns cost ~N× more input than one
66
+ turn with N parallel calls — with identical evidence collected. Folder READMEs
67
+ and unrelated artifacts don't depend on each other — read them together; go
68
+ sequential only when a result genuinely decides what to look at next. And read
69
+ from indexes and frontmatter first, opening full bodies only for curation
70
+ candidates — you are the one agent whose sweep grows with the vault. Quote
71
+ paths with spaces (vaults often live under iCloud paths).
72
+
73
+ ## Sweep, with a pre-commitment pass
74
+
75
+ First predict the 3-5 likeliest hygiene problems from the vault's shape (age
76
+ spread, folder sizes, naming drift), then verify each. Hunt specifically for:
77
+
78
+ 1. **Contradictions** — a research note, concept, or epic that contradicts an
79
+ accepted ADR (or two ADRs contradicting each other) without a `supersedes`
80
+ relationship. Cite both files and the exact conflicting claims.
81
+ 2. **Duplicates & near-duplicates** — two artifacts covering the same decision /
82
+ topic; propose a merge direction (which absorbs which, what content moves).
83
+ 3. **Missing connections** — artifacts that clearly relate (an epic implementing
84
+ an ADR; research that motivated a decision) but carry no wiki-link either way.
85
+ Use graph.md's Edges table as the baseline of what IS linked — candidates are
86
+ pairs with no edge in either direction. Propose the exact link line and where
87
+ it goes.
88
+ 4. **Misplacement & naming** — artifacts in the wrong folder for their kind,
89
+ titles that no longer match content, drafts that grew into something else.
90
+ 5. **Archive candidates** — superseded, abandoned, or long-stale artifacts that
91
+ blur the vault's signal; propose status changes (e.g. `superseded_by`) rather
92
+ than deletion.
93
+ 6. **Staleness with consequences** — a `draft`/`pending review` artifact other
94
+ artifacts already rely on as if final.
95
+
96
+ ## Self-audit
97
+
98
+ Re-read each finding: is the contradiction real or two valid statements at
99
+ different altitudes? Is the "duplicate" actually two intentionally different
100
+ lenses? Confidence HIGH/MED/LOW; move LOW to Open Questions. Don't manufacture
101
+ hygiene work — a healthy vault deserves one sentence saying so.
102
+
103
+ ## Output — your LAST message IS the deliverable
104
+
105
+ 1. **Vault health** — one paragraph: coherent / drifting / fragmenting, and why.
106
+ 2. **Findings** — severity-rated (`🔴 misleads readers` / `🟡 should-fix` /
107
+ `🟢 polish`), each: the problem (cite files), why it matters, and the exact
108
+ proposed fix as a `$projectstore-*` action or an approval-gated edit ("add
109
+ `[[ADR-003]]` to research/x.md → Related"; "mark ADR-002 superseded_by
110
+ ADR-007"). You never edit anything yourself.
111
+ 3. **Open Questions** — low-confidence observations, surfaced not blocking.
112
+
113
+ No sycophancy. Suggest-only: every write goes through the normal projectstore
114
+ approval flow, driven by the caller — never by you.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: projectstore-meeting
3
+ description: "Create a new meeting note (date-prefixed filename). Arguments: <title>."
4
+ ---
5
+
6
+ ## Runtime path
7
+
8
+ Resolve paths from this skill's own directory, never from the checkout or a
9
+ remembered cache path. The plugin root is two directories above this SKILL.md;
10
+ the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
11
+ any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
12
+ path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
13
+ Do not prefix the command with the assignment: a shell expands the quoted path
14
+ before that inline assignment takes effect. If the bundled core is missing, stop
15
+ and report a broken plugin install; do not fetch a different version from npm.
16
+
17
+ ## User arguments
18
+
19
+ The source command's host-substituted argument token is rendered here as
20
+ `<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
21
+ shown command, replace that token with the actual arguments from the user's
22
+ request and shell-quote values safely. Never pass the angle-bracket token
23
+ literally and never treat it as a shell variable.
24
+
25
+ You are creating a meeting note. Today's date is auto-prefixed.
26
+
27
+ Steps:
28
+
29
+ 1. Check config; stop if missing.
30
+ 2. Run `node "${PROJECTSTORE_CORE_ROOT}/scripts/draft.mjs" meeting "<user-arguments>"`.
31
+ 3. Preview path + first ~15 lines. When `index` is non-null, print `index.line` too — the exact row that will appear in the folder index, unless the index step reports a failure and no row lands at all. (In the step-5 **Append to existing** branch no new row appears: the existing note already has one, rendered from its own frontmatter.)
32
+ 4. the harness's user-input mechanism: Yes / Edit / No. When proposing "Edit", offer to seed `Attendees` and `Agenda` from the conversation context if relevant. This is the only gate: **Yes** covers the artifact and its index row. Disclose in the question that the folder's whole managed index table is regenerated from vault state at write time, so the update may also repair a stale row for another artifact.
33
+ 5. Pre-write race check (Layer 1): `test -e "<path>"`. If a meeting note with this date+slug already exists, ask: **Append to existing** (open it and add a section), **Use new slug** (`-2`), or **Cancel**.
34
+ 6. On Yes (path free): Write file.
35
+ 7. Index row, if `index` is non-null — apply through the core, never Write/Edit, no second gate (step 4 covers it): `node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" reconcile --write --only indexes=<index.folder>`. The row is derived state: canonical order, atomic write, manual prose preserved. The file is already on disk, so a nonzero exit is a warning naming the folder (stderr with no JSON = rejected before any write, fix the header or restore the README; `error` in JSON = I/O failure, suggest `$projectstore-reconcile`), never a failed creation.
36
+ 8. Suggest: "Add attendees and agenda before the meeting; record decisions and action items during/after."
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: projectstore-peer-reviewer
3
+ description: "After a new projectstore artifact is created via $projectstore-adr, $projectstore-research, or $projectstore-epic (and similar generative commands), suggest running $projectstore-review <path> to peer-review the artifact with a fresh critic agent before it's committed. Only suggest for artifact kinds whose checklist has default_review=true. Never auto-execute — always ask first."
4
+ ---
5
+
6
+ ## Runtime path
7
+
8
+ Resolve paths from this skill's own directory, never from the checkout or a
9
+ remembered cache path. The plugin root is two directories above this SKILL.md;
10
+ the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
11
+ any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
12
+ path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
13
+ Do not prefix the command with the assignment: a shell expands the quoted path
14
+ before that inline assignment takes effect. If the bundled core is missing, stop
15
+ and report a broken plugin install; do not fetch a different version from npm.
16
+
17
+ ## User arguments
18
+
19
+ The source command's host-substituted argument token is rendered here as
20
+ `<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
21
+ shown command, replace that token with the actual arguments from the user's
22
+ request and shell-quote values safely. Never pass the angle-bracket token
23
+ literally and never treat it as a shell variable.
24
+
25
+ # Peer-reviewer skill
26
+
27
+ You watch for moments where a new artifact has just been written by a `$projectstore-*` command and could benefit from peer review **before** it lands in git.
28
+
29
+ ## Trigger conditions
30
+
31
+ After a successful invocation of any of:
32
+
33
+ - `$projectstore-adr` — new ADR created
34
+ - `$projectstore-research` — new research note created
35
+ - `$projectstore-epic` — new epic created
36
+
37
+ (See `scaffold/checklists.json` — kinds with `default_review: true`.)
38
+
39
+ ## What to do
40
+
41
+ 1. **Confirm a vault is bound** (`.projectstore/projectstore.json` exists). Otherwise stay silent.
42
+ 2. **Confirm `active_skills: true`** in config.
43
+ 3. **Read the frontmatter** of the freshly created file. If `review_status: pending` — eligible for suggestion. If `review_status: reviewed` or `n/a` — do nothing.
44
+ 4. **Suggest, do not act**. One short message:
45
+
46
+ > 🔍 *Want me to peer-review this <kind> before committing? `$projectstore-review <path>` spawns a fresh critic that hasn't seen our conversation — different angle, often catches missing alternatives or unstated assumptions.*
47
+
48
+ 5. **Wait for explicit user confirmation** before invoking `$projectstore-review`. Never auto-execute.
49
+
50
+ 6. If the user declines, drop it for this session — don't ask again for the same file.
51
+
52
+ ## Anti-patterns
53
+
54
+ - Don't suggest review for kinds with `default_review: false` (meeting, runbook, story, concept). User can still invoke `$projectstore-review` manually if they want.
55
+ - Don't suggest review more than once per artifact per session.
56
+ - Don't run the review yourself — `$projectstore-review` handles the critic spawn, the approval flow, and the frontmatter update.
57
+ - Don't reframe the suggestion as "this might need improvement" — that's sycophancy in disguise. The framing is "fresh-eyes pass", not "your work has problems".