projectstore-codex 0.0.1 → 0.28.1
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/.codex-plugin/plugin.json +48 -0
- package/README.md +15 -7
- package/bin/projectstore-codex.mjs +88 -0
- package/hooks/hooks.json +59 -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 +284 -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 +180 -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 +166 -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/harnesses.md +163 -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 +483 -0
- package/node_modules/projectstore/harnesses/codex.json +332 -0
- package/node_modules/projectstore/hooks/hooks.json +59 -0
- package/node_modules/projectstore/hooks/pre-compact.mjs +121 -0
- package/node_modules/projectstore/hooks/session-rules.mjs +63 -0
- package/node_modules/projectstore/hooks/session-start.mjs +301 -0
- package/node_modules/projectstore/hooks/session-stop.mjs +84 -0
- package/node_modules/projectstore/package.json +70 -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/build-adapters.mjs +264 -0
- package/node_modules/projectstore/scripts/cli.mjs +595 -0
- package/node_modules/projectstore/scripts/codemap.mjs +99 -0
- package/node_modules/projectstore/scripts/diff-refs.mjs +127 -0
- package/node_modules/projectstore/scripts/doctor.mjs +2127 -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 +608 -0
- package/node_modules/projectstore/scripts/install-harness.mjs +1387 -0
- package/node_modules/projectstore/scripts/kanban.mjs +174 -0
- package/node_modules/projectstore/scripts/lib.mjs +3085 -0
- package/node_modules/projectstore/scripts/mcp.mjs +391 -0
- package/node_modules/projectstore/scripts/portable-registration.mjs +198 -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 +421 -0
- package/node_modules/projectstore/scripts/tokens.mjs +449 -0
- package/node_modules/projectstore/scripts/touch-session.mjs +336 -0
- package/node_modules/projectstore/scripts/version-guard.mjs +255 -0
- package/node_modules/projectstore/scripts/worktree.mjs +109 -0
- package/node_modules/projectstore/skills/projectstore-decision-detector/SKILL.md +40 -0
- package/node_modules/projectstore/skills/projectstore-peer-reviewer/SKILL.md +38 -0
- package/node_modules/projectstore/skills/projectstore-story-completion/SKILL.md +50 -0
- package/node_modules/projectstore/skills/projectstore-vault-communication/SKILL.md +96 -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 +36 -14
- package/plugin.json +53 -0
- package/skills/projectstore-adr/SKILL.md +76 -0
- package/skills/projectstore-agents/SKILL.md +50 -0
- package/skills/projectstore-archaeologist/SKILL.md +109 -0
- package/skills/projectstore-bind/SKILL.md +44 -0
- package/skills/projectstore-clerk/SKILL.md +126 -0
- package/skills/projectstore-codemap/SKILL.md +69 -0
- package/skills/projectstore-concept/SKILL.md +36 -0
- package/skills/projectstore-critic/SKILL.md +127 -0
- package/skills/projectstore-decision-detector/SKILL.md +59 -0
- package/skills/projectstore-doctor/SKILL.md +33 -0
- package/skills/projectstore-epic/SKILL.md +59 -0
- package/skills/projectstore-graph/SKILL.md +75 -0
- package/skills/projectstore-kanban/SKILL.md +60 -0
- package/skills/projectstore-librarian/SKILL.md +114 -0
- package/skills/projectstore-meeting/SKILL.md +36 -0
- package/skills/projectstore-peer-reviewer/SKILL.md +57 -0
- package/skills/projectstore-planner/SKILL.md +113 -0
- package/skills/projectstore-reconcile/SKILL.md +92 -0
- package/skills/projectstore-research/SKILL.md +36 -0
- package/skills/projectstore-review/SKILL.md +108 -0
- package/skills/projectstore-reviewer/SKILL.md +131 -0
- package/skills/projectstore-runbook/SKILL.md +36 -0
- package/skills/projectstore-scaffold/SKILL.md +42 -0
- package/skills/projectstore-search/SKILL.md +41 -0
- package/skills/projectstore-spec/SKILL.md +110 -0
- package/skills/projectstore-status/SKILL.md +47 -0
- package/skills/projectstore-statusline/SKILL.md +29 -0
- package/skills/projectstore-story/SKILL.md +132 -0
- package/skills/projectstore-story-completion/SKILL.md +69 -0
- package/skills/projectstore-vault-communication/SKILL.md +115 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: projectstore-planner
|
|
3
|
+
description: "EPIC-IMPLEMENTATION planner for projectstore-bound projects — a narrow, vault-aware role, NOT a general software planner. Invoke BEFORE implementing an epic/story. Reads the vault (epics and their code_refs — how prior epics landed in the codebase as modules/adapters/packages) plus the code itself, and returns a placement plan consistent with that mapping: where the change belongs, what to reuse, conventions to match, pitfalls, ordered steps, and a proposed code_refs footprint. Read-only: it plans and proposes; it never writes code or vault files."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Runtime path
|
|
7
|
+
|
|
8
|
+
Resolve paths from this skill's own directory, never from the checkout or a
|
|
9
|
+
remembered cache path. The plugin root is two directories above this SKILL.md;
|
|
10
|
+
the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
|
|
11
|
+
any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
|
|
12
|
+
path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
|
|
13
|
+
Do not prefix the command with the assignment: a shell expands the quoted path
|
|
14
|
+
before that inline assignment takes effect. If the bundled core is missing, stop
|
|
15
|
+
and report a broken plugin install; do not fetch a different version from npm.
|
|
16
|
+
|
|
17
|
+
## User arguments
|
|
18
|
+
|
|
19
|
+
The source command's host-substituted argument token is rendered here as
|
|
20
|
+
`<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
|
|
21
|
+
shown command, replace that token with the actual arguments from the user's
|
|
22
|
+
request and shell-quote values safely. Never pass the angle-bracket token
|
|
23
|
+
literally and never treat it as a shell variable.
|
|
24
|
+
|
|
25
|
+
## Codex orchestration
|
|
26
|
+
|
|
27
|
+
This is a role-orchestration skill, not a native agent registration. Resolve the
|
|
28
|
+
role model by running:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" agents model planner --json --project "$PWD"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Spawn a collaboration agent for the bounded task. If the result names a model,
|
|
35
|
+
pass that model and use an empty or bounded context fork; otherwise inherit the
|
|
36
|
+
current model. Do not pass a reasoning-effort override: per-role effort belongs
|
|
37
|
+
to a separate accepted story. Give the spawned agent the role contract below
|
|
38
|
+
and the exact artifact/diff it must inspect. Wait for its final result.
|
|
39
|
+
|
|
40
|
+
## Role contract
|
|
41
|
+
|
|
42
|
+
You are an epic-implementation planner running as an independent, fresh-context
|
|
43
|
+
pass, separate from the engineer who will write the code. You are given a target
|
|
44
|
+
epic or story from a projectstore vault (or a task that maps to one). Your job is
|
|
45
|
+
NOT to write it — it is to tell the engineer exactly WHERE and HOW to implement it
|
|
46
|
+
so it fits BOTH this codebase AND how this project's previous epics landed in it.
|
|
47
|
+
|
|
48
|
+
**Batch independent evidence calls into one turn.** Every turn re-reads your whole
|
|
49
|
+
accumulated context, so N single-call turns cost ~N× more input than one turn with
|
|
50
|
+
N parallel calls — with identical evidence collected. The target story, sibling
|
|
51
|
+
epics' `code_refs`, and the modules they point at don't depend on each other —
|
|
52
|
+
read them together; go sequential only when a result genuinely decides what to
|
|
53
|
+
look at next. Quote paths with spaces (vaults often live under iCloud paths).
|
|
54
|
+
|
|
55
|
+
**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. `code_refs` with an epic id is the epic↔code mapping Phase 0 asks for, in one call. 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.
|
|
56
|
+
|
|
57
|
+
Derived views (kanban.md, code-map.md, graph.md) are precomputed vault indexes — prefer them for orientation, but fall back to a frontmatter sweep when a view is missing or its `generated_at` predates recent artifact changes (compare file mtimes; a false-stale just costs a sweep).
|
|
58
|
+
|
|
59
|
+
## Phase 0 — Read the vault's epic↔code mapping first
|
|
60
|
+
|
|
61
|
+
Locate the bound vault (`.projectstore/projectstore.json` → `vault_path`). Read the
|
|
62
|
+
target epic/story (goal, decomposition, acceptance criteria) and then EVERY other
|
|
63
|
+
epic's frontmatter `code_refs` — that list is the project's real mapping of
|
|
64
|
+
features to code shapes ("EPIC-AUTH became `src/auth/`; EPIC-EXPORT became an
|
|
65
|
+
adapter in `adapters/csv/`"). Verify the refs against the actual directories
|
|
66
|
+
before trusting them. If no epic carries `code_refs` yet, say so explicitly and
|
|
67
|
+
degrade gracefully: plan from the codebase alone and note that this plan will
|
|
68
|
+
*establish* the first mapping.
|
|
69
|
+
|
|
70
|
+
**Spec discovery (ADR-007).** Read the story's frontmatter `specs:` list and
|
|
71
|
+
open every covering spec in `<vault>/specs/` — its Behavioral contracts are the
|
|
72
|
+
NORMATIVE how; your plan must be a thin route through them (which contracts, in
|
|
73
|
+
what order, which files), never a competing design. Contradicting a covering
|
|
74
|
+
spec is a finding to report, not a decision to make. If the vault's
|
|
75
|
+
`.projectstore.json` says `spec_policy: required` and the story has no covering
|
|
76
|
+
spec, say so FIRST — under spec-first the spec must exist and be `active`
|
|
77
|
+
before implementation starts (suggest `$projectstore-spec`). Routing rule:
|
|
78
|
+
spec contracts = durable how; the story's `## Implementation Plan` = per-story
|
|
79
|
+
route (your output feeds it via `$projectstore-story plan`); `## Technical
|
|
80
|
+
Notes` = incidental constraints discovered during work.
|
|
81
|
+
|
|
82
|
+
## Phase 1 — Explore the codebase
|
|
83
|
+
|
|
84
|
+
Use Grep / Glob / Read / Bash to find: the module(s) that own this concern, the
|
|
85
|
+
existing patterns for similar things, the utilities and abstractions to reuse,
|
|
86
|
+
the seams (interfaces, hooks, config) to extend rather than bypass, the naming /
|
|
87
|
+
style conventions, and where the tests for this area live. Do not advise from
|
|
88
|
+
generic best practice — cite the real files and patterns you found.
|
|
89
|
+
|
|
90
|
+
## Return
|
|
91
|
+
|
|
92
|
+
1. **Shape** — how this epic should land in the code (module / adapter / package /
|
|
93
|
+
extension of an existing one), justified against how comparable prior epics
|
|
94
|
+
landed (cite their `code_refs`). If you break the established shape, say why.
|
|
95
|
+
2. **Placement** — the specific file(s) and the spot in each where the change
|
|
96
|
+
belongs; if it spans layers, each layer's touch point in order.
|
|
97
|
+
3. **Reuse** — existing helpers / abstractions to use instead of writing new ones
|
|
98
|
+
(cite `file:symbol`); flag anything the engineer is likely to re-implement.
|
|
99
|
+
4. **Fit** — conventions to match (naming, error handling, logging, config,
|
|
100
|
+
async patterns), each with one concrete example from the repo.
|
|
101
|
+
5. **Pitfalls** — repo-specific traps: invariants, layers not to cross, shared
|
|
102
|
+
state, ordering, prior fixes this change could regress.
|
|
103
|
+
6. **Tests** — where new tests go, the harness/fixtures to reuse (cite), the
|
|
104
|
+
cases that matter — mapped to the story's acceptance criteria when given.
|
|
105
|
+
7. **Plan** — a short ordered step list the engineer can follow.
|
|
106
|
+
8. **Proposed `code_refs`** — the paths/globs this epic (and story) will own once
|
|
107
|
+
implemented, ready for `$projectstore-codemap set`. You PROPOSE; the command
|
|
108
|
+
writes after approval.
|
|
109
|
+
|
|
110
|
+
Rules: be concrete and cite real paths / symbols; if the task is ambiguous or has
|
|
111
|
+
two plausible homes, say so and recommend one with the tradeoff. No code
|
|
112
|
+
generation beyond tiny illustrative snippets. You are read-only — never write
|
|
113
|
+
code or vault files.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: projectstore-reconcile
|
|
3
|
+
description: "Re-derive every derived view (kanban, folder-index READMEs, code-map, graph) from the vault's source of truth — the repair half of doctor's vault checks. Hand-edits can never permanently desync the board."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Runtime path
|
|
7
|
+
|
|
8
|
+
Resolve paths from this skill's own directory, never from the checkout or a
|
|
9
|
+
remembered cache path. The plugin root is two directories above this SKILL.md;
|
|
10
|
+
the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
|
|
11
|
+
any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
|
|
12
|
+
path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
|
|
13
|
+
Do not prefix the command with the assignment: a shell expands the quoted path
|
|
14
|
+
before that inline assignment takes effect. If the bundled core is missing, stop
|
|
15
|
+
and report a broken plugin install; do not fetch a different version from npm.
|
|
16
|
+
|
|
17
|
+
## User arguments
|
|
18
|
+
|
|
19
|
+
The source command's host-substituted argument token is rendered here as
|
|
20
|
+
`<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
|
|
21
|
+
shown command, replace that token with the actual arguments from the user's
|
|
22
|
+
request and shell-quote values safely. Never pass the angle-bracket token
|
|
23
|
+
literally and never treat it as a shell variable.
|
|
24
|
+
|
|
25
|
+
You are reconciling the vault's derived views with their source of truth (frontmatter).
|
|
26
|
+
|
|
27
|
+
## Steps
|
|
28
|
+
|
|
29
|
+
1. **Check config**; stop if missing.
|
|
30
|
+
|
|
31
|
+
2. **Compute** (read-only):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" reconcile
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Output JSON: `kanban` / `codemap` / `graph` / `indexes[]`, each
|
|
38
|
+
`{path, changed, content?}`, plus `summary.changed`. A graph.md that does
|
|
39
|
+
not exist yet reports `skipped` — bare reconcile never mints the file;
|
|
40
|
+
first creation goes through `$projectstore-graph` (or `--only graph`).
|
|
41
|
+
|
|
42
|
+
3. **Nothing changed** (`summary.changed == 0` and `summary.failed == 0`) →
|
|
43
|
+
report "Derived views already match frontmatter — nothing to reconcile."
|
|
44
|
+
and stop.
|
|
45
|
+
|
|
46
|
+
4. **Preview**: list each changed target (path + a one-line what: "kanban board",
|
|
47
|
+
"adr/ index", "code map", "link graph"). Show a short diff excerpt for indexes.
|
|
48
|
+
**Surface any target carrying `error` first** — an errored target has no
|
|
49
|
+
`changed` flag, so it never appears in the changed list; a broken board
|
|
50
|
+
must not hide behind a clean-looking preview.
|
|
51
|
+
|
|
52
|
+
5. **Approval** via the harness's user-input mechanism: **Apply all** / **Select targets** / **Cancel**.
|
|
53
|
+
Disclose in the question that content is recomputed from the vault at write
|
|
54
|
+
time — the preview is advisory, the approval covers the regeneration action.
|
|
55
|
+
|
|
56
|
+
5a. **Delegate the apply — enumerated case: two or more targets** (ADR "Artifact
|
|
57
|
+
content is authored by the context-holder, the write ceremony by a clerk").
|
|
58
|
+
When the approved set contains two or more targets, hand steps 6-7 to
|
|
59
|
+
`projectstore:clerk`: pass the exact selector list from step 4's preview and
|
|
60
|
+
the expectation that doctor ends clean. **Model (ADR-008)**: resolve
|
|
61
|
+
the model with `node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" agents model clerk --json --project "$PWD"` and pass `result.model` as the spawn's model parameter (`null` → pass nothing);
|
|
62
|
+
missing key, `inherit`, or unreadable config → pass nothing and let the
|
|
63
|
+
agent's own frontmatter decide; never guess a model. The clerk applies
|
|
64
|
+
through the core exactly as step 6 specifies and reports per target. A single
|
|
65
|
+
approved target stays in the main thread — the spawn costs more than it
|
|
66
|
+
saves. No clerk available → steps 6-7 yourself; never a general-purpose
|
|
67
|
+
substitute.
|
|
68
|
+
|
|
69
|
+
6. **On approval**: apply through the core — never the Write/file-editing tools:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" reconcile --write --only <approved,targets>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Selectors: `kanban`, `codemap`, `graph`, `indexes` (all), `indexes=<folder>` (one).
|
|
76
|
+
"Apply all" means the targets previewed in step 4, passed explicitly — not a
|
|
77
|
+
bare `--write`. The script recomputes each target immediately before its own
|
|
78
|
+
atomic replace; manual prose outside the managed Index tables is preserved by
|
|
79
|
+
construction (check-and-retry re-reads the README before writing). Render the
|
|
80
|
+
report: per target `{path, changed, written, error?}` + `summary`. A nonzero
|
|
81
|
+
exit means at least one target failed — surface its `error`.
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
7. **Verify**: run `node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" doctor --vault` (exit 1 = findings, not failure) and show
|
|
85
|
+
the summary line — reconcile's whole point is a clean doctor afterwards.
|
|
86
|
+
|
|
87
|
+
## Notes
|
|
88
|
+
|
|
89
|
+
- Reconcile owns **vault-side** repair (ADR-005 boundary); install-side repair
|
|
90
|
+
lives in `$projectstore-doctor --fix`.
|
|
91
|
+
- Frontmatter is never modified here — if the *frontmatter* is what's wrong, fix
|
|
92
|
+
the artifact, then reconcile.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: projectstore-research
|
|
3
|
+
description: "Create a new research note. Arguments: <title>."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Runtime path
|
|
7
|
+
|
|
8
|
+
Resolve paths from this skill's own directory, never from the checkout or a
|
|
9
|
+
remembered cache path. The plugin root is two directories above this SKILL.md;
|
|
10
|
+
the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
|
|
11
|
+
any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
|
|
12
|
+
path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
|
|
13
|
+
Do not prefix the command with the assignment: a shell expands the quoted path
|
|
14
|
+
before that inline assignment takes effect. If the bundled core is missing, stop
|
|
15
|
+
and report a broken plugin install; do not fetch a different version from npm.
|
|
16
|
+
|
|
17
|
+
## User arguments
|
|
18
|
+
|
|
19
|
+
The source command's host-substituted argument token is rendered here as
|
|
20
|
+
`<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
|
|
21
|
+
shown command, replace that token with the actual arguments from the user's
|
|
22
|
+
request and shell-quote values safely. Never pass the angle-bracket token
|
|
23
|
+
literally and never treat it as a shell variable.
|
|
24
|
+
|
|
25
|
+
You are creating a research note (deep investigation, comparison, benchmark).
|
|
26
|
+
|
|
27
|
+
Steps:
|
|
28
|
+
|
|
29
|
+
1. Check config; stop if missing.
|
|
30
|
+
2. Run `node "${PROJECTSTORE_CORE_ROOT}/scripts/draft.mjs" research "<user-arguments>"`.
|
|
31
|
+
3. Preview path + first ~20 lines. When `index` is non-null, print `index.line` too — the exact row that will appear in the folder index, unless the index step reports a failure and no row lands at all.
|
|
32
|
+
4. the harness's user-input mechanism: Yes / Edit / No. This is the only gate: **Yes** covers the artifact and its index row. Disclose in the question that the folder's whole managed index table is regenerated from vault state at write time, so the update may also repair a stale row for another artifact.
|
|
33
|
+
5. Pre-write race check (Layer 1): `test -e "<path>"`. If exists, ask the user whether to **Overwrite**, **Use new slug** (append `-2`), or **Cancel**.
|
|
34
|
+
6. On Yes (path free or overwrite confirmed): Write file.
|
|
35
|
+
7. Index row, if `index` is non-null — apply through the core, never Write/Edit, no second gate (step 4 covers it): `node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" reconcile --write --only indexes=<index.folder>`. The row is derived state: canonical order, atomic write, manual prose preserved. The file is already on disk, so a nonzero exit is a warning naming the folder (stderr with no JSON = rejected before any write, fix the header or restore the README; `error` in JSON = I/O failure, suggest `$projectstore-reconcile`), never a failed creation.
|
|
36
|
+
8. Suggest: "Fill `Question`, then `Method`, then `Findings`. After the conclusion, consider raising an ADR if the research informs a decision."
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: projectstore-review
|
|
3
|
+
description: "Peer-review an existing artifact (ADR / research / epic / etc.) using a fresh critic-mode agent with a structural checklist. Returns concrete improvements, no sycophancy. Arguments: <path-to-artifact>."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Runtime path
|
|
7
|
+
|
|
8
|
+
Resolve paths from this skill's own directory, never from the checkout or a
|
|
9
|
+
remembered cache path. The plugin root is two directories above this SKILL.md;
|
|
10
|
+
the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
|
|
11
|
+
any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
|
|
12
|
+
path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
|
|
13
|
+
Do not prefix the command with the assignment: a shell expands the quoted path
|
|
14
|
+
before that inline assignment takes effect. If the bundled core is missing, stop
|
|
15
|
+
and report a broken plugin install; do not fetch a different version from npm.
|
|
16
|
+
|
|
17
|
+
## User arguments
|
|
18
|
+
|
|
19
|
+
The source command's host-substituted argument token is rendered here as
|
|
20
|
+
`<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
|
|
21
|
+
shown command, replace that token with the actual arguments from the user's
|
|
22
|
+
request and shell-quote values safely. Never pass the angle-bracket token
|
|
23
|
+
literally and never treat it as a shell variable.
|
|
24
|
+
|
|
25
|
+
You are running a peer review on a projectstore artifact.
|
|
26
|
+
|
|
27
|
+
## Steps
|
|
28
|
+
|
|
29
|
+
1. **Resolve path**: `<user-arguments>` is the target file. If it is relative, resolve against the bound vault (read `.projectstore/projectstore.json` → `vault_path`). If config missing, stop with: "Run `$projectstore-bind <path>` first."
|
|
30
|
+
|
|
31
|
+
2. **Read the artifact**: use the file-reading tool on the resolved path. Stop if file does not exist.
|
|
32
|
+
|
|
33
|
+
3. **Identify the kind**: parse the YAML frontmatter for `type:`. If missing, try to infer from the file path (`adr/` → adr, `epics/<id>/epic.md` → epic, `epics/<id>/stories/*` → story, `research/` → research, etc.). If still unknown, ask the user via the harness's user-input mechanism which kind to apply.
|
|
34
|
+
|
|
35
|
+
4. **Load the checklist**:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cat "${PROJECTSTORE_CORE_ROOT}/scaffold/checklists.json"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Parse JSON, pick the entry by kind. If the kind has no entry, use the `adr` checklist as a generic fallback and note this to the user.
|
|
42
|
+
|
|
43
|
+
5. **Gather domain context**: read the vault's top-level `README.md` and the folder README of the artifact's parent (e.g. `adr/README.md`). Keep both short — they're context for the critic, not the focus.
|
|
44
|
+
|
|
45
|
+
6. **Spawn the critic agent**. Prefer this plugin's own `projectstore:critic` (purpose-built fresh-context critic, no sycophancy; named `projectstore:projectstore-critic` before v0.13). If unavailable, fall back to `oh-my-codexcode:critic`, then `general-purpose`. Use this exact prompt template:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
You are a critic-mode reviewer. You have ONLY the artifact and the
|
|
49
|
+
project context below. You did NOT participate in producing this
|
|
50
|
+
artifact. Your job is to find concrete, actionable problems — not
|
|
51
|
+
to praise.
|
|
52
|
+
|
|
53
|
+
## Artifact ({{kind}} at {{path}})
|
|
54
|
+
|
|
55
|
+
<full file content>
|
|
56
|
+
|
|
57
|
+
## Project context
|
|
58
|
+
|
|
59
|
+
<vault README excerpt>
|
|
60
|
+
<folder README excerpt>
|
|
61
|
+
|
|
62
|
+
## Structural checklist
|
|
63
|
+
|
|
64
|
+
<bullet list of checklist.items>
|
|
65
|
+
|
|
66
|
+
## Report format (strict)
|
|
67
|
+
|
|
68
|
+
Return a numbered list of findings, max 7 items. For each:
|
|
69
|
+
1. **What's wrong** — one sentence, specific (cite section / line).
|
|
70
|
+
2. **Why it matters** — one sentence.
|
|
71
|
+
3. **Suggested fix** — concrete edit, ideally a phrase to add or
|
|
72
|
+
replace.
|
|
73
|
+
|
|
74
|
+
Forbidden:
|
|
75
|
+
- Sycophancy ("Overall this is a strong ADR, but...").
|
|
76
|
+
- Generic advice without a citation.
|
|
77
|
+
- Restating what the artifact says.
|
|
78
|
+
- "Consider" without a concrete alternative.
|
|
79
|
+
|
|
80
|
+
If the artifact passes all checklist items with no concrete issues,
|
|
81
|
+
say so in one line — do not pad.
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Set the agent description to: `Peer-review of {{kind}} artifact at {{path}}`. Pass it as a foreground task (you need the result to continue).
|
|
85
|
+
|
|
86
|
+
**Model (ADR-008)**: resolve it with `node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" agents model critic --json --project "$PWD"` and pass `result.model` as the spawn's model parameter (`null` → pass nothing). Missing key, `inherit`, or unreadable config → pass nothing and let the agent's own frontmatter decide; never guess a model. This is the only way the configured model reaches the agent — there are no override copies (`$projectstore-agents configure`). When falling back to `oh-my-codexcode:critic` or `general-purpose`, pass the same model.
|
|
87
|
+
|
|
88
|
+
7. **Show findings**: print the agent's report verbatim. Number is its number.
|
|
89
|
+
|
|
90
|
+
8. **Ask the user via the harness's user-input mechanism** what to do:
|
|
91
|
+
- **Apply all** — propose Edits for each suggested fix, one at a time with diff preview + approval.
|
|
92
|
+
- **Apply selected** — ask which finding numbers to apply, then walk through them.
|
|
93
|
+
- **Note for later** — leave artifact untouched, but append a `## Review notes` section at the bottom of the file (after user approval) summarizing findings.
|
|
94
|
+
- **Skip** — do nothing, just close.
|
|
95
|
+
|
|
96
|
+
9. **On any apply path**, after each Edit (approved by the harness's user-input mechanism), update the frontmatter:
|
|
97
|
+
- `review_status: reviewed`
|
|
98
|
+
- `reviewed_at: <today's date YYYY-MM-DD>`
|
|
99
|
+
|
|
100
|
+
Do this with one final Edit after all content changes are applied.
|
|
101
|
+
|
|
102
|
+
10. **Final print**: file path, what was applied / noted / skipped, and a one-line hint to commit the review if the vault is git-tracked.
|
|
103
|
+
|
|
104
|
+
## Notes for the implementer (you, Codex)
|
|
105
|
+
|
|
106
|
+
- Critic agent MUST NOT see the conversation that produced the artifact. Only the artifact + minimal context. That fresh framing is the whole point.
|
|
107
|
+
- If the critic returns suspiciously sycophantic findings ("good overall, minor nit:"), retry once with an explicit `NO PRAISE, NO HEDGING.` injected into the prompt.
|
|
108
|
+
- Selective default: if user invoked `$projectstore-review` on a kind whose `default_review` is `false` in checklists.json (e.g. meeting), still run — they asked explicitly. Just don't auto-trigger via skill.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: projectstore-reviewer
|
|
3
|
+
description: "STORY-CONFORMANCE reviewer for projectstore-bound projects — a narrow, vault-aware role, NOT a general code reviewer. Invoke AFTER writing code, BEFORE committing or marking a story done. Verifies the diff actually closes the story — per-acceptance-criterion evidence — then correctness / regressions / codebase-fit / tests, severity + confidence rated, self-audited. Proposes the story's code_refs update. Read-only, no sycophancy; it reviews and reports, never edits/stages/commits."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Runtime path
|
|
7
|
+
|
|
8
|
+
Resolve paths from this skill's own directory, never from the checkout or a
|
|
9
|
+
remembered cache path. The plugin root is two directories above this SKILL.md;
|
|
10
|
+
the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
|
|
11
|
+
any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
|
|
12
|
+
path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
|
|
13
|
+
Do not prefix the command with the assignment: a shell expands the quoted path
|
|
14
|
+
before that inline assignment takes effect. If the bundled core is missing, stop
|
|
15
|
+
and report a broken plugin install; do not fetch a different version from npm.
|
|
16
|
+
|
|
17
|
+
## User arguments
|
|
18
|
+
|
|
19
|
+
The source command's host-substituted argument token is rendered here as
|
|
20
|
+
`<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
|
|
21
|
+
shown command, replace that token with the actual arguments from the user's
|
|
22
|
+
request and shell-quote values safely. Never pass the angle-bracket token
|
|
23
|
+
literally and never treat it as a shell variable.
|
|
24
|
+
|
|
25
|
+
## Codex orchestration
|
|
26
|
+
|
|
27
|
+
This is a role-orchestration skill, not a native agent registration. Resolve the
|
|
28
|
+
role model by running:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" agents model reviewer --json --project "$PWD"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Spawn a collaboration agent for the bounded task. If the result names a model,
|
|
35
|
+
pass that model and use an empty or bounded context fork; otherwise inherit the
|
|
36
|
+
current model. Do not pass a reasoning-effort override: per-role effort belongs
|
|
37
|
+
to a separate accepted story. Give the spawned agent the role contract below
|
|
38
|
+
and the exact artifact/diff it must inspect. Wait for its final result.
|
|
39
|
+
|
|
40
|
+
## Role contract
|
|
41
|
+
|
|
42
|
+
You are a story-conformance reviewer running as an independent pass with a fresh
|
|
43
|
+
context, separate from the author — so a false "looks good" can't slip through
|
|
44
|
+
self-approval. A false approval costs far more than a false rejection: a story
|
|
45
|
+
marked done that isn't closed is exactly the vault-rot this role exists to stop.
|
|
46
|
+
|
|
47
|
+
Inspect everything yourself: `git status`, `git diff`, `git diff --staged`, and
|
|
48
|
+
read the changed files in FULL context (not just the hunks). Locate the bound
|
|
49
|
+
vault (`.projectstore/projectstore.json` → `vault_path`) and read the target story —
|
|
50
|
+
its Description, Decomposition, and **Acceptance Criteria** — plus the parent
|
|
51
|
+
epic and the plan if one was produced. If the caller named no story, ask the diff
|
|
52
|
+
which story it serves (grep the vault) before falling back to a plain code review.
|
|
53
|
+
|
|
54
|
+
**Evidence through the MCP tools when they are available.** When the projectstore MCP read tools are exposed to you (`status`, `orientation`, `search`, `get_artifact`, `neighbors`, `lineage`, `code_refs`, `doctor`), gather evidence through them: they answer from the live vault, so no freshness question arises, and an artifact's neighbourhood costs one call instead of a grep plus a read; every result is the CLI's `--json` envelope. When they are not — a host without MCP, or an install older than 0.28 — the derived views below are the fallback, under the rule that follows. `lineage` on the story returns its covering specs and their ADRs in one call; `code_refs` answers whether the parent epic's footprint needs widening; `search` locates the story and its acceptance text.
|
|
55
|
+
|
|
56
|
+
Derived views (kanban.md, code-map.md, graph.md) are precomputed vault indexes —
|
|
57
|
+
prefer them for orientation, but fall back to a frontmatter sweep when a view is
|
|
58
|
+
missing or its `generated_at` predates recent artifact changes (compare file mtimes; a false-stale just costs a sweep).
|
|
59
|
+
|
|
60
|
+
**Batch independent evidence calls into one turn.** Every turn re-reads your whole
|
|
61
|
+
accumulated context, so N single-call turns cost ~N× more input than one turn with
|
|
62
|
+
N parallel calls — with identical evidence collected. Changed files, the story, the
|
|
63
|
+
epic, and the specs don't depend on each other — read them together; go sequential
|
|
64
|
+
only when a result genuinely decides what to look at next. Quote paths with spaces
|
|
65
|
+
(vaults often live under iCloud paths).
|
|
66
|
+
|
|
67
|
+
**Additive acceptance (ADR-007).** Read the story's `specs:` list and every
|
|
68
|
+
covering spec: its Acceptance items attributed to this story (`— stories:
|
|
69
|
+
<id>`) plus every unattributed item are PART of this story's acceptance —
|
|
70
|
+
verify them exactly like the story's own criteria. A story closes only when
|
|
71
|
+
both sets are green and every covering spec is `active`. Report a covering
|
|
72
|
+
spec still in `draft` as a blocker under `spec_policy: required` (vault's
|
|
73
|
+
`.projectstore.json`).
|
|
74
|
+
|
|
75
|
+
## Phase 0 — Pre-commitment
|
|
76
|
+
From the story + file list, predict the 3-5 most likely gaps ("AC #3 needs an
|
|
77
|
+
error path the diff doesn't touch"; "touches a cache — invalidation risk"). Write
|
|
78
|
+
them down, then hunt each specifically.
|
|
79
|
+
|
|
80
|
+
## Phase 1 — Story conformance FIRST (the verdict's backbone)
|
|
81
|
+
For EVERY acceptance criterion: `met` / `not met` / `unverifiable`, each with
|
|
82
|
+
concrete evidence — the file:line that implements it, the test that asserts it,
|
|
83
|
+
or the command you ran (read-only) to observe it. Then the same for the
|
|
84
|
+
Decomposition items. Unchecked boxes that the diff actually satisfies: say so.
|
|
85
|
+
Code that satisfies no criterion: flag as scope creep, gently. A story is
|
|
86
|
+
**closed** only when every criterion is met or explicitly waived by the caller.
|
|
87
|
+
|
|
88
|
+
## Phase 2 — Correctness & quality (cite file:line)
|
|
89
|
+
- **Correctness** — logic errors, edge cases, error paths, async misuse,
|
|
90
|
+
ordering, idempotency, races, leaks.
|
|
91
|
+
- **Regressions & invariants** — does it break existing behavior or a documented
|
|
92
|
+
invariant of THIS codebase? Does it undo a prior fix?
|
|
93
|
+
- **Codebase & plan fit** — does the implementation match the placement plan (if
|
|
94
|
+
any) and the epic's established code shape (`code_refs`)? Deviations: justified
|
|
95
|
+
or accidental?
|
|
96
|
+
- **Tests** — do new/changed paths have tests that ASSERT the behavior? Run them
|
|
97
|
+
cheaply when checkable (read-only).
|
|
98
|
+
|
|
99
|
+
## Discovery ≠ filtering
|
|
100
|
+
Report every finding, severity + confidence annotated; recall is your job,
|
|
101
|
+
ranking is the consumer's.
|
|
102
|
+
|
|
103
|
+
## Self-audit
|
|
104
|
+
Re-read your blockers: confidence HIGH/MED/LOW; could the author refute it with
|
|
105
|
+
context you lack; genuine flaw or preference? Move low-confidence findings to
|
|
106
|
+
Open Questions. Don't manufacture findings; if the story is genuinely closed,
|
|
107
|
+
say so plainly.
|
|
108
|
+
|
|
109
|
+
## Output — your LAST message IS the deliverable
|
|
110
|
+
1. **Verdict** — `story closed` / `gaps remain` (+ `commit` / `fix first` for the
|
|
111
|
+
code itself) with the single most important reason.
|
|
112
|
+
2. **Acceptance matrix** — one line per criterion: status + evidence. Include
|
|
113
|
+
the covering specs' attributed + unattributed acceptance items (additive).
|
|
114
|
+
Format each evidence value so it can be persisted verbatim into the story
|
|
115
|
+
file at close: `— evidence: <test | command | file:line>` — the close gate
|
|
116
|
+
(`$projectstore-story close`) copies your matrix into the checkboxes.
|
|
117
|
+
3. **Findings** — severity-rated: `🔴 blocker` / `🟡 should-fix` / `🟢 nit`; each
|
|
118
|
+
with file:line, confidence, why it matters, and a specific fix.
|
|
119
|
+
4. **Proposed `code_refs`** — computed, not recalled: run
|
|
120
|
+
`node "${PROJECTSTORE_CORE_ROOT}/scripts/diff-refs.mjs" --since <story started_at>`
|
|
121
|
+
(story-scoped range; the script filters lockfiles/generated). When the
|
|
122
|
+
result looks implausible (`fallback: true`, empty, or obviously
|
|
123
|
+
over/under-attributed — shared branch, direct-to-main), say so and ask for
|
|
124
|
+
an explicit `--range` instead of guessing. State whether the parent epic's
|
|
125
|
+
footprint needs widening — the write happens in the approval-gated
|
|
126
|
+
`$projectstore-codemap set`, never here.
|
|
127
|
+
5. **Open Questions** — low-confidence findings, surfaced not blocking.
|
|
128
|
+
6. **Good** — genuine strengths, one line each. Skip if none.
|
|
129
|
+
|
|
130
|
+
No sycophancy, no rubber-stamping, no severity inflation. Read-only: report as
|
|
131
|
+
text; never edit vault files, never stage or commit.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: projectstore-runbook
|
|
3
|
+
description: "Create a new ops runbook (step-by-step how-to with verification & rollback). Arguments: <title>."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Runtime path
|
|
7
|
+
|
|
8
|
+
Resolve paths from this skill's own directory, never from the checkout or a
|
|
9
|
+
remembered cache path. The plugin root is two directories above this SKILL.md;
|
|
10
|
+
the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
|
|
11
|
+
any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
|
|
12
|
+
path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
|
|
13
|
+
Do not prefix the command with the assignment: a shell expands the quoted path
|
|
14
|
+
before that inline assignment takes effect. If the bundled core is missing, stop
|
|
15
|
+
and report a broken plugin install; do not fetch a different version from npm.
|
|
16
|
+
|
|
17
|
+
## User arguments
|
|
18
|
+
|
|
19
|
+
The source command's host-substituted argument token is rendered here as
|
|
20
|
+
`<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
|
|
21
|
+
shown command, replace that token with the actual arguments from the user's
|
|
22
|
+
request and shell-quote values safely. Never pass the angle-bracket token
|
|
23
|
+
literally and never treat it as a shell variable.
|
|
24
|
+
|
|
25
|
+
You are creating an ops runbook.
|
|
26
|
+
|
|
27
|
+
Steps:
|
|
28
|
+
|
|
29
|
+
1. Check config; stop if missing.
|
|
30
|
+
2. Run `node "${PROJECTSTORE_CORE_ROOT}/scripts/draft.mjs" runbook "<user-arguments>"`.
|
|
31
|
+
3. Preview path + first ~20 lines. When `index` is non-null, print `index.line` too — the exact row that will appear in the folder index, unless the index step reports a failure and no row lands at all.
|
|
32
|
+
4. the harness's user-input mechanism: Yes / Edit / No. This is the only gate: **Yes** covers the artifact and its index row. Disclose in the question that the folder's whole managed index table is regenerated from vault state at write time, so the update may also repair a stale row for another artifact.
|
|
33
|
+
5. Pre-write race check (Layer 1): `test -e "<path>"`. If exists, ask: **Overwrite**, **Use new slug** (`-2`), or **Cancel**.
|
|
34
|
+
6. On Yes (path free or overwrite confirmed): Write file.
|
|
35
|
+
7. Index row, if `index` is non-null — apply through the core, never Write/Edit, no second gate (step 4 covers it): `node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" reconcile --write --only indexes=<index.folder>` (runbooks live in `ops/` — always take the folder from the draft JSON, never from the kind name). The row is derived state: canonical order, atomic write, manual prose preserved. The file is already on disk, so a nonzero exit is a warning naming the folder (stderr with no JSON = rejected before any write, fix the header or restore the README; `error` in JSON = I/O failure, suggest `$projectstore-reconcile`), never a failed creation.
|
|
36
|
+
8. Suggest: "Fill `Purpose`, `Prerequisites`, numbered `Steps` with shell snippets, and always include `Verification` and `Rollback`."
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: projectstore-scaffold
|
|
3
|
+
description: "Scaffold the bound vault with the layout's folder structure and README index files. Arguments: [layout-name]."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Runtime path
|
|
7
|
+
|
|
8
|
+
Resolve paths from this skill's own directory, never from the checkout or a
|
|
9
|
+
remembered cache path. The plugin root is two directories above this SKILL.md;
|
|
10
|
+
the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
|
|
11
|
+
any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
|
|
12
|
+
path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
|
|
13
|
+
Do not prefix the command with the assignment: a shell expands the quoted path
|
|
14
|
+
before that inline assignment takes effect. If the bundled core is missing, stop
|
|
15
|
+
and report a broken plugin install; do not fetch a different version from npm.
|
|
16
|
+
|
|
17
|
+
## User arguments
|
|
18
|
+
|
|
19
|
+
The source command's host-substituted argument token is rendered here as
|
|
20
|
+
`<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
|
|
21
|
+
shown command, replace that token with the actual arguments from the user's
|
|
22
|
+
request and shell-quote values safely. Never pass the angle-bracket token
|
|
23
|
+
literally and never treat it as a shell variable.
|
|
24
|
+
|
|
25
|
+
You are creating the folder structure of the projectstore layout inside the bound vault.
|
|
26
|
+
|
|
27
|
+
Steps:
|
|
28
|
+
|
|
29
|
+
1. **Read config**: `cat .projectstore/projectstore.json`. If missing, tell user to run `$projectstore-bind <path>` and stop.
|
|
30
|
+
2. **Determine layout**: use `<user-arguments>` if provided, else `config.layout`.
|
|
31
|
+
3. **Load layout spec**: `cat "${PROJECTSTORE_CORE_ROOT}/scaffold/layouts/<layout>.json"`. Parse it.
|
|
32
|
+
4. **Show plan**: list every folder that will be created and which folders already exist. Mark new ones with `(create)`, existing with `(exists)`.
|
|
33
|
+
5. **Ask approval** via the harness's user-input mechanism: "Create the missing folders and READMEs? [Yes / Skip READMEs / No]".
|
|
34
|
+
6. **Execute**:
|
|
35
|
+
- For each folder in `layout.folders`:
|
|
36
|
+
- Create directory via `mkdir -p <vault>/<folder.path>`.
|
|
37
|
+
- If `folder.readme === true` and `<vault>/<folder.path>/README.md` does not exist:
|
|
38
|
+
- Read template: `cat "${PROJECTSTORE_CORE_ROOT}/templates/<lang>/folder-readme.md.tmpl"`.
|
|
39
|
+
- Substitute `{{folder_name}}` and `{{folder_description}}` based on the folder kind.
|
|
40
|
+
- Write the README via file-writing tool.
|
|
41
|
+
- Also create a top-level `<vault>/README.md` if missing — a simple index pointing to each folder.
|
|
42
|
+
7. **Print result**: tree of newly created files and a one-line "next step" suggestion.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: projectstore-search
|
|
3
|
+
description: "Search the bound vault for a phrase — literal, bounded, grouped by folder. Arguments: <query> [--kind <type>] [--status <status>] [--limit <n>] [--case-sensitive] [--include-derived]."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Runtime path
|
|
7
|
+
|
|
8
|
+
Resolve paths from this skill's own directory, never from the checkout or a
|
|
9
|
+
remembered cache path. The plugin root is two directories above this SKILL.md;
|
|
10
|
+
the bundled core is `<plugin-root>/node_modules/projectstore`. Before running
|
|
11
|
+
any ProjectStore command, export `PROJECTSTORE_CORE_ROOT` to that bundled-core
|
|
12
|
+
path in its own shell statement, then use `node "${PROJECTSTORE_CORE_ROOT}/…"`.
|
|
13
|
+
Do not prefix the command with the assignment: a shell expands the quoted path
|
|
14
|
+
before that inline assignment takes effect. If the bundled core is missing, stop
|
|
15
|
+
and report a broken plugin install; do not fetch a different version from npm.
|
|
16
|
+
|
|
17
|
+
## User arguments
|
|
18
|
+
|
|
19
|
+
The source command's host-substituted argument token is rendered here as
|
|
20
|
+
`<user-arguments>` (or `<user-arguments-without-fix>`). Before executing a
|
|
21
|
+
shown command, replace that token with the actual arguments from the user's
|
|
22
|
+
request and shell-quote values safely. Never pass the angle-bracket token
|
|
23
|
+
literally and never treat it as a shell variable.
|
|
24
|
+
|
|
25
|
+
You are searching the vault for the user's query through the core's `search` verb (roadmap A8: the command is a thin front-end; the deterministic search lives in `scripts/query.mjs` and answers identically over MCP).
|
|
26
|
+
|
|
27
|
+
Steps:
|
|
28
|
+
|
|
29
|
+
1. Run the verb. The query is a positional and travels **behind `--`**, so a phrase that starts with `-` (a flag name, say) is searched for rather than parsed; the options, if the user gave any, go before it:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
node "${PROJECTSTORE_CORE_ROOT}/bin/projectstore.mjs" search [--kind <type>] [--status <status>] [--limit <n>] [--case-sensitive] [--include-derived] -- "<query>"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The project resolves from the session's project directory; do not pass `--project`. Exit 3 means the project is unbound — say so and point at `$projectstore-bind <vault-path>`; exit 2 is a usage error — relay its message.
|
|
36
|
+
|
|
37
|
+
2. Print the output verbatim. It is already grouped by the vault's top-level folder with a count per group and `path:line snippet` lines; the header says how many matches there are, whether the list was cut (`--limit`, default 20, cap 100) and whether a file hit the per-file cap (`[N in file]`). The search is literal substring, case-insensitive unless `--case-sensitive`, over artifact bodies and `title:` lines; the derived views (the board, `code-map.md`, `graph.md`) are excluded unless `--include-derived`.
|
|
38
|
+
|
|
39
|
+
3. Zero matches is exit 0 and the output already suggests a shorter or case-insensitive phrase. Do not fall back to a shell `grep`: the verb is the search.
|
|
40
|
+
|
|
41
|
+
4. At the end, print a hint: "Open a file with the file-reading tool: `Read <vault_path>/<path>`" — `vault_path` is in `.projectstore/projectstore.json` (or `status --json` → `result.vault_path`); the search output prints vault-relative paths.
|