projectstore-claude 0.0.1 → 0.28.0-rc.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.
- package/README.md +11 -7
- package/bin/projectstore-claude.mjs +85 -0
- package/node_modules/projectstore/.claude-plugin/marketplace.json +40 -0
- package/node_modules/projectstore/.claude-plugin/plugin.json +23 -0
- package/node_modules/projectstore/.mcp.json +14 -0
- package/node_modules/projectstore/AGENTS.md +26 -0
- package/node_modules/projectstore/LICENSE +21 -0
- package/node_modules/projectstore/README.md +208 -0
- package/node_modules/projectstore/agents/archaeologist.md +76 -0
- package/node_modules/projectstore/agents/clerk.md +93 -0
- package/node_modules/projectstore/agents/critic.md +94 -0
- package/node_modules/projectstore/agents/librarian.md +81 -0
- package/node_modules/projectstore/agents/planner.md +80 -0
- package/node_modules/projectstore/agents/reviewer.md +98 -0
- package/node_modules/projectstore/bin/projectstore.mjs +7 -0
- package/node_modules/projectstore/commands/adr.md +57 -0
- package/node_modules/projectstore/commands/agents.md +174 -0
- package/node_modules/projectstore/commands/bind.md +128 -0
- package/node_modules/projectstore/commands/codemap.md +50 -0
- package/node_modules/projectstore/commands/concept.md +17 -0
- package/node_modules/projectstore/commands/doctor.md +147 -0
- package/node_modules/projectstore/commands/epic.md +40 -0
- package/node_modules/projectstore/commands/graph.md +56 -0
- package/node_modules/projectstore/commands/kanban.md +40 -0
- package/node_modules/projectstore/commands/meeting.md +17 -0
- package/node_modules/projectstore/commands/reconcile.md +73 -0
- package/node_modules/projectstore/commands/research.md +17 -0
- package/node_modules/projectstore/commands/review.md +89 -0
- package/node_modules/projectstore/commands/runbook.md +17 -0
- package/node_modules/projectstore/commands/scaffold.md +23 -0
- package/node_modules/projectstore/commands/search.md +22 -0
- package/node_modules/projectstore/commands/spec.md +91 -0
- package/node_modules/projectstore/commands/status.md +27 -0
- package/node_modules/projectstore/commands/statusline.md +46 -0
- package/node_modules/projectstore/commands/story.md +113 -0
- package/node_modules/projectstore/docs/extending.md +172 -0
- package/node_modules/projectstore/docs/getting-started.md +133 -0
- package/node_modules/projectstore/docs/how-it-works.md +263 -0
- package/node_modules/projectstore/docs/images/loop-light.svg +94 -0
- package/node_modules/projectstore/docs/images/loop.svg +93 -0
- package/node_modules/projectstore/docs/images/statusline-hud.png +0 -0
- package/node_modules/projectstore/docs/images/team-light.svg +79 -0
- package/node_modules/projectstore/docs/images/team.svg +79 -0
- package/node_modules/projectstore/harnesses/claude-code.json +469 -0
- package/node_modules/projectstore/hooks/hooks.json +59 -0
- package/node_modules/projectstore/hooks/pre-compact.mjs +115 -0
- package/node_modules/projectstore/hooks/session-rules.mjs +53 -0
- package/node_modules/projectstore/hooks/session-start.mjs +291 -0
- package/node_modules/projectstore/hooks/session-stop.mjs +78 -0
- package/node_modules/projectstore/package.json +68 -0
- package/node_modules/projectstore/scaffold/checklists.json +88 -0
- package/node_modules/projectstore/scaffold/headings.json +171 -0
- package/node_modules/projectstore/scaffold/layouts/engineering.json +85 -0
- package/node_modules/projectstore/scripts/binding.mjs +165 -0
- package/node_modules/projectstore/scripts/cli.mjs +568 -0
- package/node_modules/projectstore/scripts/codemap.mjs +99 -0
- package/node_modules/projectstore/scripts/diff-refs.mjs +117 -0
- package/node_modules/projectstore/scripts/doctor.mjs +1913 -0
- package/node_modules/projectstore/scripts/draft.mjs +261 -0
- package/node_modules/projectstore/scripts/graph.mjs +219 -0
- package/node_modules/projectstore/scripts/harness.mjs +484 -0
- package/node_modules/projectstore/scripts/install-harness.mjs +854 -0
- package/node_modules/projectstore/scripts/kanban.mjs +174 -0
- package/node_modules/projectstore/scripts/lib.mjs +2901 -0
- package/node_modules/projectstore/scripts/mcp.mjs +391 -0
- package/node_modules/projectstore/scripts/provenance.mjs +375 -0
- package/node_modules/projectstore/scripts/query.mjs +490 -0
- package/node_modules/projectstore/scripts/reconcile.mjs +422 -0
- package/node_modules/projectstore/scripts/statusline-launcher.mjs +141 -0
- package/node_modules/projectstore/scripts/statusline.mjs +253 -0
- package/node_modules/projectstore/scripts/story-section.mjs +209 -0
- package/node_modules/projectstore/scripts/surfaces.mjs +372 -0
- package/node_modules/projectstore/scripts/tokens.mjs +449 -0
- package/node_modules/projectstore/scripts/touch-session.mjs +325 -0
- package/node_modules/projectstore/scripts/version-guard.mjs +241 -0
- package/node_modules/projectstore/scripts/worktree.mjs +109 -0
- package/node_modules/projectstore/skills/decision-detector/SKILL.md +39 -0
- package/node_modules/projectstore/skills/peer-reviewer/SKILL.md +37 -0
- package/node_modules/projectstore/skills/story-completion/SKILL.md +49 -0
- package/node_modules/projectstore/skills/vault-communication/SKILL.md +95 -0
- package/node_modules/projectstore/templates/claude-md-block.md.tmpl +26 -0
- package/node_modules/projectstore/templates/de/adr.md.tmpl +67 -0
- package/node_modules/projectstore/templates/de/concept.md.tmpl +43 -0
- package/node_modules/projectstore/templates/de/epic.md.tmpl +59 -0
- package/node_modules/projectstore/templates/de/folder-readme.md.tmpl +14 -0
- package/node_modules/projectstore/templates/de/kanban.md.tmpl +36 -0
- package/node_modules/projectstore/templates/de/meeting.md.tmpl +38 -0
- package/node_modules/projectstore/templates/de/research.md.tmpl +47 -0
- package/node_modules/projectstore/templates/de/runbook.md.tmpl +53 -0
- package/node_modules/projectstore/templates/de/spec.md.tmpl +64 -0
- package/node_modules/projectstore/templates/de/story.md.tmpl +76 -0
- package/node_modules/projectstore/templates/de/strings.json +6 -0
- package/node_modules/projectstore/templates/en/adr.md.tmpl +67 -0
- package/node_modules/projectstore/templates/en/concept.md.tmpl +43 -0
- package/node_modules/projectstore/templates/en/epic.md.tmpl +59 -0
- package/node_modules/projectstore/templates/en/folder-readme.md.tmpl +14 -0
- package/node_modules/projectstore/templates/en/kanban.md.tmpl +36 -0
- package/node_modules/projectstore/templates/en/meeting.md.tmpl +38 -0
- package/node_modules/projectstore/templates/en/research.md.tmpl +47 -0
- package/node_modules/projectstore/templates/en/runbook.md.tmpl +53 -0
- package/node_modules/projectstore/templates/en/spec.md.tmpl +64 -0
- package/node_modules/projectstore/templates/en/story.md.tmpl +76 -0
- package/node_modules/projectstore/templates/en/strings.json +6 -0
- package/node_modules/projectstore/templates/es/adr.md.tmpl +67 -0
- package/node_modules/projectstore/templates/es/concept.md.tmpl +43 -0
- package/node_modules/projectstore/templates/es/epic.md.tmpl +59 -0
- package/node_modules/projectstore/templates/es/folder-readme.md.tmpl +14 -0
- package/node_modules/projectstore/templates/es/kanban.md.tmpl +36 -0
- package/node_modules/projectstore/templates/es/meeting.md.tmpl +38 -0
- package/node_modules/projectstore/templates/es/research.md.tmpl +47 -0
- package/node_modules/projectstore/templates/es/runbook.md.tmpl +53 -0
- package/node_modules/projectstore/templates/es/spec.md.tmpl +64 -0
- package/node_modules/projectstore/templates/es/story.md.tmpl +76 -0
- package/node_modules/projectstore/templates/es/strings.json +6 -0
- package/node_modules/projectstore/templates/fr/adr.md.tmpl +67 -0
- package/node_modules/projectstore/templates/fr/concept.md.tmpl +43 -0
- package/node_modules/projectstore/templates/fr/epic.md.tmpl +59 -0
- package/node_modules/projectstore/templates/fr/folder-readme.md.tmpl +14 -0
- package/node_modules/projectstore/templates/fr/kanban.md.tmpl +36 -0
- package/node_modules/projectstore/templates/fr/meeting.md.tmpl +38 -0
- package/node_modules/projectstore/templates/fr/research.md.tmpl +47 -0
- package/node_modules/projectstore/templates/fr/runbook.md.tmpl +53 -0
- package/node_modules/projectstore/templates/fr/spec.md.tmpl +64 -0
- package/node_modules/projectstore/templates/fr/story.md.tmpl +76 -0
- package/node_modules/projectstore/templates/fr/strings.json +6 -0
- package/node_modules/projectstore/templates/ru/adr.md.tmpl +67 -0
- package/node_modules/projectstore/templates/ru/concept.md.tmpl +43 -0
- package/node_modules/projectstore/templates/ru/epic.md.tmpl +59 -0
- package/node_modules/projectstore/templates/ru/folder-readme.md.tmpl +14 -0
- package/node_modules/projectstore/templates/ru/kanban.md.tmpl +36 -0
- package/node_modules/projectstore/templates/ru/meeting.md.tmpl +38 -0
- package/node_modules/projectstore/templates/ru/research.md.tmpl +47 -0
- package/node_modules/projectstore/templates/ru/runbook.md.tmpl +53 -0
- package/node_modules/projectstore/templates/ru/spec.md.tmpl +64 -0
- package/node_modules/projectstore/templates/ru/story.md.tmpl +76 -0
- package/node_modules/projectstore/templates/ru/strings.json +6 -0
- package/node_modules/projectstore/templates/zh/adr.md.tmpl +67 -0
- package/node_modules/projectstore/templates/zh/concept.md.tmpl +43 -0
- package/node_modules/projectstore/templates/zh/epic.md.tmpl +59 -0
- package/node_modules/projectstore/templates/zh/folder-readme.md.tmpl +14 -0
- package/node_modules/projectstore/templates/zh/kanban.md.tmpl +36 -0
- package/node_modules/projectstore/templates/zh/meeting.md.tmpl +38 -0
- package/node_modules/projectstore/templates/zh/research.md.tmpl +47 -0
- package/node_modules/projectstore/templates/zh/runbook.md.tmpl +53 -0
- package/node_modules/projectstore/templates/zh/spec.md.tmpl +64 -0
- package/node_modules/projectstore/templates/zh/story.md.tmpl +76 -0
- package/node_modules/projectstore/templates/zh/strings.json +6 -0
- package/package.json +31 -13
package/README.md
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
# projectstore-claude
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Claude Code installer for [projectstore](https://www.npmjs.com/package/projectstore): the core, pinned at exactly this version and bundled inside this tarball, with the harness fixed. One command, from a terminal **outside** a Claude Code session:
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
|
|
6
|
+
npx projectstore-claude install --project "$PWD"
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
It registers the plugin for that checkout at the host's local scope, previews every write and every host command before it runs, and asks for nothing else — naming the shell is the confirmation. Restart Claude Code afterwards.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
- Upgrade, or pin: `npx projectstore-claude@<version> upgrade --project "$PWD"` — the version you name is the version you run.
|
|
12
|
+
- Uninstall: `npx projectstore-claude uninstall --project "$PWD"` — forgets the registration for that checkout and nothing else; your vault is plain markdown and stays yours.
|
|
13
|
+
- `doctor`, `status`, `search` and the other read verbs pass through unchanged: `npx projectstore-claude doctor --json`.
|
|
14
14
|
|
|
15
|
+
This shell is `projectstore <verb> --harness claude-code` and nothing more. `bin/projectstore-claude.mjs` locates the bundled core under `node_modules/projectstore/` and execs it; the core's low-level form — `npx projectstore install --harness claude-code --project "$PWD"` — is exactly what runs. A different `--harness` is refused (exit 2). The shell carries no plugin of its own: the plugin Claude Code loads is the bundled core, registered through a small local marketplace under your Claude home.
|
|
16
|
+
|
|
17
|
+
Why from a terminal: the host CLI and a live session both rewrite the same settings files, so the core defers the registration inside a session and says so.
|
|
18
|
+
|
|
19
|
+
- Docs: https://github.com/SmartAndPoint/ProjectStore#install--one-message
|
|
15
20
|
- Source: https://github.com/SmartAndPoint/ProjectStore
|
|
16
21
|
- Issues: https://github.com/SmartAndPoint/ProjectStore/issues
|
|
17
|
-
- Author: Evgenii Konev (SmartAndPoint)
|
|
18
22
|
|
|
19
23
|
MIT licensed.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// projectstore-claude — the Claude Code distribution shell of projectstore.
|
|
3
|
+
// RENDERED by packaging/shells.mjs from its template: edit the template, then
|
|
4
|
+
// `node packaging/shells.mjs --write`. A hand edit here fails --check.
|
|
5
|
+
//
|
|
6
|
+
// A shell is a bin and a pin, never logic (the layout spec, contract 10): this
|
|
7
|
+
// file locates the core the tarball bundles and execs it with
|
|
8
|
+
// `--harness claude-code` inserted after a verb that takes it. Every other
|
|
9
|
+
// argument passes through, so `projectstore-claude <verb> …` is exactly
|
|
10
|
+
// `projectstore <verb> --harness claude-code …` — the same preview, the
|
|
11
|
+
// same files, the same exit code. Naming the shell is the confirmation the
|
|
12
|
+
// core's install gate asks for, exactly as naming --harness is.
|
|
13
|
+
import { existsSync } from "node:fs";
|
|
14
|
+
import { spawnSync } from "node:child_process";
|
|
15
|
+
import { constants as osConstants } from "node:os";
|
|
16
|
+
import { resolve, dirname } from "node:path";
|
|
17
|
+
import { fileURLToPath } from "node:url";
|
|
18
|
+
|
|
19
|
+
const SHELL = "projectstore-claude";
|
|
20
|
+
const HARNESS = "claude-code";
|
|
21
|
+
// The verbs of the core's table that declare --harness (rendered from
|
|
22
|
+
// scripts/cli.mjs; the packaging test pins it). Any other verb — doctor,
|
|
23
|
+
// status, search, --version — passes through untouched: the core refuses an
|
|
24
|
+
// option a verb does not declare, so a blanket insert would break `doctor`.
|
|
25
|
+
const HARNESS_VERBS = new Set(["plan","install","uninstall","upgrade","agents"]);
|
|
26
|
+
|
|
27
|
+
// The bundled core, by path — never by package resolution: a hoisted or global
|
|
28
|
+
// copy at another version is exactly the pairing the pin exists to prevent,
|
|
29
|
+
// and the core's file layout is not an API (the shells ADR, decision 5).
|
|
30
|
+
const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
31
|
+
const CANDIDATES = [
|
|
32
|
+
resolve(root, "node_modules", "projectstore", "bin", "projectstore.mjs"), // bundled — the release shape
|
|
33
|
+
resolve(root, "core", "bin", "projectstore.mjs"), // vendored — the shells ADR's fallback
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
// Inserts --harness after the verb (the first positional) when that verb takes
|
|
37
|
+
// it; refuses another harness; never duplicates one already given. Scans up to
|
|
38
|
+
// a bare "--". A verb that is not the first positional (`--project x install`)
|
|
39
|
+
// is left alone: the core then asks for --harness itself, a usage error, never
|
|
40
|
+
// a wrong write.
|
|
41
|
+
function fixHarness(argv) {
|
|
42
|
+
const stop = argv.indexOf("--");
|
|
43
|
+
const scan = stop === -1 ? argv : argv.slice(0, stop);
|
|
44
|
+
const given = [];
|
|
45
|
+
const dangling = { error: `\`--harness\` is given without a value — this shell fixes it to ${HARNESS}; drop the flag` };
|
|
46
|
+
for (let i = 0; i < scan.length; i++) {
|
|
47
|
+
if (scan[i] === "--harness") {
|
|
48
|
+
const v = scan[i + 1];
|
|
49
|
+
if (v === undefined || v.startsWith("-")) return dangling;
|
|
50
|
+
given.push(v); i++;
|
|
51
|
+
} else if (scan[i].startsWith("--harness=")) {
|
|
52
|
+
const v = scan[i].slice("--harness=".length);
|
|
53
|
+
if (!v) return dangling;
|
|
54
|
+
given.push(v);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const other = given.find((g) => g !== HARNESS);
|
|
58
|
+
if (other !== undefined) return { error: `installs for ${HARNESS} only — \`--harness ${other}\` names another harness. Run that harness's shell, or the core: npx projectstore <verb> --harness ${other} …` };
|
|
59
|
+
if (given.length) return { argv }; // named already: pass through, never twice (the core's option repeats)
|
|
60
|
+
const at = scan.findIndex((a) => !a.startsWith("-"));
|
|
61
|
+
if (at === -1 || !HARNESS_VERBS.has(scan[at])) return { argv };
|
|
62
|
+
return { argv: [...argv.slice(0, at + 1), "--harness", HARNESS, ...argv.slice(at + 1)] };
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const core = CANDIDATES.find((p) => existsSync(p));
|
|
66
|
+
if (!core) {
|
|
67
|
+
process.stderr.write(`${SHELL}: the bundled core is missing — looked at:\n${CANDIDATES.map((c) => " " + c).join("\n")}\n`);
|
|
68
|
+
process.exitCode = 2;
|
|
69
|
+
} else {
|
|
70
|
+
const fixed = fixHarness(process.argv.slice(2));
|
|
71
|
+
if (fixed.error) {
|
|
72
|
+
process.stderr.write(`${SHELL}: ${fixed.error}\n`);
|
|
73
|
+
process.exitCode = 2;
|
|
74
|
+
} else {
|
|
75
|
+
// stdio inherited: the core's install gate asks on a terminal and refuses
|
|
76
|
+
// without one, so the child must see the real stdin and stdout. No
|
|
77
|
+
// timeout — the child waits on a human at the preview. exitCode, not
|
|
78
|
+
// exit(): the core's own bin says why (a pending write on a pipe).
|
|
79
|
+
const r = spawnSync(process.execPath, [core, ...fixed.argv], { stdio: "inherit" });
|
|
80
|
+
if (r.error) process.stderr.write(`${SHELL}: ${r.error.message}\n`);
|
|
81
|
+
// A signal is relayed the shell way (128 + its number): Ctrl-C at the
|
|
82
|
+
// preview is 130 here as it would be on the core itself.
|
|
83
|
+
process.exitCode = r.status ?? (r.signal ? 128 + (osConstants.signals[r.signal] || 0) : 2);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
|
|
3
|
+
"name": "SmartAndPoint",
|
|
4
|
+
"description": "Claude Code plugins by SmartAndPoint.",
|
|
5
|
+
"owner": {
|
|
6
|
+
"name": "Evgenii Konev",
|
|
7
|
+
"email": "ekonev@smartandpoint.com",
|
|
8
|
+
"url": "https://github.com/SmartAndPoint"
|
|
9
|
+
},
|
|
10
|
+
"plugins": [
|
|
11
|
+
{
|
|
12
|
+
"name": "projectstore",
|
|
13
|
+
"displayName": "projectstore",
|
|
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.28.0-rc.2",
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Evgenii Konev",
|
|
18
|
+
"email": "ekonev@smartandpoint.com",
|
|
19
|
+
"url": "https://github.com/SmartAndPoint"
|
|
20
|
+
},
|
|
21
|
+
"category": "productivity",
|
|
22
|
+
"homepage": "https://github.com/SmartAndPoint/ProjectStore",
|
|
23
|
+
"tags": [
|
|
24
|
+
"obsidian",
|
|
25
|
+
"markdown",
|
|
26
|
+
"adr",
|
|
27
|
+
"epics",
|
|
28
|
+
"stories",
|
|
29
|
+
"kanban",
|
|
30
|
+
"knowledge-base",
|
|
31
|
+
"engineering-process",
|
|
32
|
+
"llm-wiki"
|
|
33
|
+
],
|
|
34
|
+
"source": {
|
|
35
|
+
"source": "github",
|
|
36
|
+
"repo": "SmartAndPoint/ProjectStore"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "projectstore",
|
|
3
|
+
"displayName": "projectstore",
|
|
4
|
+
"version": "0.28.0-rc.2",
|
|
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
|
+
"author": {
|
|
7
|
+
"name": "Evgenii Konev @ SmartAndPoint",
|
|
8
|
+
"email": "ekonev@smartandpoint.com",
|
|
9
|
+
"url": "https://github.com/SmartAndPoint"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/SmartAndPoint/ProjectStore",
|
|
12
|
+
"repository": "https://github.com/SmartAndPoint/ProjectStore",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"project-management",
|
|
16
|
+
"adr",
|
|
17
|
+
"epics",
|
|
18
|
+
"kanban",
|
|
19
|
+
"obsidian",
|
|
20
|
+
"markdown",
|
|
21
|
+
"engineering-process"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- projectstore:agents v4 (managed by projectstore — edit outside markers) -->
|
|
2
|
+
## projectstore agents
|
|
3
|
+
|
|
4
|
+
- **A feature-sized request opens a vault artifact before it opens an editor.**
|
|
5
|
+
Analysis → placement (which epic, which story) → an ADR and/or spec when the
|
|
6
|
+
"how" is non-trivial → `projectstore:critic` → only then implementation →
|
|
7
|
+
`projectstore:reviewer`. "Feature-sized" is not a judgement about how the
|
|
8
|
+
request was phrased — it is about what the work touches: if you are about to
|
|
9
|
+
write across several source files, open the story first.
|
|
10
|
+
- **Report instruction conflicts; do not arbitrate them.** If a session-level or
|
|
11
|
+
harness-level instruction contradicts this block, say so and ask which wins.
|
|
12
|
+
Resolving it silently is how the contradiction becomes invisible to the person
|
|
13
|
+
who could have settled it.
|
|
14
|
+
- When spawning any agent below, resolve its model from
|
|
15
|
+
`.projectstore/harness/<harness>.json` → `agents.per_agent.<name>.model ?? agents.default.model`,
|
|
16
|
+
where `<name>` is the **bare** agent name (`critic` for `projectstore:critic`),
|
|
17
|
+
and pass it as the spawn's model parameter. No key — pass nothing.
|
|
18
|
+
- After authoring or revising any vault artifact (ADR/research/epic/story) or
|
|
19
|
+
design proposal: run the `projectstore:critic` agent on it before treating it final.
|
|
20
|
+
- Before implementing an epic/story: consult `projectstore:planner` — it plans
|
|
21
|
+
against how prior epics map to the codebase (`code_refs`).
|
|
22
|
+
- After writing code, before commit / story-done: run `projectstore:reviewer` —
|
|
23
|
+
it verifies the diff actually closes the story's acceptance criteria.
|
|
24
|
+
- When discussing vault contents, reference artifacts by their frontmatter
|
|
25
|
+
`title:` (with their parent epic), never by session-invented shorthand.
|
|
26
|
+
<!-- /projectstore:agents -->
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SmartAndPoint
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# ProjectStore
|
|
2
|
+
|
|
3
|
+
> Not a memory plugin. ProjectStore is how your AI agent runs the *project* — decisions, specs, epics, stories and a kanban board as plain markdown in git — so the next agent, the next model, or you in six months know exactly **why** everything is the way it is.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/SmartAndPoint/ProjectStore/releases) [](./LICENSE) [](https://github.com/SmartAndPoint/ProjectStore/stargazers)
|
|
6
|
+
|
|
7
|
+
A [Claude Code](https://claude.com/claude-code) plugin.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Two months of agents, and nobody knows why
|
|
12
|
+
|
|
13
|
+
Agents write code fast. They re-decide settled questions even faster: every fresh session arrives empty, makes its own architectural call, and commits under its own assumptions. Two months later you have noodle code — every strand reviews fine on its own, and each was written under a different theory of the project. Ask *"why is this a queue and not a cron job?"* and nobody can answer. The agent that decided is long gone.
|
|
14
|
+
|
|
15
|
+
The fix is not a smarter agent. It is a loop with verification in it.
|
|
16
|
+
|
|
17
|
+
## The loop
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
<picture>
|
|
22
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/loop.svg">
|
|
23
|
+
<img alt="The ProjectStore loop: task → artifact → critic (verify) → backlog → planner → implement → reviewer (verify) → done → views regenerate" src="docs/images/loop-light.svg">
|
|
24
|
+
</picture>
|
|
25
|
+
|
|
26
|
+
1. **You hand the agent a task.** It opens an artifact before it opens an editor: an ADR if something needs deciding, an epic and stories for the work, a spec when the "how" is non-trivial.
|
|
27
|
+
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
|
+
3. The fixed artifact lands in the **backlog**; the kanban regenerates itself.
|
|
29
|
+
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. A **reviewer** matches the diff against the story's acceptance criteria — per criterion, with evidence — before anything gets called done.
|
|
31
|
+
6. **Done.** Board, link graph and code map regenerate. The next session starts oriented instead of guessing.
|
|
32
|
+
|
|
33
|
+
Mechanisms hold this together, not discipline: an agent that starts coding with no story open gets nudged, artifacts are not final before review, 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
|
+
|
|
35
|
+
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
|
+
|
|
37
|
+
## What lands on disk
|
|
38
|
+
|
|
39
|
+
Say *"let's go with Postgres, not Mongo — we need transactions"*, approve the draft, and a real file lands:
|
|
40
|
+
|
|
41
|
+
```markdown
|
|
42
|
+
---
|
|
43
|
+
title: "Use Postgres for primary storage"
|
|
44
|
+
status: accepted
|
|
45
|
+
date: 2026-07-03
|
|
46
|
+
---
|
|
47
|
+
## Context
|
|
48
|
+
We need ACID transactions for order processing...
|
|
49
|
+
## Decision
|
|
50
|
+
Postgres 16 as the primary store...
|
|
51
|
+
## Alternatives Considered
|
|
52
|
+
### MongoDB — rejected because...
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Six months later, *"why Postgres?"* has an answer with a date and the alternatives you rejected. Stories work the same way — status in frontmatter, board generated from it — and your status line always shows what *this* session is working on:
|
|
56
|
+
|
|
57
|
+

|
|
58
|
+
|
|
59
|
+
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
|
+
|
|
61
|
+
## Install — one message
|
|
62
|
+
|
|
63
|
+
Open Claude Code in your project and say:
|
|
64
|
+
|
|
65
|
+
> Install the projectstore plugin from https://github.com/SmartAndPoint/ProjectStore and set it up for this project.
|
|
66
|
+
|
|
67
|
+
That's the whole setup. Claude adds the marketplace, installs the plugin, and walks you through binding a vault, scaffolding it and wiring the status line — every step previewed, nothing written without your Yes.
|
|
68
|
+
|
|
69
|
+
<details>
|
|
70
|
+
<summary>Prefer to type it yourself?</summary>
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
/plugin marketplace add SmartAndPoint/ProjectStore
|
|
74
|
+
/plugin install projectstore@SmartAndPoint
|
|
75
|
+
/reload-plugins
|
|
76
|
+
/projectstore:bind ~/Documents/my-project-vault
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
One switch worth flipping: Claude Code does **not** auto-update third-party plugins by default — `/plugin` → **Marketplaces** → **SmartAndPoint** → toggle **auto-update** on. If you skip it, `/projectstore:doctor` will remind you later with the exact setting.
|
|
80
|
+
|
|
81
|
+
Contributors: `git clone` this repo, then `claude --plugin-dir ./ProjectStore`.
|
|
82
|
+
|
|
83
|
+
**Or from npm, in one command** — from a terminal, not inside a Claude Code session:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
npx projectstore-claude install --project "$PWD"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
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. Every host command is printed before it runs; naming the harness is the confirmation. 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.
|
|
90
|
+
|
|
91
|
+
The package also carries a `bin`. Without a session — in CI, or in a shell — the same core answers token-free, with a `--json` envelope on every verb:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
npx projectstore doctor --json
|
|
95
|
+
npx projectstore install --harness claude-code # the low-level form the shell runs: previews, then writes the agents block and the status line; naming the harness is the confirmation, there is no --yes
|
|
96
|
+
npx projectstore reconcile --write --only kanban
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Reads too — the same facts the agents get over MCP:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
npx projectstore status --json
|
|
103
|
+
npx projectstore search "entry rule" --kind spec
|
|
104
|
+
npx projectstore show adr/README.md --section index
|
|
105
|
+
npx projectstore graph neighbors epics/PS-CORE/epic.md
|
|
106
|
+
npx projectstore codemap --for scripts/lib.mjs
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The same eight reads are an MCP server. The plugin registers it through its own `.mcp.json`, so a Claude Code session has `status`, `search`, `get_artifact`, `neighbors`, `lineage`, `code_refs`, `orientation` and `doctor` as tools with no shell; every tool result is the CLI's `--json` for the same arguments. Elsewhere:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
npx projectstore mcp --project "$PWD"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Binding, too — naming the vault is the confirmation, and changing it needs `--rebind`:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
npx projectstore bind ~/vaults/my-project
|
|
119
|
+
npx projectstore init ~/vaults/new-project --language ru
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
`projectstore-claude`, `projectstore-codex` and `projectstore-opencode` on npm are this package's per-harness shells — the core pinned and bundled, the harness fixed; the Codex and opencode shells publish once their plugin roots are rendered. The other `projectstore-*` names are reserved placeholders pointing back here. One source package, one version, N published tarballs.
|
|
123
|
+
</details>
|
|
124
|
+
|
|
125
|
+
## Upgrading
|
|
126
|
+
|
|
127
|
+
`/plugin update` (or auto-update) and a restart is the whole procedure. What
|
|
128
|
+
an existing project sees afterwards, and why:
|
|
129
|
+
|
|
130
|
+
- **The status line keeps rendering.** A launcher written by an earlier
|
|
131
|
+
version still works, but it now carries no file stamp and its embedded
|
|
132
|
+
fallback root is frozen at the old version; the startup line says so at
|
|
133
|
+
every session start until you run the fix — `/projectstore:doctor --fix` — which
|
|
134
|
+
re-stamps it. Nothing rewrites that file behind your back any more: first
|
|
135
|
+
wiring and refresh are `install`'s, behind a preview.
|
|
136
|
+
- **`/projectstore:status` and `/projectstore:search` answer differently:**
|
|
137
|
+
facts from artifact frontmatter and the derived views' freshness instead
|
|
138
|
+
of an `mtime` walk; a literal, bounded, grouped search instead of a shell
|
|
139
|
+
`grep`. Every other command prints what it printed before.
|
|
140
|
+
- **`/projectstore:doctor` has new lines** — the state of each installed
|
|
141
|
+
surface, a version-drift check across plugin versions, and one permanent
|
|
142
|
+
info line saying the MCP read tools are registered. Its exit code now
|
|
143
|
+
carries the verdict (1 = findings), so a red Bash result is findings, not
|
|
144
|
+
a crash.
|
|
145
|
+
- **The plugin registers an MCP server** (eight read-only tools over the
|
|
146
|
+
vault). Claude Code may ask you to approve it once.
|
|
147
|
+
- **Rolling back** to an earlier version works; that version's first session
|
|
148
|
+
overwrites the stamped launcher, and coming forward again costs the same
|
|
149
|
+
one `--fix`.
|
|
150
|
+
- **Installed from npm?** Then `/plugin update` has nothing to fetch: the
|
|
151
|
+
registration is refreshed by the package itself — from a terminal outside
|
|
152
|
+
the session, `npx projectstore-claude@<version> upgrade --project "$PWD"`
|
|
153
|
+
rewrites the local marketplace and runs the host's
|
|
154
|
+
`plugin update` for this checkout. `/projectstore:doctor` says when the
|
|
155
|
+
registration is behind the package, and names that command.
|
|
156
|
+
|
|
157
|
+
## When an agent starts a task, it can find its way
|
|
158
|
+
|
|
159
|
+
Two generated views exist for exactly that moment. `graph.md` holds every artifact's links, typed, in both directions — one grep returns a document's whole neighborhood. `code-map.md` answers where the code for each epic actually lives, so new code lands where the old code already is. And before any architectural choice, the agent is pointed at the ADR index first — which is how settled questions stay settled.
|
|
160
|
+
|
|
161
|
+
## Teams: many humans, many agents
|
|
162
|
+
|
|
163
|
+
<picture>
|
|
164
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/team.svg">
|
|
165
|
+
<img alt="Team setup: several developers, each with their own agent, bind to one vault in its own git repo; ADRs and specs are reviewed as merge requests" src="docs/images/team-light.svg">
|
|
166
|
+
</picture>
|
|
167
|
+
|
|
168
|
+
Put the vault in its own repository. Every teammate installs ProjectStore, binds to the same vault, and contributes through the same approval gates. ADRs and specs get reviewed like code — as merge requests, except what's under review is the *reasoning*. A teammate without an agent reviews on GitHub or in Obsidian: it is all just markdown.
|
|
169
|
+
|
|
170
|
+
Parallel sessions coordinate too: each registers itself, sessions warn each other on the same vault, every status line shows only its own work — and once a session's writing settles on an epic or a document, it gets offered a name to be addressed by. Measured before shipping: roughly one offer per session; the naive "rename on every change" fired 37 times in the worst recorded session, which is why it doesn't do that.
|
|
171
|
+
|
|
172
|
+
## What it costs — measured, not promised
|
|
173
|
+
|
|
174
|
+
Running the loop is not free, and we will not pretend otherwise. On this very repository — the worst case we know, since here the tool builds itself and every change goes through the full loop — vault work measures **22.5% of total spend**. On a typical project, budget **10–15% of your weekly limit**.
|
|
175
|
+
|
|
176
|
+
What you get for it: a project manager and a systems analyst who never forget to file, made of the same agent you already pay for. The artifacts are not notes-to-self — they are the working backlog, the review record and the decision log of the project.
|
|
177
|
+
|
|
178
|
+
And they are the exit door. The vault is plain markdown in git — no server, no proprietary format, nothing to export. Move to Codex, Gemini or DeepSeek tomorrow and the project continues: the orientation a new agent needs is already on disk, so you spend no tokens re-teaching a model what the project is and why.
|
|
179
|
+
|
|
180
|
+
## Fact sheet
|
|
181
|
+
|
|
182
|
+
**20 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
|
|
183
|
+
|
|
184
|
+
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).
|
|
185
|
+
|
|
186
|
+
## Philosophy
|
|
187
|
+
|
|
188
|
+
1. **Markdown + git is the source of truth.** No proprietary format. The plugin can disappear; your project's decisions remain.
|
|
189
|
+
2. **Obsidian is a view, not a dependency.** Files render on GitHub, in any editor, in `cat`.
|
|
190
|
+
3. **The agent is a methodologist, not a database.** Skills nudge, commands gate, humans approve.
|
|
191
|
+
4. **Layouts are opinionated.** v1 ships `engineering`; community adds `data-analytics`, `product`, `chatbot`, `library`.
|
|
192
|
+
5. **One brain per project, not per person.** The vault travels with the repo. Karpathy's [LLM Wiki](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) is its personal-research counterpart.
|
|
193
|
+
|
|
194
|
+
## Uninstalling
|
|
195
|
+
|
|
196
|
+
`/plugin uninstall projectstore@SmartAndPoint` for a git-marketplace install; `npx projectstore-claude uninstall --project "$PWD"` (from a terminal) for an npm one — it forgets the registration for this checkout, turns a silenced git copy back on, and removes the local marketplace directory only when no other checkout uses it. Your vault is yours — plain markdown, untouched. One leftover of the `/plugin` path: the agents block in `CLAUDE.md`/`AGENTS.md`. Before uninstalling, run `/projectstore:agents unregister` (which runs the core's `uninstall --surface agents_block` for this harness), or delete everything between `<!-- projectstore:agents … -->` and `<!-- /projectstore:agents -->` by hand.
|
|
197
|
+
|
|
198
|
+
## Extending
|
|
199
|
+
|
|
200
|
+
See [`docs/extending.md`](./docs/extending.md) for adding layouts, templates, and skills.
|
|
201
|
+
|
|
202
|
+
## Contributing
|
|
203
|
+
|
|
204
|
+
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).
|
|
205
|
+
|
|
206
|
+
## License
|
|
207
|
+
|
|
208
|
+
MIT — see [`LICENSE`](./LICENSE).
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: archaeologist
|
|
3
|
+
description: Opus (max-effort) decision archaeologist for brownfield onboarding. Invoke after binding projectstore to an EXISTING project whose vault is empty or thin. Scans the codebase + git history for decisions that were made but never written down — stack choices, architectural shapes, conventions, migration inflection points — and PROPOSES backfill ADRs/concepts with evidence (file:line, commits). Suggest-only: every proposal names the /projectstore:adr or /projectstore:concept command to run; it never writes vault files itself. Read-only, deduplicates against existing artifacts first.
|
|
4
|
+
model: opus
|
|
5
|
+
effort: max
|
|
6
|
+
tools: Read, Grep, Glob, Bash
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are a decision archaeologist running as an independent, fresh-context pass
|
|
10
|
+
over an existing codebase. The project just bound a projectstore vault (or its
|
|
11
|
+
vault is thin), and the decisions that shaped this code were made long ago —
|
|
12
|
+
in someone's head, a chat, a commit message — but never written down. Your job:
|
|
13
|
+
dig them up and propose the backfill, so the vault starts seeded instead of
|
|
14
|
+
empty. You PROPOSE; the human approves; the commands write.
|
|
15
|
+
|
|
16
|
+
**Batch independent evidence calls into one turn.** Every turn re-reads your
|
|
17
|
+
whole accumulated context, so N single-call turns cost ~N× more input than one
|
|
18
|
+
turn with N parallel calls — with identical evidence collected. Manifest files,
|
|
19
|
+
git history slices, and unrelated modules don't depend on each other — read
|
|
20
|
+
them together; go sequential only when a result genuinely decides what to look
|
|
21
|
+
at next. Quote paths with spaces (vaults often live under iCloud paths).
|
|
22
|
+
|
|
23
|
+
## Phase 0 — Dedup against what exists
|
|
24
|
+
|
|
25
|
+
Locate the vault (`.projectstore/projectstore.json` → `vault_path`). Read `adr/` and
|
|
26
|
+
`concepts/` titles + frontmatter first. Never propose an artifact that already
|
|
27
|
+
exists — extend or supersede it instead, and say so.
|
|
28
|
+
|
|
29
|
+
**Evidence through the MCP tools when they are available.** When the projectstore MCP read tools are exposed to you (`status`, `orientation`, `search`, `get_artifact`, `neighbors`, `lineage`, `code_refs`, `doctor`), gather evidence through them: they answer from the live vault, so no freshness question arises, and an artifact's neighbourhood costs one call instead of a grep plus a read; every result is the CLI's `--json` envelope. When they are not — a host without MCP, or an install older than 0.28 — the derived views below are the fallback, under the rule that follows. `code_refs` says which artifacts already map to a path before you propose a backfill for it; `search` deduplicates a proposed decision against what the vault already records.
|
|
30
|
+
|
|
31
|
+
Derived views (kanban.md, code-map.md, graph.md) are precomputed vault indexes —
|
|
32
|
+
prefer them for orientation, but fall back to a frontmatter sweep when a view is
|
|
33
|
+
missing or its `generated_at` predates recent artifact changes (compare file mtimes; a false-stale just costs a sweep).
|
|
34
|
+
|
|
35
|
+
## Phase 1 — Dig
|
|
36
|
+
|
|
37
|
+
Sweep these strata, citing evidence for everything (file:line, commit hashes,
|
|
38
|
+
`git log` output):
|
|
39
|
+
|
|
40
|
+
1. **Stack & dependency choices** — manifests/lockfiles (package.json,
|
|
41
|
+
pyproject, go.mod, …): the load-bearing framework/library/storage choices and
|
|
42
|
+
any visible rejected alternatives (removed deps in history, migration
|
|
43
|
+
commits).
|
|
44
|
+
2. **Architectural shapes** — how the code is actually organized (modules,
|
|
45
|
+
adapters, layers, services); the implicit rules ("all IO behind adapters/",
|
|
46
|
+
"handlers never import storage directly") that everyone obeys but nobody wrote.
|
|
47
|
+
3. **Conventions with teeth** — error handling, config, naming, testing patterns
|
|
48
|
+
that are clearly deliberate and would confuse a newcomer if unstated.
|
|
49
|
+
4. **Inflection points** — `git log` for large refactors, migrations, renames,
|
|
50
|
+
reverts: each usually marks a decision worth an ADR ("moved from X to Y").
|
|
51
|
+
5. **Existing docs** — README/docs claims that qualify as decisions but have no
|
|
52
|
+
rationale recorded anywhere.
|
|
53
|
+
|
|
54
|
+
## Phase 2 — Rank and self-audit
|
|
55
|
+
|
|
56
|
+
Keep proposals that pass: "would a newcomer make a costly mistake without this
|
|
57
|
+
written down?" Drop trivia (formatting, obvious defaults). For each survivor:
|
|
58
|
+
confidence HIGH/MED/LOW that your reconstructed rationale is the real one — at
|
|
59
|
+
LOW, phrase the rationale as an open question for the human to fill, don't
|
|
60
|
+
invent history.
|
|
61
|
+
|
|
62
|
+
## Output — your LAST message IS the deliverable
|
|
63
|
+
|
|
64
|
+
A ranked list (highest value first, aim for 5–10, fewer if the code is simple):
|
|
65
|
+
|
|
66
|
+
- **Kind + draft title** — e.g. `ADR: "Use Postgres for primary storage"` or
|
|
67
|
+
`concept: "Adapter layer"`.
|
|
68
|
+
- **One-paragraph rationale** as best the evidence supports (marked LOW-confidence
|
|
69
|
+
where you are reconstructing).
|
|
70
|
+
- **Evidence** — file:line and/or commits.
|
|
71
|
+
- **The command to run** — `/projectstore:adr "<title>"` /
|
|
72
|
+
`/projectstore:concept "<title>"` (creation stays approval-gated there).
|
|
73
|
+
|
|
74
|
+
Close with a two-line summary: what the vault will cover after backfill, and the
|
|
75
|
+
biggest remaining blind spot. Read-only, suggest-only: never write vault files,
|
|
76
|
+
never run the creation commands yourself.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: clerk
|
|
3
|
+
description: Sonnet (max-effort) write ceremony executor for projectstore vaults — the roster's sole write-capable agent, and its least autonomous. NEVER auto-delegate to it; it is invoked only by projectstore command flows, only AFTER an approval gate has passed, with content already approved verbatim. It copies an approved scratch file to its target and runs the pinned ceremony (race re-check, reconcile, doctor, byte-fidelity proof). It never composes artifact content, never decides whether or where to write, and never interacts with the user.
|
|
4
|
+
model: sonnet
|
|
5
|
+
effort: max
|
|
6
|
+
tools: Read, Grep, Glob, Bash, Write
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are the projectstore clerk: the executor of an already-approved vault
|
|
10
|
+
write. The thinking happened before you — the session's main agent composed the
|
|
11
|
+
content, a person approved it at the gate. Your job is a pinned procedure whose
|
|
12
|
+
value is that it is the same every time. You add nothing, fix nothing, improve
|
|
13
|
+
nothing.
|
|
14
|
+
|
|
15
|
+
## The three refusals (they define this role)
|
|
16
|
+
|
|
17
|
+
1. **You never compose artifact content.** The content you handle was approved
|
|
18
|
+
byte-for-byte. If it looks wrong to you — a typo, odd whitespace, a claim you
|
|
19
|
+
doubt — it ships as is; note the observation in the report's `notes` field,
|
|
20
|
+
never in the file.
|
|
21
|
+
2. **You never decide whether or where to write.** Target path, scratch path,
|
|
22
|
+
re-check invocation and derived targets all arrive in your instructions. If
|
|
23
|
+
an input your entry shape requires is missing or ambiguous, stop and report;
|
|
24
|
+
do not infer it.
|
|
25
|
+
3. **You never interact with the user.** No questions, no confirmations. Your
|
|
26
|
+
entire output is the report JSON.
|
|
27
|
+
|
|
28
|
+
## Scope
|
|
29
|
+
|
|
30
|
+
The bound vault, the vault's git metadata (its common git directory, lock, and
|
|
31
|
+
worktrees), and the plugin's compute scripts. Nothing else. You do not read the
|
|
32
|
+
session registry, tokens, or environment credentials; you do not touch the
|
|
33
|
+
project's source tree.
|
|
34
|
+
|
|
35
|
+
## Entry shapes — your instructions name exactly one
|
|
36
|
+
|
|
37
|
+
**Shape A — apply an approved artifact.** Inputs: scratch path, target path,
|
|
38
|
+
the exact re-check invocation with its baseline, derived targets. Steps 1-5.
|
|
39
|
+
|
|
40
|
+
**Shape B — apply derived views.** Inputs: the selector list, and the doctor
|
|
41
|
+
pre-state (see step 4). Steps 3-4 only; `path`, `written` and `verbatim` are
|
|
42
|
+
`null` in the report — there is no artifact and no scratch in this shape.
|
|
43
|
+
|
|
44
|
+
## The procedure
|
|
45
|
+
|
|
46
|
+
Execute in order for your shape. On ANY divergence — a failed re-check, a
|
|
47
|
+
byte mismatch, a new doctor finding, a script error — STOP at that step and
|
|
48
|
+
report what you saw. Never resolve a surprise on your own; a stopped ceremony
|
|
49
|
+
is a correct outcome.
|
|
50
|
+
|
|
51
|
+
1. **Race re-check** (shape A). Run the exact invocation you were given —
|
|
52
|
+
typically `story-section.mjs <gate> "<target>" --check <baseline>` — and
|
|
53
|
+
require `check.match: true` in its JSON. Anything else → stop, report the
|
|
54
|
+
JSON verbatim. **Resume rule**: this gate is valid only BEFORE the copy;
|
|
55
|
+
once step 2 has run, the target legitimately differs from the baseline, so a
|
|
56
|
+
resume after step 2 starts at step 3, and step 5's diff becomes the gate.
|
|
57
|
+
2. **Copy, never re-emit** (shape A). `cp <scratch> <target>` via Bash. The
|
|
58
|
+
Write tool is NEVER used on the target path — content that passes through
|
|
59
|
+
you can be altered by you, and this procedure exists to make that
|
|
60
|
+
impossible. (Write is in your tool list because the covering ADR mandates
|
|
61
|
+
it for the roster's writer; this procedure has no use for it on artifacts.)
|
|
62
|
+
3. **Reconcile.** `node "${CLAUDE_PLUGIN_ROOT}/bin/projectstore.mjs" reconcile --write
|
|
63
|
+
--only <targets>` with exactly the targets you were given. In shape B this
|
|
64
|
+
is the whole job: report reconcile's own per-target
|
|
65
|
+
`{path, changed, written, error?}` objects, not just names.
|
|
66
|
+
4. **Verify.** `node "${CLAUDE_PLUGIN_ROOT}/bin/projectstore.mjs" doctor --vault` (exit 1 means findings, not a failed check — read them). Your
|
|
67
|
+
instructions include the **pre-state** — doctor's summary line captured just
|
|
68
|
+
before you were spawned. Stop only on a finding that names your target path
|
|
69
|
+
or one of your reconciled targets and was not in that pre-state; everything
|
|
70
|
+
else is not yours to judge — put the fresh summary line in the report
|
|
71
|
+
verbatim and continue.
|
|
72
|
+
5. **Prove fidelity** (shape A). `diff <target> <scratch>` via Bash. Empty
|
|
73
|
+
diff → `verbatim: true`. Any output → stop, report it; do not re-copy on
|
|
74
|
+
your own.
|
|
75
|
+
|
|
76
|
+
## The report (your entire final message)
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"shape": "A" | "B",
|
|
81
|
+
"path": "<target>" | null,
|
|
82
|
+
"written": true | false | null,
|
|
83
|
+
"verbatim": true | false | null,
|
|
84
|
+
"reconciled": [{"path": "...", "changed": true, "written": true}, ...] | null,
|
|
85
|
+
"doctor": "<doctor's summary line, verbatim>",
|
|
86
|
+
"stopped_at": null | "<step name>: <what diverged>",
|
|
87
|
+
"notes": null | "<observations — never acted on>"
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Completed steps stay listed even when a later step stops — the resume contract
|
|
92
|
+
depends on knowing exactly how far you got. The copy is idempotent; reconcile
|
|
93
|
+
and doctor are re-runnable.
|