projectstore-claude 0.29.2 → 0.29.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/projectstore-claude.mjs +1 -1
- package/node_modules/projectstore/.claude-plugin/marketplace.json +1 -1
- package/node_modules/projectstore/.claude-plugin/plugin.json +2 -1
- package/node_modules/projectstore/README.md +44 -7
- package/node_modules/projectstore/commands/bar.md +30 -0
- package/node_modules/projectstore/commands/bind.md +16 -20
- package/node_modules/projectstore/commands/doctor.md +12 -7
- package/node_modules/projectstore/commands/scaffold.md +24 -16
- package/node_modules/projectstore/commands/status.md +1 -1
- package/node_modules/projectstore/commands/statusline.md +2 -2
- package/node_modules/projectstore/commands/story.md +15 -2
- package/node_modules/projectstore/docs/alongside.md +167 -0
- package/node_modules/projectstore/docs/extending.md +17 -3
- package/node_modules/projectstore/docs/getting-started.md +18 -9
- package/node_modules/projectstore/docs/harnesses.md +1 -1
- package/node_modules/projectstore/docs/how-it-works.md +12 -3
- package/node_modules/projectstore/harnesses/claude-code.json +23 -8
- package/node_modules/projectstore/harnesses/codex.json +16 -6
- package/node_modules/projectstore/hooks/band-state.d.ts +44 -0
- package/node_modules/projectstore/hooks/band.tsx +622 -0
- package/node_modules/projectstore/hooks/hooks.json +1 -0
- package/node_modules/projectstore/hooks/pre-compact.mjs +7 -10
- package/node_modules/projectstore/hooks/session-rules.mjs +14 -8
- package/node_modules/projectstore/hooks/session-start.mjs +56 -20
- package/node_modules/projectstore/hooks/session-stop.mjs +8 -6
- package/node_modules/projectstore/package.json +12 -2
- package/node_modules/projectstore/scaffold/headings.json +8 -0
- package/node_modules/projectstore/scripts/band-shared.mjs +446 -0
- package/node_modules/projectstore/scripts/band.mjs +207 -0
- package/node_modules/projectstore/scripts/binding.mjs +733 -62
- package/node_modules/projectstore/scripts/build-adapters.mjs +98 -35
- package/node_modules/projectstore/scripts/cli.mjs +1463 -267
- package/node_modules/projectstore/scripts/codemap.mjs +22 -7
- package/node_modules/projectstore/scripts/convergence.mjs +638 -0
- package/node_modules/projectstore/scripts/diff-refs.mjs +14 -8
- package/node_modules/projectstore/scripts/doctor-report.mjs +253 -0
- package/node_modules/projectstore/scripts/doctor.mjs +1384 -420
- package/node_modules/projectstore/scripts/draft.mjs +5 -2
- package/node_modules/projectstore/scripts/fetch-shell.mjs +369 -0
- package/node_modules/projectstore/scripts/graph.mjs +19 -13
- package/node_modules/projectstore/scripts/harness.mjs +283 -37
- package/node_modules/projectstore/scripts/install-harness.mjs +4701 -575
- package/node_modules/projectstore/scripts/kanban.mjs +6 -21
- package/node_modules/projectstore/scripts/lib.mjs +933 -199
- package/node_modules/projectstore/scripts/mcp.mjs +386 -105
- package/node_modules/projectstore/scripts/portable-registration.mjs +276 -56
- package/node_modules/projectstore/scripts/provenance.mjs +26 -10
- package/node_modules/projectstore/scripts/query.mjs +441 -72
- package/node_modules/projectstore/scripts/reconcile.mjs +55 -18
- package/node_modules/projectstore/scripts/run-host.mjs +139 -0
- package/node_modules/projectstore/scripts/scaffold.mjs +244 -0
- package/node_modules/projectstore/scripts/setup.mjs +987 -0
- package/node_modules/projectstore/scripts/stages.mjs +84 -0
- package/node_modules/projectstore/scripts/statusline-launcher.mjs +36 -11
- package/node_modules/projectstore/scripts/statusline.mjs +55 -14
- package/node_modules/projectstore/scripts/story-section.mjs +39 -17
- package/node_modules/projectstore/scripts/surfaces.mjs +485 -99
- package/node_modules/projectstore/scripts/term.mjs +1027 -52
- package/node_modules/projectstore/scripts/tokens.mjs +106 -28
- package/node_modules/projectstore/scripts/touch-session.mjs +109 -70
- package/node_modules/projectstore/scripts/version-guard.mjs +79 -27
- package/node_modules/projectstore/scripts/worktree.mjs +16 -5
- package/node_modules/projectstore/templates/de/strings.json +63 -1
- package/node_modules/projectstore/templates/de/vault-readme.md.tmpl +13 -0
- package/node_modules/projectstore/templates/en/strings.json +63 -1
- package/node_modules/projectstore/templates/en/vault-readme.md.tmpl +13 -0
- package/node_modules/projectstore/templates/es/strings.json +63 -1
- package/node_modules/projectstore/templates/es/vault-readme.md.tmpl +13 -0
- package/node_modules/projectstore/templates/fr/strings.json +63 -1
- package/node_modules/projectstore/templates/fr/vault-readme.md.tmpl +13 -0
- package/node_modules/projectstore/templates/ru/strings.json +63 -1
- package/node_modules/projectstore/templates/ru/vault-readme.md.tmpl +13 -0
- package/node_modules/projectstore/templates/zh/strings.json +63 -1
- package/node_modules/projectstore/templates/zh/vault-readme.md.tmpl +13 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ The Claude Code installer for [projectstore](https://www.npmjs.com/package/proje
|
|
|
6
6
|
npx projectstore-claude install --project "$PWD"
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
It registers the plugin for that checkout at the host's local scope. It prints its plan first — every write and every host command, verbatim — and at a terminal asks
|
|
9
|
+
It registers the plugin for that checkout at the host's local scope. It prints its plan first — every write and every host command, verbatim — and at a terminal asks `◆ Apply N changes? [Y/n]` before anything runs; then each step as it runs, and what to do next. Without a terminal (a script, CI, an agent's tool) naming the shell is the confirmation; `--json` never asks. Restart Claude Code afterwards.
|
|
10
10
|
|
|
11
11
|
- See before you write: `npx projectstore-claude plan --project "$PWD"` prints the same plan and writes nothing; `--verbose` adds every row's reasoning; `npx projectstore-claude <verb> --help` lists a verb's options with examples.
|
|
12
12
|
|
|
@@ -24,7 +24,7 @@ const HARNESS = "claude-code";
|
|
|
24
24
|
// scripts/cli.mjs; the packaging test pins it). Any other verb — doctor,
|
|
25
25
|
// status, search, --version — passes through untouched: the core refuses an
|
|
26
26
|
// option a verb does not declare, so a blanket insert would break `doctor`.
|
|
27
|
-
const HARNESS_VERBS = new Set(["plan","install","uninstall","upgrade","agents"]);
|
|
27
|
+
const HARNESS_VERBS = new Set(["setup","plan","install","uninstall","upgrade","agents"]);
|
|
28
28
|
|
|
29
29
|
// The bundled core, by path — never by package resolution: a hoisted or global
|
|
30
30
|
// copy at another version is exactly the pairing the pin exists to prevent,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"name": "projectstore",
|
|
13
13
|
"displayName": "projectstore",
|
|
14
14
|
"description": "📚 Your agent runs the project through a verified loop: task → artifact (ADR · spec · epic · story) → adversarial critic → backlog → planner → reviewer → done. Plain markdown in an Obsidian-friendly vault, every write approved by you — and any model can pick the project up tomorrow.",
|
|
15
|
-
"version": "0.29.
|
|
15
|
+
"version": "0.29.4",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "Evgenii Konev",
|
|
18
18
|
"email": "ekonev@smartandpoint.com",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projectstore",
|
|
3
3
|
"displayName": "projectstore",
|
|
4
|
-
"version": "0.29.
|
|
4
|
+
"version": "0.29.4",
|
|
5
5
|
"description": "Your agent runs the project through a verified loop: task → artifact (ADR / spec / epic / story) → adversarial critic → backlog → planner → reviewer → done. Plain markdown in git — any model can pick the project up tomorrow.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Evgenii Konev @ SmartAndPoint",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"homepage": "https://github.com/SmartAndPoint/ProjectStore",
|
|
12
12
|
"repository": "https://github.com/SmartAndPoint/ProjectStore",
|
|
13
13
|
"license": "MIT",
|
|
14
|
+
"types": "./hooks/band-state.d.ts",
|
|
14
15
|
"keywords": [
|
|
15
16
|
"project-management",
|
|
16
17
|
"adr",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ProjectStore
|
|
2
2
|
|
|
3
|
-
> Not
|
|
3
|
+
> Not agent memory, not a per-feature spec pipeline. Memory helps one agent recall; a feature spec plans one change. ProjectStore keeps the project's record — what was decided, what is in flight, what was checked — as reviewed markdown in git, readable by any agent and anyone with the repo.
|
|
4
4
|
|
|
5
5
|
[](https://github.com/SmartAndPoint/ProjectStore/releases) [](./LICENSE) [](https://github.com/SmartAndPoint/ProjectStore/stargazers)
|
|
6
6
|
|
|
@@ -14,6 +14,21 @@ Agents write code fast. They re-decide settled questions even faster: every fres
|
|
|
14
14
|
|
|
15
15
|
The fix is not a smarter agent. It is a loop with verification in it.
|
|
16
16
|
|
|
17
|
+
## Where it fits
|
|
18
|
+
|
|
19
|
+
**Not agent memory. Not a spec pipeline. The project's record.** Three kinds of tools sit next to a coding agent. Each answers a different question.
|
|
20
|
+
|
|
21
|
+
| Kind of tool | The question it answers | What it keeps | Examples |
|
|
22
|
+
|---|---|---|---|
|
|
23
|
+
| **Agent memory** | What does this agent recall? | Notes the model keeps from its sessions, for an agent, a user or a machine. | Mem0, Zep, Codex and Claude Code memory |
|
|
24
|
+
| **Instruction files** | How should an agent behave here? | Standing rules for an agent, kept in the repository. | `CLAUDE.md`, `AGENTS.md`, rules, steering files |
|
|
25
|
+
| **Spec-driven tools** | How do we build this change? | A spec, a plan and tasks for one feature. | Spec Kit, Kiro, OpenSpec, BMAD |
|
|
26
|
+
| **ProjectStore** | What has the project decided, what is in flight, and was it checked? | Decisions, specs and work items with a status, a date and links, in git. A person approves each before ProjectStore writes it; a fresh-context critic reviews it by rule. | — |
|
|
27
|
+
|
|
28
|
+
Keep your agent's memory for you and your machine, and the project in the vault.
|
|
29
|
+
|
|
30
|
+
Decision logs, validators, session-start orientation and independent review each exist elsewhere. What ProjectStore adds is all of them over one linked record. Tool by tool, with sources: [`docs/alongside.md`](./docs/alongside.md).
|
|
31
|
+
|
|
17
32
|
## The loop
|
|
18
33
|
|
|
19
34
|
The thing that makes agentic coding work — the loop Claude Code's own creator keeps pointing at — is *gather context, act, verify, repeat*. ProjectStore runs that loop one level up: over the project, not just the code.
|
|
@@ -27,10 +42,10 @@ The thing that makes agentic coding work — the loop Claude Code's own creator
|
|
|
27
42
|
2. **A fresh-context critic attacks the artifact.** Expect *revise* — on this repo it has yet to pass anything on the first try, and that is the point.
|
|
28
43
|
3. The fixed artifact lands in the **backlog**; the kanban regenerates itself.
|
|
29
44
|
4. An agent picks up a story. A **planner** reads how earlier epics actually landed in the code and says where this change belongs.
|
|
30
|
-
5.
|
|
45
|
+
5. By rule, a **reviewer** matches the diff against the story's acceptance criteria — per criterion, with evidence — before anything gets called done.
|
|
31
46
|
6. **Done.** Board, link graph and code map regenerate. The next session starts oriented instead of guessing.
|
|
32
47
|
|
|
33
|
-
Mechanisms hold this together, not discipline: an agent that starts coding with no story open gets nudged
|
|
48
|
+
Mechanisms hold this together, not discipline: an agent that starts coding with no story open gets nudged; an artifact that needs review carries `review_status: pending` until a critic pass is applied, so "not yet reviewed" is a state the tools can read rather than something someone must remember; and a deterministic `doctor` checks the mechanical consistency with zero AI involved. Every *verify* step is a separate fresh-context agent with no stake in the draft it is judging.
|
|
34
49
|
|
|
35
50
|
We build ProjectStore with ProjectStore. The feature that names your session went through exactly this loop — including a critic pass that killed the design's central claim, and a reviewer pass that caught a bug which would have shipped the feature silently dead for every real user.
|
|
36
51
|
|
|
@@ -56,6 +71,8 @@ Six months later, *"why Postgres?"* has an answer with a date and the alternativ
|
|
|
56
71
|
|
|
57
72
|

|
|
58
73
|
|
|
74
|
+
In Claude Code a band above the prompt goes further (experimental): the session's epic with its goal and how far it is, the story in hand, and the ProjectStore agent at work — `critic · opus 5.5 · reviews «…»` — on the model its own requests name. While it draws, the status line steps aside; `/projectstore:bar off` hides it, `/projectstore:bar status` says why it is not there.
|
|
75
|
+
|
|
59
76
|
Open the vault in [Obsidian](https://obsidian.md) and you get the graph view and the board for free. Don't use Obsidian? Everything renders on GitHub and in any editor.
|
|
60
77
|
|
|
61
78
|
## Install — one message
|
|
@@ -94,7 +111,7 @@ Contributors: `git clone` this repo, then `claude --plugin-dir ./ProjectStore`.
|
|
|
94
111
|
npx projectstore-claude install --project "$PWD"
|
|
95
112
|
```
|
|
96
113
|
|
|
97
|
-
The same tree is published to npm as [`projectstore`](https://www.npmjs.com/package/projectstore) — one source package carrying every harness's manifest — and `projectstore-claude` is its Claude Code shell: the core pinned at the same version and bundled inside, the harness fixed, so the one command has the same shape on every harness. It registers the plugin with Claude Code: it writes a small local marketplace of its own under your Claude home, then drives `claude plugin marketplace add` / `plugin install` **at local scope**, so the registration lands in this checkout's `.claude/settings.local.json` and nowhere else. It prints its plan first — every file it writes and every host command, verbatim — and at a terminal asks
|
|
114
|
+
The same tree is published to npm as [`projectstore`](https://www.npmjs.com/package/projectstore) — one source package carrying every harness's manifest — and `projectstore-claude` is its Claude Code shell: the core pinned at the same version and bundled inside, the harness fixed, so the one command has the same shape on every harness. It registers the plugin with Claude Code: it writes a small local marketplace of its own under your Claude home, then drives `claude plugin marketplace add` / `plugin install` **at local scope**, so the registration lands in this checkout's `.claude/settings.local.json` and nowhere else. It prints its plan first — every file it writes and every host command, verbatim — and at a terminal asks `◆ Apply N changes? [Y/n]`; then it shows each step as it runs and what to do next. Without a terminal (a script, CI, an agent's tool) naming the harness is the confirmation. `plan` prints the same plan and writes nothing; `--verbose` adds every row's reasoning; `npx projectstore-claude <verb> --help` lists a verb's options with examples. Restart Claude Code afterwards. A git-marketplace copy already enabled for the checkout is silenced there (not globally) so the plugin does not load twice; `uninstall` turns it back on. Pin or upgrade with `npx projectstore-claude@<version> upgrade --project "$PWD"` — the version you name is the version you run. The core's low-level form, `npx projectstore <verb> --harness claude-code …`, is exactly what the shell runs. bun works the same on the packed bin.
|
|
98
115
|
|
|
99
116
|
**Codex has its own shell with the same one-command shape:**
|
|
100
117
|
`npx projectstore-codex install --project "$PWD"`. It carries a Codex
|
|
@@ -132,6 +149,8 @@ npx projectstore install --harness claude-code # the low-level form the shell
|
|
|
132
149
|
npx projectstore reconcile --write --only kanban
|
|
133
150
|
```
|
|
134
151
|
|
|
152
|
+
At a terminal the bin's output is coloured; a pipe gets the same layout as plain text. `NO_COLOR=1` turns the colour off, and `PROJECTSTORE_ASCII=1` draws every glyph in ASCII — for a terminal that draws ambiguous-width characters wide (`TERM=dumb` does both).
|
|
153
|
+
|
|
135
154
|
Reads too — the same facts the agents get over MCP:
|
|
136
155
|
|
|
137
156
|
```
|
|
@@ -148,11 +167,12 @@ The same eight reads are an MCP server. The plugin registers it through its own
|
|
|
148
167
|
npx projectstore mcp --project "$PWD"
|
|
149
168
|
```
|
|
150
169
|
|
|
151
|
-
Binding, too — naming the vault is the confirmation, and changing it needs `--rebind
|
|
170
|
+
Binding, too — naming the vault is the confirmation, and changing it needs `--rebind`. `init` creates a whole vault in one step, with no `mkdir` first: the directory, its git repository, the layout's folders and their README indexes; `scaffold --write` adds the folders to a vault that was bound without them:
|
|
152
171
|
|
|
153
172
|
```
|
|
154
173
|
npx projectstore bind ~/vaults/my-project
|
|
155
174
|
npx projectstore init ~/vaults/new-project --language ru
|
|
175
|
+
npx projectstore scaffold --write
|
|
156
176
|
```
|
|
157
177
|
|
|
158
178
|
`projectstore-claude`, `projectstore-codex` and `projectstore-opencode` are this package's per-harness shells — the core pinned and bundled, the harness fixed. The Claude Code and Codex shells are published at the core's version; Codex stays labelled experimental until a live run has exercised every surface it installs ([`docs/harnesses.md`](./docs/harnesses.md)). The opencode shell publishes after its plugin root is rendered. The other `projectstore-*` names are reserved placeholders pointing back here. One source package, one version, N tarballs.
|
|
@@ -263,7 +283,7 @@ And they are the exit door. The vault is plain markdown in git — no server, no
|
|
|
263
283
|
|
|
264
284
|
## Fact sheet
|
|
265
285
|
|
|
266
|
-
**
|
|
286
|
+
**21 commands** · **6 agents** — critic, planner, reviewer, librarian, archaeologist (the advisors: read-only, fresh-context) and clerk (the sole write-capable one — it executes approved writes, post-gate, and composes nothing) · **6 languages** — en, ru, es, de, fr, zh · zero runtime dependencies
|
|
267
287
|
|
|
268
288
|
The deep dive — real session files, measured payloads, how every mechanism works and where its limits are: [docs/how-it-works.md](./docs/how-it-works.md).
|
|
269
289
|
|
|
@@ -277,7 +297,7 @@ The deep dive — real session files, measured payloads, how every mechanism wor
|
|
|
277
297
|
|
|
278
298
|
## Uninstalling
|
|
279
299
|
|
|
280
|
-
`/plugin uninstall projectstore@SmartAndPoint` for a Claude git-marketplace install; `npx projectstore-claude uninstall --project "$PWD"` for its npm registration. For Codex, `npx projectstore-codex uninstall --project "$PWD"` removes only project-owned wiring; add `--global` only to remove the user-global Codex plugin and marketplace. Your vault is yours — plain markdown, untouched. One leftover of a host-managed plugin path can be the agents block in `CLAUDE.md`/`AGENTS.md`; remove it with the harness's agents unregister skill, or delete everything between `<!-- projectstore:agents … -->` and `<!-- /projectstore:agents -->` by hand. `uninstall` leaves a block that lives in `AGENTS.md`, because that file is read by other coding agents too
|
|
300
|
+
`/plugin uninstall projectstore@SmartAndPoint` for a Claude git-marketplace install; `npx projectstore-claude uninstall --project "$PWD"` for its npm registration. For Codex, `npx projectstore-codex uninstall --project "$PWD"` removes only project-owned wiring; add `--global` only to remove the user-global Codex plugin and marketplace. Your vault is yours — plain markdown, untouched. One leftover of a host-managed plugin path can be the agents block in `CLAUDE.md`/`AGENTS.md`; remove it with the harness's agents unregister skill, or delete everything between `<!-- projectstore:agents … -->` and `<!-- /projectstore:agents -->` by hand. A one-harness `uninstall` leaves a block that lives in `AGENTS.md`, because that file is read by other coding agents too. Claude Code's then removes the `CLAUDE.md` import when that file holds nothing else; Codex's keeps it, so Claude Code still sees the block. `uninstall --surface agents_block` removes the block as well. A bare core `npx projectstore uninstall --project "$PWD"`, with no `--harness`, covers every harness the project uses — each one whose own directory (`.claude/`, `.codex/`) or `.projectstore/state/<id>/` is there. Once every harness that can read the block's file is among them (for `AGENTS.md`, Claude Code and Codex), the block goes too, and the `CLAUDE.md` import with it unless your own text keeps both files.
|
|
281
301
|
|
|
282
302
|
## Extending
|
|
283
303
|
|
|
@@ -287,6 +307,23 @@ See [`docs/extending.md`](./docs/extending.md) for adding layouts, templates, an
|
|
|
287
307
|
|
|
288
308
|
Issues and discussions: https://github.com/SmartAndPoint/ProjectStore/issues. PRs welcome — adding a layout is a good first contribution (see `scaffold/layouts/engineering.json` for the format).
|
|
289
309
|
|
|
310
|
+
The published package has no dependencies; the linter and the formatter are dev-only, pinned in `package-lock.json`. Every pull request runs the tests, ESLint and Prettier:
|
|
311
|
+
|
|
312
|
+
```sh
|
|
313
|
+
npm test # Node 20+, no install needed
|
|
314
|
+
npm ci # once, for the lint tools (Node 20.19+, 22.13+ or 24+)
|
|
315
|
+
npm run lint
|
|
316
|
+
npm run format # rewrites; npm run format:check only reports
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
One formatting-only commit is listed in `.git-blame-ignore-revs`. GitHub skips it in blame by itself; a local clone needs this once:
|
|
320
|
+
|
|
321
|
+
```sh
|
|
322
|
+
git config blame.ignoreRevsFile .git-blame-ignore-revs
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
A branch opened before that commit rebases in two steps, so that the lint fixes before it are kept: `git rebase <the commit before it>` (real conflicts, resolved as usual), then `git rebase --onto <it> <the commit before it>`, where every conflict is formatting only: take your side, run `npx prettier --write <file>`, `git add` it and continue.
|
|
326
|
+
|
|
290
327
|
## License
|
|
291
328
|
|
|
292
329
|
MIT — see [`LICENSE`](./LICENSE).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: The band above the prompt — this session's epic, its progress, its story and its ProjectStore agents. Switch it on or off, pin an epic for sessions with none, or ask why it is not drawing.
|
|
3
|
+
argument-hint: "on | off | status | epic [<ID>]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are managing the band above the prompt through the core's `band` verb. The band is drawn by the plugin's hooks module; it shows this session's epic (from this session's own state), how far that epic is, its goal, this session's story and the ProjectStore agent at work. While it draws, the status line gives way to it, and it comes back within 30 s of the band stopping. Never edit `.projectstore/projectstore.json` yourself: the verb is the one writer of its `band` keys, and writes atomically.
|
|
7
|
+
|
|
8
|
+
Read `$ARGUMENTS`: `on`, `off`, `status`, `epic <ID>`, or `epic` alone (releases the pin). Nothing, or anything else, is `status`.
|
|
9
|
+
|
|
10
|
+
## status — read-only
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/projectstore.mjs" band status --project "${CLAUDE_PROJECT_DIR}"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Relay its lines. Exit 3: the project is not bound — tell the user to run `/projectstore:bind <vault-path>` and stop. When it says the band is not drawing, the reason is one of: switched off; this session has no epic and none is pinned; the pinned epic no longer exists; the module is not drawing (the host has modules switched off, an older Claude Code, or a crashed module — the status line keeps its own line then); a harness without a band.
|
|
17
|
+
|
|
18
|
+
## on, off, epic
|
|
19
|
+
|
|
20
|
+
1. **Ask** via AskUserQuestion, naming the change — "Switch the band off?", "Switch the band on?", "Pin the band to `<ID>` for sessions with no epic of their own?", or "Release the pinned epic?" — **Yes** / **No**. On **No**, stop: nothing is written.
|
|
21
|
+
|
|
22
|
+
2. **Write**, on **Yes**:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/projectstore.mjs" band <on|off|epic> [<ID>] --json --project "${CLAUDE_PROJECT_DIR}"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The question above is the confirmation; `--json` never asks again. Report `result.band` and whether `result.wrote`. Exit 1 is a refusal — an unknown epic id (the message names the existing ones), or a binding that is not valid JSON: relay it. The band follows within a few seconds; no restart.
|
|
29
|
+
|
|
30
|
+
A pin shows only in a session that has no epic of its own: a session working on an epic always shows that one.
|
|
@@ -3,7 +3,7 @@ description: Bind this project to an Obsidian vault (or any markdown directory)
|
|
|
3
3
|
argument-hint: <vault-path> | --inherit [--layout engineering] [--lang en|ru|es|de|fr|zh]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are binding the current project to a markdown vault for projectstore. The config is written by the core's `bind` / `init` verbs (roadmap A8); this interview decides the values, previews them, and asks — it never writes `projectstore.json` itself, except on the inherit path (step 0a), which copies the parent's file verbatim, and the
|
|
6
|
+
You are binding the current project to a markdown vault for projectstore. The config is written by the core's `bind` / `init` verbs (roadmap A8); this interview decides the values, previews them, and asks — it never writes `projectstore.json` itself, except on the inherit path (step 0a), which copies the parent's file verbatim, and the one later stamp in step 11 (`statusline`), which `Edit`s the file the verb wrote. The interview's `--lang` is the verb's `--language`.
|
|
7
7
|
|
|
8
8
|
Parse `$ARGUMENTS`:
|
|
9
9
|
- First positional arg: vault path. Expand `~` if present.
|
|
@@ -20,7 +20,7 @@ Steps:
|
|
|
20
20
|
- If absent otherwise: proceed to step 1 (fresh bind).
|
|
21
21
|
- If present **and** `--inherit` was passed: print "Already bound to `<path>`." and stop. Do not fall through to the rebind comparison below — with `--inherit` there is no new path to compare, and the comparison would render an empty "proposed" side and offer to replace the binding. A no-op command must not reach a destructive option.
|
|
22
22
|
- If present, let the verb compare — run `node "${CLAUDE_PLUGIN_ROOT}/bin/projectstore.mjs" bind "<vault-path>" [--layout <name>] [--language <code>] --json` **without** `--rebind` (pass the user's flags, so the proposed side of the diff is what a rebind would write) (the vault is normalised on both sides: `~`, relative, trailing slash, symlinks):
|
|
23
|
-
- `result.state` is `"same"` (exit 0, nothing written): print "Already bound to `<path>`.
|
|
23
|
+
- `result.state` is `"same"` (exit 0, nothing written): print "Already bound to `<path>`." Then run step 7's `scaffold --json` check: when a row reads `create`, add "`/projectstore:scaffold` creates the layout's missing folders and READMEs"; otherwise suggest `/projectstore:status`. Stop. If `result.ignored` names `layout` or `language`, say the flag was ignored — a change of layout or language is not a rebind.
|
|
24
24
|
- a refusal with code `UNREADABLE` (the config exists but is not valid JSON): relay it and stop — nothing is overwritten; the user fixes or removes the file first.
|
|
25
25
|
- `result.state` is `"different"` (exit 1, a `REBIND` refusal, nothing written — **the refusal is the diff**, and `result.kept_keys` lists what a rebind keeps): show the user a one-block diff built from the existing config and the refusal:
|
|
26
26
|
```
|
|
@@ -48,12 +48,13 @@ Steps:
|
|
|
48
48
|
|
|
49
49
|
It prints `{state, worktree, mainCheckout, vaultPath}` and writes nothing.
|
|
50
50
|
- `state` is **not** `inheritable` → say why in one line (not a worktree, its parent is unbound too, or git could not answer) and fall through to step 1, which needs a vault path; if none was given, ask for one.
|
|
51
|
-
- `state` is `inheritable` → read the parent's `<mainCheckout>/.projectstore/projectstore.json` (or, in a checkout not yet migrated, the legacy `<mainCheckout>/.claude/projectstore.json`), show it **verbatim as a code block
|
|
52
|
-
- On **Yes**: Write that JSON verbatim to `<project>/.projectstore/projectstore.json`, **and write `<project>/.projectstore/.gitignore` beside it** with the two lines `projectstore.json` and `state/` under a comment saying they are machine-local (the verb writes them itself on every other path; this one bypasses the verb, and without them the worktree commits an absolute vault path into the index it shares with its parent). If that file already exists, add any missing line and leave the rest — it is line-merged. Then **jump straight to step 10** (the summary). Steps 1–9 and 11
|
|
51
|
+
- `state` is `inheritable` → read the parent's `<mainCheckout>/.projectstore/projectstore.json` (or, in a checkout not yet migrated, the legacy `<mainCheckout>/.claude/projectstore.json`), show it **verbatim as a code block** — but for the `channel_switch` and `channel_keep` keys, which are left out (below) — and ask via AskUserQuestion: "Adopt the binding of `<mainCheckout>` (vault `<vaultPath>`)?" — Yes / No.
|
|
52
|
+
- On **Yes**: Write that JSON verbatim, without `channel_switch` and `channel_keep`, to `<project>/.projectstore/projectstore.json`, **and write `<project>/.projectstore/.gitignore` beside it** with the two lines `projectstore.json` and `state/` under a comment saying they are machine-local (the verb writes them itself on every other path; this one bypasses the verb, and without them the worktree commits an absolute vault path into the index it shares with its parent). If that file already exists, add any missing line and leave the rest — it is line-merged. Then **jump straight to step 10** (the summary). Steps 1–9 and 11 are decisions the parent already made and the copied config already carries — layout, language, statusline, agent models. Do not re-ask them, and do not scaffold: the vault exists and is shared.
|
|
53
53
|
- Copy the **binding only** (`projectstore.json`). Never copy `.projectstore/state/` — per-session state belonging to the other checkout — and never `harness/`: the overlays are committed and arrive from git.
|
|
54
|
+
- **Never copy `channel_switch` or `channel_keep`.** They record which channel the parent checkout chose — switched to the npm install, or kept on the git marketplace — a machine-local fact of that checkout's own registry rows, not of the binding it shares. Every other key is copied verbatim.
|
|
54
55
|
- Do not add a provenance key to the config. The parent is resolvable from git at any time; a key would be a second source of truth for the same fact.
|
|
55
56
|
|
|
56
|
-
1. **Validate the vault path** read-only first: `ls -
|
|
57
|
+
1. **Validate the vault path** read-only first: `ls -A "<path>"` (the verb has no dry run — running it on a fresh project would write the config before step 4's approval). If it does not exist, or exists and is empty, ask the user (via AskUserQuestion) whether to create the vault there; on Yes, step 5 runs `init` instead of `bind`. `init` creates the whole vault and binds: the directory (unless it is there and empty), its git repository with no commit, and the layout's folders and READMEs. Never `mkdir` it yourself. A directory that already holds files is bound with `bind`; `init` would bind it too, but never scaffolds or `git init`s inside it.
|
|
57
58
|
2. **Detect existing layout**: list immediate subdirectories. If you see `adr/`, `epics/`, `concepts/`, `research/` — the vault already uses an engineering-like layout; suggest `engineering`. Otherwise use the user's choice or `engineering` default.
|
|
58
59
|
3. **Build the config** as JSON:
|
|
59
60
|
|
|
@@ -80,15 +81,21 @@ Steps:
|
|
|
80
81
|
node "${CLAUDE_PLUGIN_ROOT}/bin/projectstore.mjs" bind "<vault-path>" [--layout <name>] [--language <code>] [--rebind]
|
|
81
82
|
```
|
|
82
83
|
|
|
83
|
-
`init "<vault-path>" …` instead when step 1 chose to create the vault; `--rebind` only when step 0 ended on **Replace bind**. Naming the vault is the verb's confirmation (there is no `--yes`); the interview's AskUserQuestion in step 4 is the in-session gate. Print the verb's output. A non-zero exit is a refusal or a usage error — relay it and stop
|
|
84
|
+
`init "<vault-path>" …` instead when step 1 chose to create the vault — it creates the whole vault, so step 7 has nothing to offer after it; `--rebind` only when step 0 ended on **Replace bind**. Naming the vault is the verb's confirmation (there is no `--yes`); the interview's AskUserQuestion in step 4 is the in-session gate. Print the verb's output. A non-zero exit is a refusal or a usage error — relay it and stop — except an `init` whose output reports `git init failed` or `Scaffold failed`: the binding is written, so relay the remedy line it prints and continue. Step 11 below `Edit`s the file this step wrote; keep it after it.
|
|
84
85
|
|
|
85
86
|
6. **Check `.gitignore`**: read `<project>/.gitignore` if it exists. Our own files are self-ignored inside `.projectstore/` — the verb writes that `.gitignore` itself, carrying `projectstore.json` and `state/`, with `harness/` committed on purpose (the layout ADR); on the inherit path of step 0a, which bypasses the verb, you wrote both by hand. Unless `.claude/` is ignored wholesale, the one machine-specific entry left is the host's `.claude/settings.local.json`. If it is missing, offer (AskUserQuestion) to append it. If the user declines, skip silently.
|
|
86
87
|
|
|
87
|
-
7. **Offer scaffold
|
|
88
|
+
7. **Offer scaffold** — after `bind` only; a vault `init` made is already scaffolded. Ask the core, which writes nothing here:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/projectstore.mjs" scaffold --json --project "${CLAUDE_PROJECT_DIR}"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Offer only when some `result.rows[]` entry has `action: "create"` — a layout folder or a README is missing. Ask via AskUserQuestion: "The vault is missing N of the layout's folders and READMEs (listed). Create them? Existing files are never rewritten." — **Yes** / **No**. On **Yes**, run `node "${CLAUDE_PLUGIN_ROOT}/bin/projectstore.mjs" scaffold --write --json --project "${CLAUDE_PROJECT_DIR}"` and report `result.created`. No `create` row: say nothing and continue.
|
|
88
95
|
|
|
89
96
|
7.5. **Vault policy** (v0.14, ADR-007 — vault-side, survives clones): check `<vault>/.projectstore.json`.
|
|
90
97
|
- If it already exists with a `spec_policy` key — respect it, print the current policy, do not re-ask.
|
|
91
|
-
- **New bind into
|
|
98
|
+
- **New bind into a vault with no artifacts** (a vault `init` just made counts: its folders and README indexes are not artifacts): ask via AskUserQuestion — "Enable spec-first policy for this vault (every story must be covered by a spec; doctor enforces it)?" with options **Yes, `spec_policy: required` (Recommended)** / **Not yet, `optional`**. Second question: "Enable lifecycle gates (plan/close sections + evidence checks on stories)?" — **Yes, `lifecycle_gates: on` (Recommended)** / **Off for now**.
|
|
92
99
|
- **Bind to an existing vault with artifacts**: default to `spec_policy: optional`, `lifecycle_gates: off` and say doctor will suggest enabling once specs appear. Do not impose the gate on an existing backlog.
|
|
93
100
|
- On any choice, write `<vault>/.projectstore.json` (vault ROOT — deliberately not inside `<vault>/.projectstore/`, whose .gitignore would keep the policy out of git):
|
|
94
101
|
|
|
@@ -108,18 +115,7 @@ Steps:
|
|
|
108
115
|
|
|
109
116
|
10. **Print summary**: confirm the bind, list the layout's folders, suggest next commands (`/projectstore:status`, `/projectstore:adr "<first decision>"`, `/projectstore:epic <ID> "<title>"`).
|
|
110
117
|
|
|
111
|
-
11. **
|
|
112
|
-
|
|
113
|
-
> "Claude Code does not auto-update third-party marketplaces by default. Want to enable auto-update for the SmartAndPoint marketplace so you'll be notified about future projectstore releases?"
|
|
114
|
-
|
|
115
|
-
Options:
|
|
116
|
-
- **Yes, show me how** (Recommended) — respond with: "Open `/plugin` → **Marketplaces** tab → **SmartAndPoint** → toggle **auto-update** on. New releases (v0.7+) will be detected at Claude Code startup; you'll need to run `/reload-plugins` after the notification to activate them."
|
|
117
|
-
- **No, I'll handle it manually** — respond with: "OK. To pull the latest version at any time, run `/plugin marketplace update SmartAndPoint`, then `/reload-plugins`."
|
|
118
|
-
- **Already enabled** — respond with: "Great. New releases will be detected at the next Claude Code startup."
|
|
119
|
-
|
|
120
|
-
After the question is answered (regardless of choice), Edit `<project>/.projectstore/projectstore.json` to add `"autoupdate_asked": true` to the JSON object. This guarantees we ask only once per project.
|
|
121
|
-
|
|
122
|
-
12. **Status line offer** (v0.13, ADR-006 — the final step, language is known by now): read `${CLAUDE_PLUGIN_ROOT}/templates/<lang>/strings.json` (fall back to `en`) and the plugin version, then show the fully rendered example:
|
|
118
|
+
11. **Status line offer** (v0.13, ADR-006 — the final step, language is known by now): read `${CLAUDE_PLUGIN_ROOT}/templates/<lang>/strings.json` (fall back to `en`) and the plugin version, then show the fully rendered example:
|
|
123
119
|
|
|
124
120
|
> `[PS#<version>] 📚 <statusline_example_epic> › <statusline_example_story> (in-progress)`
|
|
125
121
|
|
|
@@ -66,20 +66,25 @@ You are running projectstore diagnostics (ADR-005: umbrella doctor).
|
|
|
66
66
|
The verbs refuse it in code; this clause is the belt.
|
|
67
67
|
- `version-drift` → report only: name both versions and where each was
|
|
68
68
|
read; the fix is the host's update path (`/plugin update` for a git-marketplace
|
|
69
|
-
copy; for the npm registration, the
|
|
70
|
-
|
|
69
|
+
copy; for the npm registration, the package's `upgrade` from a terminal
|
|
70
|
+
in the project — the `plugin-registration` finding spells the command),
|
|
71
71
|
not ours.
|
|
72
72
|
- `layout-legacy` (warn; the startup line carries it as an offer) → the project
|
|
73
73
|
still holds the pre-0.28 layout (`.claude/projectstore.json`,
|
|
74
|
-
`.claude/.projectstore/` — legacy, read through 0.
|
|
74
|
+
`.claude/.projectstore/` — legacy, read through 0.30). The migration is one
|
|
75
75
|
previewed `layout` item of `upgrade`, run **from a terminal outside this
|
|
76
76
|
session** (it moves files this session reads and writes; the verb defers
|
|
77
77
|
inside one). The finding names the form for the channel this plugin was
|
|
78
78
|
installed through: the installed copy's own `bin/projectstore.mjs` for a
|
|
79
|
-
git-marketplace install or a checkout, the `
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
git-marketplace install or a checkout, the package's `upgrade` for the npm
|
|
80
|
+
registration. Relay the finding's command verbatim, with the directory its
|
|
81
|
+
words name, and never substitute the other form or drop its
|
|
82
|
+
`--no-register`. Both forms carry that flag, so neither changes the
|
|
83
|
+
channel: the named form runs the copy this project loads, so the move
|
|
84
|
+
re-stamps the launcher that copy renders, while the other form runs a
|
|
85
|
+
different copy. The package's `upgrade` without `--no-register` would
|
|
86
|
+
register the npm copy and turn a git-marketplace copy off for this
|
|
87
|
+
checkout. When the finding carries
|
|
83
88
|
advice instead of a command — the installed copy predates the move, or
|
|
84
89
|
predates `--no-register` — relay the advice and never compose a command
|
|
85
90
|
yourself. Never move the files yourself. While this finding is in the report, its command is also the one
|
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Scaffold the bound vault with the layout's folder structure and README index files.
|
|
3
|
-
argument-hint:
|
|
3
|
+
argument-hint: ""
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are creating the
|
|
6
|
+
You are creating the bound vault's layout folders and their README indexes through the core's `scaffold` verb. The layout and the language are the binding's; the folder names, the descriptions and every README come from the plugin's templates in that language, so a vault scaffolded here is byte-identical to one `init` made. Never create a folder or write a README yourself, and take no layout argument: `bind --rebind` changes the layout.
|
|
7
7
|
|
|
8
8
|
Steps:
|
|
9
9
|
|
|
10
|
-
1. **
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
1. **Plan** — nothing is written:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/projectstore.mjs" scaffold --project "${CLAUDE_PROJECT_DIR}"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
It prints one row per folder, per folder README and for the vault's own `README.md`, each `create` or `exists`.
|
|
17
|
+
- Exit 3: the project is not bound — tell the user to run `/projectstore:bind <vault-path>` and stop.
|
|
18
|
+
- Exit 1: a refusal — the bound vault directory is missing, the binding's language lacks a template or a folder string, or a folder's path is a file. Relay the message and stop.
|
|
19
|
+
- No `create` row: say the vault already has every folder and README the layout declares, and stop.
|
|
20
|
+
|
|
21
|
+
2. **Ask** via AskUserQuestion, showing the plan's `create` rows: "Create these folders and READMEs in the vault? Existing files are never rewritten." — **Yes** / **No**. On **No**, stop: nothing is written.
|
|
22
|
+
|
|
23
|
+
3. **Write**, on **Yes**:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/projectstore.mjs" scaffold --write --json --project "${CLAUDE_PROJECT_DIR}"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The question above is the confirmation; `--json` never asks again. Report `result.created`, and how many rows `result.exists` left as they were. A non-zero exit is an error: relay it.
|
|
30
|
+
|
|
31
|
+
4. **Next**: the folder indexes fill as artifacts are created; `/projectstore:reconcile` regenerates the board and the other derived views when you want them.
|
|
@@ -22,6 +22,6 @@ Steps:
|
|
|
22
22
|
|
|
23
23
|
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 (Claude'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)."
|
|
24
24
|
|
|
25
|
-
6. Suggest the next command from what you saw: `stories.total` is 0 → "
|
|
25
|
+
6. Suggest the next command from what you saw: `stories.total` is 0 → "No stories yet — `/projectstore:epic <ID> "<title>"` opens the first epic" (a vault `init` made has its folders; `/projectstore:scaffold` is for one bound without them, and its plan says which are missing); any view stale or missing → "Stale views — try `/projectstore:reconcile`"; something in progress → name it and suggest `/projectstore:story` to continue.
|
|
26
26
|
|
|
27
27
|
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.
|
|
@@ -3,9 +3,9 @@ description: Enable/disable the projectstore status line (current epic & story i
|
|
|
3
3
|
argument-hint: "on | off | status"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are toggling the projectstore status line for THIS project. When enabled, `install-harness.mjs` points the project's `.claude/settings.local.json` at a launcher it writes at `.projectstore/state/claude-code/statusline.mjs`. That path carries no version, so it never goes stale: the launcher resolves the *currently installed* plugin on every render, and an update is reflected on the spot instead of one restart later. (A dev checkout or `--plugin-dir` root is wired straight to its `scripts/statusline.mjs` — those paths have no version to drift.) The line renders `[PS#<version>] 📚 <epic> › <story> (<status>)` **composed above** any existing HUD (e.g. oh-my-claudecode), never replacing it.
|
|
6
|
+
You are toggling the projectstore status line for THIS project. When enabled, `install-harness.mjs` points the project's `.claude/settings.local.json` at a launcher it writes at `.projectstore/state/claude-code/statusline.mjs`. That path carries no version, so it never goes stale: the launcher resolves the *currently installed* plugin on every render, and an update is reflected on the spot instead of one restart later. (A dev checkout or `--plugin-dir` root is wired straight to its `scripts/statusline.mjs` — those paths have no version to drift.) The line renders `[PS#<version>] 📚 <epic> › <story> (<status>)` **composed above** any existing HUD (e.g. oh-my-claudecode), never replacing it. While this session's band above the prompt is drawing (`/projectstore:bar`), the line gives way to it — your base HUD stays — and it comes back within 30 s of the band stopping.
|
|
7
7
|
|
|
8
|
-
Resolution is **per-session with zero cross-session and zero vault reads** (ADR-006): the 📚 segment comes from this session's pointer (`.projectstore/state/sessions/<session_id>.json`, maintained by the
|
|
8
|
+
Resolution is **per-session with zero cross-session and zero vault reads** (ADR-006): the 📚 segment comes from this session's pointer (`.projectstore/state/sessions/<session_id>.json`, maintained by the tool hooks — a write's patch after the write — by `story close`, and at session start; a done, closed or parked story leaves the segment); a fresh session shows an explicit localized cold-start line ("No epic or story in this session yet" / «Эпик и стори ещё не в работе в этой сессии») — never a silent blank; a corrupt pointer shows an error-marked string. Strings localize via `templates/<lang>/strings.json` (en fallback). The version badge is controlled by `statusline.show_version` (default true).
|
|
9
9
|
|
|
10
10
|
This command flips the flag in `.projectstore/projectstore.json` and then runs the install verb, which writes `settings.local.json` and the launcher behind a preview. The SessionStart hook only refreshes an entry that is already ours and removes it when the flag is off — it never creates one.
|
|
11
11
|
|
|
@@ -92,11 +92,11 @@ the two cannot collide).
|
|
|
92
92
|
<baseline-path>`), the derived targets (`kanban`, plus `indexes=<epic
|
|
93
93
|
folder>` when status changed), and the doctor pre-state line. On a clean
|
|
94
94
|
report (`verbatim: true`, `stopped_at: null`, doctor no worse than the
|
|
95
|
-
pre-state) skip steps 6-6b — the clerk's report is the write evidence. On a
|
|
95
|
+
pre-state) skip steps 6-6b and run step 6c — the clerk's report is the write evidence. On a
|
|
96
96
|
stopped report: fix what diverged, then re-delegate (the resume rule: after
|
|
97
97
|
the copy, the ceremony restarts at reconcile, not at the race gate) or
|
|
98
98
|
finish the remaining steps yourself (the copy is idempotent).
|
|
99
|
-
- No clerk available → perform steps 6-
|
|
99
|
+
- No clerk available → perform steps 6-6c yourself. There is no fallback
|
|
100
100
|
agent: a general-purpose writer is an unpinned procedure.
|
|
101
101
|
|
|
102
102
|
6. **On Yes** (undelegated path): Write the full file. On a `plan`, finish by
|
|
@@ -111,3 +111,16 @@ the two cannot collide).
|
|
|
111
111
|
— a close is not done while doctor got worse. Then suggest the reviewer's
|
|
112
112
|
proposed `code_refs` via `/projectstore:codemap set` (the reviewer computes it
|
|
113
113
|
from `scripts/diff-refs.mjs --since <started_at>`).
|
|
114
|
+
|
|
115
|
+
6c. **(close only, both paths) Refresh this session's story**, here in the
|
|
116
|
+
main thread, after the clerk's clean report or after 6b:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/projectstore.mjs" session refresh "<story-path>" --json --project "${CLAUDE_PROJECT_DIR}"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
`<story-path>` is the absolute `path` the compute script returned in
|
|
123
|
+
step 2. The copy went through Bash, which no hook sees, so without this the
|
|
124
|
+
session's band and status line keep naming the closed story. The core finds
|
|
125
|
+
the session itself; with none it writes nothing and exits 0. A non-zero
|
|
126
|
+
exit is reported and never undoes the close.
|