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,110 @@
1
+ ---
2
+ name: projectstore-spec
3
+ description: "Create a spec (normative \"how\" covering one or more stories), or transition its status (draft → active → superseded). Arguments: <title> | activate <SPEC-ID> | supersede <SPEC-ID>."
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 a **spec** — the durable, normative "how" of a subsystem
26
+ (ADR-007): it references the ADR(s) that decided the approach, carries numbered
27
+ behavioral contracts, and its Acceptance is **additive** to the covered
28
+ stories' own criteria. One spec covers one or more stories and outlives them.
29
+
30
+ Dispatch on the first argument:
31
+
32
+ - `activate <SPEC-ID>` / `supersede <SPEC-ID>` → **Status transition flow**.
33
+ - Anything else → **Creation flow** (the whole argument string is the title).
34
+
35
+ ## Creation flow
36
+
37
+ 1. **Check config**: stop if `.projectstore/projectstore.json` missing.
38
+
39
+ 2. **Render draft**:
40
+
41
+ ```bash
42
+ node "${PROJECTSTORE_CORE_ROOT}/scripts/draft.mjs" spec "<user-arguments>"
43
+ ```
44
+
45
+ Capture the JSON `{ kind, path, content, index, vars }`.
46
+
47
+ 3. **Fill before preview**: populate `adr: []` and `stories: []` (path form:
48
+ `"EPIC-ID/story-002"`, inline flow) from the conversation context when
49
+ known; write the mandatory sections (How we solve with ADR wiki-links,
50
+ numbered Behavioral contracts, Acceptance checkboxes with `— stories:`
51
+ attribution where items are story-specific). Optional sections (Modules &
52
+ files on disk, Testing) may be omitted for research spikes.
53
+
54
+ 4. **Preview**: path + full content, plus every `warnings` entry as a `⚠️`
55
+ line. If the draft's `collision` field is non-null, surface it as a
56
+ **topic collision** (`"<identity>" already exists as <with>`) and ask:
57
+ extend the existing spec, pick a different slug (`-2` is a deliberate
58
+ distinct identity), or cancel. When `index` is non-null, print `index.line`
59
+ too — the exact row that will appear in `specs/README.md`, unless the index
60
+ step reports a failure and no row lands at all. **Approval** via
61
+ the harness's user-input mechanism: Yes / Edit / No. This is the only gate: **Yes** covers the
62
+ artifact and its index row. Disclose in the question that the folder's whole
63
+ managed index table is regenerated from vault state at write time, so the
64
+ update may also repair a stale row for another artifact.
65
+
66
+ 5. **Post-approval race re-check**: re-run draft.mjs and re-read `collision`
67
+ — an exact-name `test -e` cannot see normalized cross-era collisions. If
68
+ it is now non-null, re-preview and re-ask.
69
+
70
+ 6. **On Yes**: Write the file. Then, if `index` is non-null, apply its index
71
+ row through the core — never the Write/file-editing tools, no second gate (the
72
+ step-4 approval covers it):
73
+
74
+ ```bash
75
+ node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" reconcile --write --only indexes=<index.folder>
76
+ ```
77
+
78
+ The row is derived state — regenerated in canonical order, written
79
+ atomically, manual prose preserved. The artifact is already on disk, so a
80
+ nonzero exit is a warning naming the folder (stderr with no JSON = rejected
81
+ before any write, fix the header or restore the README; per-target `error`
82
+ in JSON = I/O failure, suggest `$projectstore-reconcile`), never a failed
83
+ creation.
84
+
85
+ 7. **Reciprocal links**: for every entry in `stories:`, propose an Edit to that
86
+ story's frontmatter adding the spec id to its `specs:` list (inline flow —
87
+ `specs: ["SPEC-001"]`). One the harness's user-input mechanism per file.
88
+
89
+ 8. **Remind**: "The spec is `draft`. Run `$projectstore-spec activate <ID>`
90
+ after review — a covered story must not enter implementation while its spec
91
+ is draft (doctor enforces this under `spec_policy: required`)."
92
+
93
+ ## Status transition flow
94
+
95
+ 1. **Resolve** the spec file in `<vault>/specs/` by id (case-insensitive
96
+ prefix match on the filename). If not found, list existing specs and stop.
97
+
98
+ 2. **Validate the transition**: `draft → active` (activate), `active →
99
+ superseded` (supersede). Reject anything else with the current status
100
+ shown. `superseded` requires the user to name what supersedes it — record
101
+ it in the body under References.
102
+
103
+ 3. **Preview the change**: current vs proposed frontmatter `status:` (+
104
+ `updated:` bump to today). For `activate`, remind that review is expected
105
+ first (`$projectstore-review <path>`) if `review_status` is still pending —
106
+ ask whether to proceed anyway.
107
+
108
+ 4. **Approval** via the harness's user-input mechanism, then apply the Edit (frontmatter lines
109
+ only). Suggest `$projectstore-reconcile` if the specs index shows a stale
110
+ status.
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: projectstore-status
3
+ description: "Show what's bound, the active layout, what is in progress, and whether the derived views are fresh."
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 summarizing the projectstore binding and the vault's state through the core's `status` verb (roadmap A8: the command renders the verb's facts; nothing here counts, lists or greps the vault by hand).
26
+
27
+ Steps:
28
+
29
+ 1. Run:
30
+
31
+ ```bash
32
+ node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" status --json
33
+ ```
34
+
35
+ The project resolves from the session's project directory; do not pass `--project`. `status` runs unbound: if `result.bound` is `false`, output "No vault bound. Run `$projectstore-bind <vault-path>` first." and stop.
36
+
37
+ 2. Print from `result`: `vault_path` (mark `vault_exists: false` as **missing**), `layout`, `language`, `auto_inject`, `approval_mode`, `spec_policy`, `lifecycle_gates`. If `vault_exists` is `false`, the remaining fields are `null` — stop here with "The bound vault directory is missing — restore it, or rebind with `$projectstore-bind <vault-path>`."
38
+
39
+ 3. **Stories** from `result.stories`: `total` on the board with the `by_status` breakdown on one line ("Stories: 72 — done 44, in_progress 3, planned 25"); if `off_board_total` is non-zero, add how many stories the board leaves off and why (`off_board`, e.g. `not_actionable 2`). Then the in-progress list — `in_progress[]` carries `epic`, `title`, `path`, `started_at`; `in_progress_total` says whether the list (capped at 5) is complete. If `stories.status` is `"error"`, print its `error` instead.
40
+
41
+ 4. **Views** from `result.views`: one line, `kanban`, `code_map`, `graph` each as fresh / stale / missing / unknown (`stale` is `true`, `false`, or `null` when the view's mtime could not be read; it compares the view's mtime with the newest artifact's). A stale or missing view is the cue for step 6.
42
+
43
+ 5. **Active sessions** from `result.sessions`: `active` is the count within the last 30 minutes; `entries[]` (capped at 5) carry `id`, `project_root`, `started_at`, `last_active` — print them as a compact table. From inside a slash command you cannot tell which entry is the current session (Codex's `session_id` reaches hooks, not commands); the user can match by `project_root` and timestamps. If `active` is greater than 1: warn "⚠️ Coordinate via $projectstore-search before creating new artifacts to avoid topic collisions (identity is the slug — ADR-010; the draft's `collision` field catches clashes at creation time)."
44
+
45
+ 6. Suggest the next command from what you saw: `stories.total` is 0 → "Vault looks empty — try `$projectstore-scaffold`"; any view stale or missing → "Stale views — try `$projectstore-reconcile`"; something in progress → name it and suggest `$projectstore-story` to continue.
46
+
47
+ What this command no longer does, and why: the former `ls`/`find -mtime -7` walk of recently touched files is gone — its failure mode is a false "nothing changed" (an iCloud download or a git checkout resets mtimes), the opposite of the views' `stale` flag, whose false positive only costs a reconcile. The in-progress list and the views' freshness answer the same question from artifact facts. The former layout-folder check (`ls` the vault, mark missing folders) is `doctor --vault`'s job and `orientation`'s skeleton shows the folders that exist; it is not repeated here.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: projectstore-statusline
3
+ description: "Explain ProjectStore status-line availability for Codex. This surface is unsupported and the skill never writes configuration. Arguments: on | off | status."
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
+ ProjectStore's status-line surface is not supported by the Codex
26
+ harness. Do not run install or uninstall for `--surface statusline`, and do
27
+ not edit project or host configuration. Report the surface as unsupported.
28
+ For project state use `$projectstore-status`; for a compact live view use the
29
+ Codex application's own task and terminal UI.
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: projectstore-story
3
+ description: "Create a new story inside an existing epic, or run its lifecycle gates (plan / close). Arguments: <epic-id> <title> [--spec SPEC-ID] | plan <story> | close <story>."
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 a story: creating one, or running its lifecycle gates.
26
+
27
+ **Dispatch rule** (positional-1 contract, PS-SPEC story-007): if the first
28
+ argument is `plan` or `close` AND the second argument resolves to an existing
29
+ story file (path, or `<epic-id>/<story-id>` searched under
30
+ `<vault>/epics/*/stories/`), run the **Lifecycle gate flow** below. Otherwise
31
+ this is a **create** (first argument = epic id — uppercase by convention, so
32
+ the two cannot collide).
33
+
34
+ # Create flow
35
+
36
+ 1. **Check config**: stop if `.projectstore/projectstore.json` missing.
37
+
38
+ 2. **Validate args**: epic-id (positional 1) + title (rest). If only one word, ask for the title. An optional `--spec SPEC-ID` names the covering spec — put it into the rendered draft's `specs:` list (inline flow: `specs: ["SPEC-001"]`). Under `spec_policy: required` (vault's `.projectstore.json`), remind that every story needs a covering spec before implementation starts.
39
+
40
+ 3. **Render draft**:
41
+
42
+ ```bash
43
+ node "${PROJECTSTORE_CORE_ROOT}/scripts/draft.mjs" story "<user-arguments>"
44
+ ```
45
+
46
+ The script fails if the epic folder does not exist. Surface the error and suggest `$projectstore-epic <id> "<title>"` first.
47
+
48
+ 4. **Preview**: path + first ~25 lines.
49
+
50
+ 5. **Approval** via the harness's user-input mechanism: Yes / Edit / No.
51
+
52
+ When prompting "Edit", note that the story template has a `Decomposition` checklist — if the user wants to seed it with concrete tasks from the current conversation, regenerate with those tasks pre-filled in place of the empty checkboxes.
53
+
54
+ 6. **Post-approval race re-check** (Layer 1): re-run `draft.mjs story "<user-arguments>"` and re-read its `collision` field — an exact-name `test -e` cannot see normalized cross-era collisions (`story-006-foo.md` vs `story-foo.md`). If `collision` is non-null, surface it as a topic collision (`"<identity>" already exists as <with>`), and ask: extend the existing story, pick a different slug (`-2` is a deliberate distinct identity), or cancel. Render `warnings` entries as `⚠️` lines in the preview too.
55
+
56
+ 7. **On Yes** (path free): Write file.
57
+
58
+ 8. **Suggest next**: "Now decompose the work in the `Decomposition` section, or run `$projectstore-kanban` to refresh the board. Before implementation: `$projectstore-story plan <story>`."
59
+
60
+ # Lifecycle gate flow (plan / close)
61
+
62
+ 1. **Resolve the story file** (second argument). Ambiguous → list candidates and ask.
63
+
64
+ 2. **Run the compute script** (pure — writes nothing):
65
+
66
+ ```bash
67
+ node "${PROJECTSTORE_CORE_ROOT}/scripts/story-section.mjs" <plan|close> "<story-path>"
68
+ ```
69
+
70
+ It returns `{ path, changed, notes, content }`: section inserted when
71
+ absent, status transition, lifecycle timestamps (`started_at` /
72
+ `plan_updated_at` / `closed_at` — stamped unconditionally; the
73
+ `lifecycle_gates` key gates checks, never data).
74
+
75
+ 3. **Fill the section content** in the returned `content` before preview:
76
+ - `plan` — write the Implementation Plan. When the story's `specs:` names a
77
+ covering spec, the plan is a THIN ROUTE through that spec's behavioral
78
+ contracts: which contracts, in what order, which files. Consult the
79
+ planner agent's output if one ran. Do not restate the spec.
80
+ - `close` — write the Final Summary (what changed / why / tests executed /
81
+ risks & follow-ups), and update the Acceptance Criteria checkboxes with
82
+ evidence suffixes: `- [x] <criterion> — evidence: <test | command | file:line>`.
83
+ Check a box ONLY with real evidence (reviewer output, test run, command).
84
+
85
+ 4. **Preview** path + notes + the changed sections. **Approval** via
86
+ the harness's user-input mechanism: Yes / Edit / No.
87
+
88
+ 5. **Immediately before writing**, re-run the script and verify its `content`
89
+ (before your section edits) still matches what you previewed against — a
90
+ human may have edited the file in Obsidian meanwhile. On divergence:
91
+ re-preview, re-ask.
92
+
93
+ 5a. **Delegate the ceremony — enumerated case: story close** (ADR "Artifact
94
+ content is authored by the context-holder, the write ceremony by a clerk").
95
+ After the approval in step 4 and the re-check in step 5, on a `close`:
96
+ - Write TWO files to the session scratchpad: the **scratch** (the full final
97
+ content you previewed — sections filled) and the **baseline** (the script's
98
+ raw `content` from step 2, BEFORE your section edits). They are different
99
+ files with different jobs: the scratch is what gets copied to the target;
100
+ the baseline is what `--check` compares against. Handing `--check` the
101
+ scratch makes it report drift on every run.
102
+ - **Model (ADR-008)**: resolve it with `node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" agents model clerk --json --project "$PWD"` and pass `result.model` as the spawn's model parameter (`null` → pass nothing).
103
+ Missing key, `inherit`, or unreadable config → pass nothing and let the
104
+ agent's own frontmatter decide; never guess a model.
105
+ - Capture doctor's summary line (`node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" doctor
106
+ --vault`, last line) — the clerk needs it as the **pre-state**: it must not
107
+ stop on findings that were already there and are not its own.
108
+ - Spawn `projectstore:clerk` **as a foreground task** (you need its report to
109
+ continue) with: the scratch path, the target path, the exact re-check
110
+ invocation (`story-section.mjs close "<story-path>" --check
111
+ <baseline-path>`), the derived targets (`kanban`, plus `indexes=<epic
112
+ folder>` when status changed), and the doctor pre-state line. On a clean
113
+ report (`verbatim: true`, `stopped_at: null`, doctor no worse than the
114
+ pre-state) skip steps 6-6b — the clerk's report is the write evidence. On a
115
+ stopped report: fix what diverged, then re-delegate (the resume rule: after
116
+ the copy, the ceremony restarts at reconcile, not at the race gate) or
117
+ finish the remaining steps yourself (the copy is idempotent).
118
+ - No clerk available → perform steps 6-6b yourself. There is no fallback
119
+ agent: a general-purpose writer is an unpinned procedure.
120
+
121
+ 6. **On Yes** (undelegated path): Write the full file. On a `plan`, finish by
122
+ suggesting `$projectstore-kanban` (the status changed) — 6a/6b below are the
123
+ close's ceremony, not the plan's.
124
+
125
+ 6a. **(close only) Reconcile** the touched derived targets through the core:
126
+ `node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" reconcile --write --only kanban` (add
127
+ `indexes=<epic folder>` when the status changed).
128
+
129
+ 6b. **(close only) Verify**: `node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" doctor --vault` (exit 1 = findings, not failure)
130
+ — a close is not done while doctor got worse. Then suggest the reviewer's
131
+ proposed `code_refs` via `$projectstore-codemap set` (the reviewer computes it
132
+ from `scripts/diff-refs.mjs --since <started_at>`).
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: projectstore-story-completion
3
+ description: "When the user finishes work that maps to a known story (story file exists in epics/<id>/stories/) — all acceptance criteria appear satisfied, code merged, tests passing — suggest updating the story's frontmatter status (e.g. planned → in-progress → review → done) and regenerating the kanban. Never write to vault directly without $projectstore-* commands and explicit 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
+ # Story completion / status update suggester
26
+
27
+ You watch for moments where the conversation indicates progress on a known story:
28
+
29
+ - A merge/PR was completed for work tied to a story.
30
+ - The user said "story-001 is done" or similar.
31
+ - All checkboxes in a story's `Decomposition` or `Acceptance Criteria` got ticked.
32
+ - The user moved between phases of an epic (e.g., "moving to integration testing now").
33
+
34
+ ## What to do
35
+
36
+ 1. **Confirm a vault is bound** (`.projectstore/projectstore.json` exists). Otherwise stay silent.
37
+ 2. **Confirm `active_skills` is true** in config.
38
+ 3. **Try to identify the story file**: search `<vault>/epics/*/stories/` for files matching keywords from the conversation. If multiple candidates, ask the user which one via plain text (not the harness's user-input mechanism — keep it light).
39
+ 4. **Propose the right transition**:
40
+ - Work about to **start** on a story → suggest `$projectstore-story plan <story>`
41
+ (writes the Implementation Plan, stamps `started_at`, moves to in-progress).
42
+ - Story looks **finished** → suggest `$projectstore-story close <story>`
43
+ (Final Summary, evidence suffixes on acceptance criteria, stamps
44
+ `closed_at`, moves to done) — and, before closing, the `reviewer` agent,
45
+ whose proposed `code_refs` come from `scripts/diff-refs.mjs` anchored at
46
+ the story's `started_at`.
47
+ - Intermediate move (e.g. → review) → propose the frontmatter status Edit
48
+ as before:
49
+
50
+ > 📋 *Looks like `epics/RECPLAT-333/stories/story-007-feature-pipeline.md` is moving to `review`. Want me to update its frontmatter and refresh the kanban?*
51
+
52
+ 5. **Do not modify the file** until the user says yes. When they confirm a
53
+ plain status move:
54
+ - Read the story file.
55
+ - Propose an Edit that changes `status:` and `updated:` in the frontmatter
56
+ (plus `started_at` when first entering in-progress outside the plan gate,
57
+ `closed_at` when moving to done outside the close gate — timestamps must
58
+ not be lost just because the gate was skipped; ISO-8601).
59
+ - Use the harness's user-input mechanism to confirm the Edit before applying.
60
+ - After Edit, suggest running `$projectstore-kanban` to refresh the board.
61
+
62
+ ## Anti-patterns
63
+
64
+ - Don't pick a story automatically — always ask if uncertain.
65
+ - Don't bulk-update multiple stories in one go without per-file approval.
66
+ - Don't change anything beyond `status`, `updated` and the lifecycle
67
+ timestamps (`started_at` / `closed_at`). Section content (plan, summary,
68
+ evidence) belongs to the `$projectstore-story plan|close` gates.
69
+ - Don't trigger after every code change — only on clear completion signals.
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: projectstore-vault-communication
3
+ description: "When communicating with the user about anything stored in the projectstore vault (epics, stories, ADRs, research, kanban, backlog), reference every artifact by its human title from frontmatter — never by session-invented shorthand. Name the parent epic for stories; include status/priority when discussing state or plans. Applies by default in bound projects to summaries, plans, and progress reports."
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
+ # Vault-native communication
26
+
27
+ Vault artifacts are the shared vocabulary between the user, this session, *other*
28
+ sessions, and the post-compact agent. A title written in a file can be grepped,
29
+ linked, and recognized in Obsidian six months from now. A label invented mid-session
30
+ ("T3", "P0-1", "the doctor story") dies with the session that coined it — and forces
31
+ the user to cross-reference your earlier messages just to know what you meant.
32
+
33
+ ## Rules
34
+
35
+ ### 1. Call artifacts by their `title:`, not by number or slug
36
+
37
+ ```
38
+ bad: story-004 is done, story-005 is next
39
+ good: "Unicode-aware slugify to unbreak ru filenames" (story-004) is done;
40
+ "YAML-escape template variables" (story-005) is next
41
+ ```
42
+
43
+ The id in parentheses is welcome — as a *supplement*, never the only handle.
44
+
45
+ ### 2. Stories always carry their epic
46
+
47
+ First mention in a message names both; after that a short form is fine.
48
+
49
+ ```
50
+ bad: let's start with story-001
51
+ good: let's start with "doctor: deterministic consistency lint" (PS-IMPROVE › story-001)
52
+ then: doctor lint story (story-001)
53
+ ```
54
+
55
+ ### 3. Resolution order for the name
56
+
57
+ `title:` from frontmatter → filename without extension → relative path.
58
+ Never a bare number ("story 3", "the second ADR").
59
+
60
+ ### 4. Plans and progress carry status (and priority when it matters)
61
+
62
+ ```
63
+ bad: the epic is moving along
64
+ good: epic "Reliability by construction" (PS-IMPROVE, p0): 2 of 6 stories done,
65
+ "reconcile: re-derive kanban and indexes from frontmatter" is in-progress
66
+ ```
67
+
68
+ ### 5. Document-internal codes stay inside their document
69
+
70
+ If a note defines its own legend (e.g. topics T1–T6 in a research note), those codes
71
+ are fine *within that document*. In chat, expand them on first use in every message:
72
+
73
+ ```
74
+ bad: I suggest T3+T4 first, then T2/T6, T5, T1
75
+ good: I suggest starting with the agent-roster topics — "which new roles fit" and
76
+ "rename projectstore-critic → critic" (topics 3–4 in research "v0.13 Design
77
+ Questions: Statusline, Agents, Doctor, Model Config") — their naming decisions
78
+ leak into every other ADR's wording
79
+ ```
80
+
81
+ ### 6. Link the file when the user may want to open it
82
+
83
+ `epics/PS-IMPROVE/stories/story-001-doctor-deterministic-consistency-lint.md` —
84
+ paths are clickable in the terminal and resolvable in Obsidian. Title first,
85
+ path as the pointer.
86
+
87
+ ## When this applies
88
+
89
+ - Any user-facing message *about vault contents*: status summaries, "what's next",
90
+ planning discussions, review results, kanban talk, backlog updates.
91
+ - Artifacts you write into the vault: related-links and prose references use titles
92
+ and wiki-links, not invented codes.
93
+
94
+ ## When it does NOT apply
95
+
96
+ - Short confirmations ("done", "committing now") with no artifact references.
97
+ - Raw command output, code blocks, file paths inside tool calls.
98
+ - Frontmatter ids themselves (`id: story-001` stays an id — that's its job).
99
+
100
+ ## Anti-patterns
101
+
102
+ - ❌ "T3+T4 first, then T2/T6" — bare document-internal codes leaked into chat.
103
+ - ❌ "P0-1 through P0-6 are specced" — priority labels used as names.
104
+ - ❌ "the doctor story" when two doctor-shaped items exist (install diagnostics vs
105
+ vault consistency lint) — ambiguity is exactly what titles prevent.
106
+ - ❌ Renaming an artifact in conversation ("the reliability epic" for an epic titled
107
+ "Reliability by construction" is fine as a gloss — but don't *invent* a different
108
+ working title and keep using it).
109
+
110
+ ## Activation
111
+
112
+ Default-on when a vault is bound (`.projectstore/projectstore.json` exists) and
113
+ `active_skills` is not `false` — same gating as the other passive skills. Silent
114
+ otherwise. This skill changes *how you phrase things*; it never writes files and
115
+ never blocks an action.