@mthanh/vespercli 1.5.1 → 1.7.0
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 +144 -88
- package/assets/CATALOG.md +19 -1
- package/assets/claude/agents/feature-wrap-document.md +138 -13
- package/assets/claude/agents/history-logger.md +22 -0
- package/assets/claude/agents/workspace-learner.md +45 -12
- package/assets/claude/commands/compact-knowledge.md +1 -1
- package/assets/claude/commands/revalidate-knowledge.md +17 -0
- package/assets/claude/context.md.tpl +38 -14
- package/assets/claude/skills/agent-fundamentals/SKILL.md +15 -0
- package/assets/claude/skills/agent-fundamentals/references/codebase-query.md +4 -0
- package/assets/claude/skills/gitlab-guardrails/SKILL.md +62 -0
- package/assets/claude/skills/vesper-catalog-editing-safety/SKILL.md +141 -0
- package/assets/claude/vesper-orchestrator.md +10 -0
- package/assets/core/agents/feature-wrap-document.agent.md +37 -11
- package/assets/core/agents/history-logger.agent.md +22 -0
- package/assets/core/agents/vesper.agent.md +5 -0
- package/assets/core/agents/workspace-learner.agent.md +43 -12
- package/assets/core/prompts/compact-knowledge.prompt.md +1 -1
- package/assets/core/prompts/revalidate-knowledge.prompt.md +19 -0
- package/assets/core/skills/agent-fundamentals/SKILL.md +15 -0
- package/assets/core/skills/agent-fundamentals/references/codebase-query.md +4 -0
- package/assets/hooks/pre-commit +17 -1
- package/assets/manifest.json +37 -0
- package/assets/skills/aesthetic/manifest.json +1 -1
- package/assets/skills/ai-multimodal/manifest.json +1 -1
- package/assets/skills/backend-development/manifest.json +1 -1
- package/assets/skills/better-auth/manifest.json +1 -1
- package/assets/skills/chrome-devtools/manifest.json +1 -1
- package/assets/skills/code-review/manifest.json +1 -1
- package/assets/skills/databases/manifest.json +1 -1
- package/assets/skills/debugging/manifest.json +1 -1
- package/assets/skills/devops/manifest.json +1 -1
- package/assets/skills/docs-seeker/manifest.json +1 -1
- package/assets/skills/document-skills/manifest.json +1 -1
- package/assets/skills/frontend-design/manifest.json +1 -1
- package/assets/skills/gitlab-guardrails/SKILL.md +62 -0
- package/assets/skills/gitlab-guardrails/manifest.json +8 -0
- package/assets/skills/google-adk-python/manifest.json +1 -1
- package/assets/skills/mcp-builder/manifest.json +1 -1
- package/assets/skills/mermaidjs-v11/manifest.json +1 -1
- package/assets/skills/premium-frontend-ui/manifest.json +6 -4
- package/assets/skills/problem-solving/manifest.json +1 -1
- package/assets/skills/react-mui-tanstack/manifest.json +16 -16
- package/assets/skills/sequential-thinking/manifest.json +1 -1
- package/assets/skills/skill-creator/manifest.json +1 -1
- package/assets/skills/tailwind-shadcn/manifest.json +102 -102
- package/assets/skills/vercel-react-best-practices/manifest.json +2 -2
- package/assets/skills/vesper-catalog-editing-safety/SKILL.md +141 -0
- package/assets/skills/vesper-catalog-editing-safety/manifest.json +8 -0
- package/assets/skills/vscode-agent-config/manifest.json +8 -0
- package/assets/skills/web-design-guidelines/manifest.json +1 -1
- package/assets/skills/web-frameworks/manifest.json +1 -1
- package/dist/cli.min.js +25 -25
- package/package.json +5 -2
- package/src/mcp/vesper-indexing/dist/constants.d.ts.map +1 -1
- package/src/mcp/vesper-indexing/dist/constants.js +3 -0
- package/src/mcp/vesper-indexing/dist/constants.js.map +1 -1
- package/src/mcp/vesper-indexing/package-lock.json +2 -2
- package/src/mcp/vesper-indexing/package.json +1 -1
|
@@ -125,32 +125,52 @@ If `EXISTING_CONTENT` is not empty, apply this merge strategy:
|
|
|
125
125
|
**Step 3c — Write/Edit the file:**
|
|
126
126
|
Use `Edit`/`Write` to generate or update `.claude/vesper/context.md`.
|
|
127
127
|
|
|
128
|
-
**This file is the single project-context document that helps every Vesper subagent code effectively in this project.**
|
|
128
|
+
**This file is the single always-injected project-context document that helps every Vesper subagent code effectively in this project.** It is auto-injected into EVERY session via root `CLAUDE.md`, so it is a **two-tier** structure: a bounded, freshness-stamped **slim core** (this file, ≤ 200 lines) plus an **on-demand tier** of `.claude/vesper/context/*.md` files that are NOT auto-imported and are read only when an agent needs that detail.
|
|
129
129
|
|
|
130
|
-
**
|
|
130
|
+
**Slim-core `context.md` — the ONLY sections that belong in the always-injected core:**
|
|
131
131
|
|
|
132
|
-
1. **
|
|
133
|
-
2. **
|
|
134
|
-
3. **
|
|
135
|
-
4. **
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
132
|
+
1. **Freshness header** (see format below) — placed immediately after the H1 title.
|
|
133
|
+
2. **Big Picture Architecture**: Major components, service boundaries, data flows, and the "why" behind decisions.
|
|
134
|
+
3. **Domain Model**: Core business concepts, naming conventions, key user flows — the "what this project does."
|
|
135
|
+
4. **Critical Workflows**: Build, test, and debug commands not obvious from file inspection.
|
|
136
|
+
|
|
137
|
+
Everything else moves to the **on-demand tier**, each replaced in the core by a **one-line pointer** of the form `> Detail: see \`.claude/vesper/context/<topic>.md\``:
|
|
138
|
+
|
|
139
|
+
- `.claude/vesper/context/conventions.md` — project-specific patterns that differ from common practice (was "Conventions").
|
|
140
|
+
- `.claude/vesper/context/integrations.md` — external dependencies, cross-component communication, Development Standards / Verification & CI/CD detail.
|
|
141
|
+
- `.claude/vesper/context/technical-debt.md` — known debt / ambiguities.
|
|
142
|
+
- `.claude/vesper/context/recent-decisions.md` — the bounded (N=10) Recent-Decisions ring buffer appended by `history-logger`; start it with a `# Recent Decisions` header and zero entries.
|
|
143
|
+
|
|
144
|
+
**Do NOT add any `.claude/vesper/context/*.md` file to the `CLAUDE.md` guard block** — the guard block imports only `orchestrator.md`, `orchestration.md`, and the slim core `context.md`. The on-demand files are pull, not push.
|
|
145
|
+
|
|
146
|
+
**Freshness header format** (Decision 3 — HTML-comment-free, machine-parseable; place it directly under the H1):
|
|
147
|
+
|
|
148
|
+
```markdown
|
|
149
|
+
## Freshness
|
|
150
|
+
|
|
151
|
+
- **Last full re-scan**: YYYY-MM-DD (commit `<7-hex-sha>`)
|
|
152
|
+
- **Last incremental update**: YYYY-MM-DD
|
|
153
|
+
- **Last revalidation**: YYYY-MM-DD
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Parse contract: each stamp is its own bullet `- **Label**: DATE`, DATE is ISO `YYYY-MM-DD`; the re-scan bullet additionally carries `(commit \`<7-hex>\`)`. A stamp that has never occurred takes the literal value `never` (e.g. `- **Last revalidation**: never`). **On a full regen (this Phase / `/reinit`)** you set `Last full re-scan` to today plus the current commit short-sha (get it via `git rev-parse --short HEAD`) AND reset `Last incremental update` to today. `Last revalidation` is only ever set by the `/revalidate-knowledge` flow — leave it untouched on a full regen (preserve its existing value, or `never` if absent).
|
|
139
157
|
|
|
140
158
|
**This file must NOT contain** (these go in `.claude/vesper/orchestration.md`):
|
|
141
159
|
|
|
142
160
|
- Team Roster tables
|
|
143
161
|
- Task Management configuration
|
|
144
162
|
|
|
163
|
+
**Technical Debt re-validation (on full regen / `/reinit`):** do NOT merely append to `technical-debt.md`. **Re-check every existing bullet against the current code and DROP the ones the code has resolved**, then add newly discovered debt. The Technical Debt file is a live view of what is *currently* broken/ambiguous, not an append-only ledger.
|
|
164
|
+
|
|
145
165
|
**Guidelines:**
|
|
146
166
|
|
|
147
|
-
- **
|
|
167
|
+
- **Slim and scannable**: the core is a hard ≤ 200-line budget (see enforcement below). Push depth into the on-demand tier, not the core.
|
|
148
168
|
- **Specific Examples**: Reference key files/directories or include code snippets to exemplify patterns.
|
|
149
169
|
- **No Fluff**: Avoid generic advice ("write tests", "handle errors"). Focus on THIS project's specific approaches.
|
|
150
170
|
- **Reality Check**: Document only discoverable patterns, not aspirational practices.
|
|
151
171
|
|
|
152
|
-
**Step 3d — Verify:**
|
|
153
|
-
After editing, use `Read` to confirm `.claude/vesper/context.md` exists,
|
|
172
|
+
**Step 3d — Verify (line-budget enforcement, Decision 4):**
|
|
173
|
+
After editing, run `wc -l .claude/vesper/context.md`. **If the core exceeds 200 lines**, extract the lowest-priority sections into the on-demand tier in this order — Conventions → Integrations → Technical Debt → Recent Decisions (i.e. everything outside Big Picture Architecture / Domain Model / Critical Workflows / Freshness) — replacing each extracted section with its one-line pointer, then re-run `wc -l` and repeat until the core is ≤ 200 lines. Then use `Read` to confirm `.claude/vesper/context.md` exists, carries the Freshness header, contains only the core sections + one-line pointers, and does NOT contain a Team Roster or Task Management section. Confirm each on-demand file referenced by a pointer actually exists.
|
|
154
174
|
|
|
155
175
|
##### File 2: `.claude/vesper/orchestration.md`
|
|
156
176
|
|
|
@@ -397,3 +417,16 @@ When invoked with a **roster review** request (via the `/revalidate-team` slash
|
|
|
397
417
|
|
|
398
418
|
7. Report the proposal to the user for confirmation before applying.
|
|
399
419
|
8. Once confirmed, run Phase 4 Steps 3-6 (install + verify installation + update roster + verify roster against catalog) scoped to only the approved changes.
|
|
420
|
+
|
|
421
|
+
## 🔁 Knowledge Revalidation Mode (`/revalidate-knowledge` only)
|
|
422
|
+
|
|
423
|
+
A separate, user-invoked mode (Vesper suggests it on staleness/drift, never auto-runs it). You own the whitepaper/archive side; `feature-wrap-document` runs the memory-graph side in parallel. Your job: **rescan → revalidate → re-balance**.
|
|
424
|
+
|
|
425
|
+
### Steps
|
|
426
|
+
|
|
427
|
+
1. **Reindex first**: call `mcp__vesper-indexing__vesper_reindex` with `{ "full": true }` (your standard mandatory reindex-first workflow) so revalidation runs against the current code.
|
|
428
|
+
2. **Review archived content** — read `.vesper/history-archive/` and `.vesper/.tracking/archive/`. This mode is the ONLY sanctioned reason to read these otherwise off-limits directories (they are excluded from the index and from all normal-pipeline reads). Revalidate the durable knowledge they captured against the current code; correct or drop anything the code no longer supports. **Prioritize `.unwrapped`-flagged archives** (slugs archived without a feature-wrap) for knowledge re-extraction.
|
|
429
|
+
3. **Re-balance the core/on-demand split** — re-derive the slim core (`.claude/vesper/context.md`: Freshness header + Big Picture Architecture + Domain Model + Critical Workflows only) and the on-demand tier, re-running the ≤ 200-line `wc -l` budget check and extracting any overflow (Decision 4 order: Conventions → Integrations → Technical Debt → Recent Decisions).
|
|
430
|
+
4. **Re-validate Technical Debt** — drop bullets the current code has resolved; keep/append only what still holds.
|
|
431
|
+
5. **Set the freshness stamp** — set `Last revalidation` in the core Freshness header to today's date (ISO `YYYY-MM-DD`). Leave `Last full re-scan` and its commit untouched unless you also did a full re-scan.
|
|
432
|
+
6. Report what was revalidated, corrected, dropped, re-extracted (especially from `.unwrapped` archives), and re-balanced.
|
|
@@ -4,7 +4,7 @@ description: Compact persisted Vesper knowledge (history.md, memory.jsonl, compl
|
|
|
4
4
|
|
|
5
5
|
Compact persisted Vesper knowledge. Delegate in parallel:
|
|
6
6
|
|
|
7
|
-
1. `history-logger` in Compaction Mode: rotate `.vesper/history.md` (archive entries older than the last 30 into `.vesper/history-archive/YYYYMM.md`)
|
|
7
|
+
1. `history-logger` in Compaction Mode: rotate `.vesper/history.md` (archive entries older than the last 30 into `.vesper/history-archive/YYYYMM.md`), archive `.vesper/.tracking/stories/completed/` entries older than 30 days, and archive each completed story's correlated `research/plans/details/prompts/changes` tracking artifacts into `.vesper/.tracking/archive/YYYYMM/<slug>/` (idempotent move; flag any slug with no recorded feature-wrap as `.unwrapped` so `/revalidate-knowledge` re-extracts it).
|
|
8
8
|
2. `feature-wrap-document` in Memory Compaction Mode: merge/dedupe stale entities in the MCP memory graph, never touching `current_task` or active entities.
|
|
9
9
|
|
|
10
10
|
Report what was archived/merged from both. Nothing is deleted — only moved to archive files or consolidated within the memory graph.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Revalidate archived Vesper knowledge against the current codebase and re-balance the slim-core/on-demand context split — a heavier, semantic re-validation pass distinct from /compact-knowledge trim/dedupe.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Re-establish the truth of the project whitepaper. Unlike `/compact-knowledge` (triggered on *size*, only trims/dedupes/archives non-destructively), this flow is triggered on *staleness/drift* and performs a genuine **semantic re-validation** of previously captured knowledge against the code as it actually is today. This is **user-invoked** — Vesper only ever *suggests* it (on staleness signals), never auto-runs it.
|
|
6
|
+
|
|
7
|
+
Delegate in parallel:
|
|
8
|
+
|
|
9
|
+
1. `workspace-learner` (inherits its mandatory reindex-first workflow):
|
|
10
|
+
- **Review all archived content** — `.vesper/history-archive/` and `.vesper/.tracking/archive/` (the only sanctioned reason to read these otherwise off-limits directories). Revalidate the durable knowledge they captured against the current code and decisions; correct or drop anything the code no longer supports. **Prioritize `.unwrapped`-flagged archives** (`/compact-knowledge` tags archived slugs that never got a feature-wrap) for knowledge re-extraction first.
|
|
11
|
+
- **Re-balance the context split** — re-derive the slim core (`.claude/vesper/context.md`: Big Picture Architecture + Domain Model + Critical Workflows + Freshness header only, ≤200 lines) and the on-demand tier (`.claude/vesper/context/{conventions,integrations,technical-debt,recent-decisions}.md`), extracting any core overflow back into the on-demand files.
|
|
12
|
+
- **Re-validate Technical Debt** — drop bullets the current code has resolved; keep/append only what still holds.
|
|
13
|
+
- On completion, set the `Last revalidation` stamp in the core Freshness header to today's date (per the freshness parse contract).
|
|
14
|
+
|
|
15
|
+
2. `feature-wrap-document` (memory-graph side): merge/dedupe and re-validate stale entities in the MCP memory graph against the revalidated whitepaper, never touching `current_task` or active entities.
|
|
16
|
+
|
|
17
|
+
Report what was revalidated, corrected, dropped, re-extracted (especially from `.unwrapped` archives), and re-balanced. Nothing is deleted — outdated knowledge is corrected in place or consolidated; source archives remain on disk.
|
|
@@ -1,33 +1,57 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: '
|
|
2
|
+
description: 'Slim project-context core (architecture, domain, workflows, freshness). Maintained by workspace-learner. Auto-injected into every session — detail lives in the on-demand .claude/vesper/context/ tier.'
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# Project Context
|
|
6
6
|
|
|
7
7
|
<!--
|
|
8
8
|
Populated by workspace-learner during setup / re-init, from a full codebase scan
|
|
9
|
-
(vesper-indexing MCP tools + targeted reads of root config files).
|
|
9
|
+
(vesper-indexing MCP tools + targeted reads of root config files).
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
TWO-TIER SHAPE — this file is auto-injected into EVERY session via root CLAUDE.md, so it is a
|
|
12
|
+
bounded, freshness-stamped SLIM CORE (hard budget: <= 200 lines). Everything else lives in an
|
|
13
|
+
ON-DEMAND tier under .claude/vesper/context/*.md (NOT auto-imported by CLAUDE.md; read only when
|
|
14
|
+
an agent needs that detail), each referenced from the core by a one-line pointer.
|
|
15
|
+
|
|
16
|
+
Core sections, in order (the ONLY sections that belong in this file):
|
|
17
|
+
|
|
18
|
+
1. Freshness header (see below) — immediately after the H1 title.
|
|
19
|
+
2. Big Picture Architecture — major components, service boundaries, data flows, and the "why"
|
|
12
20
|
behind decisions.
|
|
13
|
-
|
|
14
|
-
tools — the "how we write code here."
|
|
15
|
-
3. Verification & CI/CD — test framework, coverage expectations, CI pipeline, how to run/debug
|
|
16
|
-
tests locally.
|
|
17
|
-
4. Domain Model — core business concepts, naming conventions, key user flows — the "what this
|
|
21
|
+
3. Domain Model — core business concepts, naming conventions, key user flows — the "what this
|
|
18
22
|
project does."
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
4. Critical Workflows — build, test, and debug commands not obvious from file inspection.
|
|
24
|
+
|
|
25
|
+
Freshness header (HTML-comment-free, machine-parseable; place directly under the H1):
|
|
26
|
+
|
|
27
|
+
## Freshness
|
|
28
|
+
|
|
29
|
+
- **Last full re-scan**: YYYY-MM-DD (commit `<7-hex-sha>`)
|
|
30
|
+
- **Last incremental update**: YYYY-MM-DD
|
|
31
|
+
- **Last revalidation**: YYYY-MM-DD
|
|
32
|
+
|
|
33
|
+
Parse contract: each stamp is its own bullet `- **Label**: DATE` (ISO YYYY-MM-DD); the re-scan
|
|
34
|
+
bullet also carries `(commit `<7-hex>`)`. A stamp that never occurred takes the literal `never`.
|
|
35
|
+
Full regen sets Last full re-scan (+ commit) and resets Last incremental update; Last revalidation
|
|
36
|
+
is set only by /revalidate-knowledge.
|
|
37
|
+
|
|
38
|
+
On-demand tier (create as separate files, reference each by a one-line pointer from the core, e.g.
|
|
39
|
+
`> Detail: see `.claude/vesper/context/conventions.md``):
|
|
40
|
+
|
|
41
|
+
- .claude/vesper/context/conventions.md — project-specific patterns that differ from common practice.
|
|
42
|
+
- .claude/vesper/context/integrations.md — external deps, cross-component comms, dev standards / CI.
|
|
43
|
+
- .claude/vesper/context/technical-debt.md — known debt / ambiguities (re-validated on regen, not append-only).
|
|
44
|
+
- .claude/vesper/context/recent-decisions.md — bounded (N=10) Recent-Decisions ring buffer (history-logger).
|
|
22
45
|
|
|
23
46
|
Guidelines:
|
|
24
|
-
-
|
|
47
|
+
- Slim and scannable: push depth into the on-demand tier, not the core; verify with `wc -l` <= 200.
|
|
25
48
|
- Specific examples: reference key files/directories or include code snippets.
|
|
26
49
|
- No fluff: avoid generic advice ("write tests", "handle errors") — focus on THIS project.
|
|
27
50
|
- Reality check: document only discoverable patterns, not aspirational practices.
|
|
28
51
|
|
|
29
52
|
Seeding: if a similar project-context document already exists from a prior setup, seed this
|
|
30
53
|
file from it instead of re-scanning from zero — only run the full 4-perspective scan if no
|
|
31
|
-
such document exists yet. Only pull architecture/
|
|
32
|
-
|
|
54
|
+
such document exists yet. Only pull architecture/domain/workflow content into the core (extract
|
|
55
|
+
conventions/integrations/tech-debt into the on-demand tier) — never routing/roster mechanics,
|
|
56
|
+
those live in orchestration.md instead.
|
|
33
57
|
-->
|
|
@@ -21,6 +21,7 @@ Universal operating rules for every subagent in the Vesper ecosystem. These are
|
|
|
21
21
|
- Results include actual source code — skip `Read` unless you need wider surrounding context.
|
|
22
22
|
- If the index is empty or MCP unavailable → **STOP and report**. Do NOT silently fall back to directory traversals or `find` commands.
|
|
23
23
|
- For broader exploration beyond indexed content: `Grep`, `Glob` are acceptable secondary tools.
|
|
24
|
+
- **Archives are off-limits in normal pipelines**: never read, grep, or search `.vesper/history-archive/` or `.vesper/.tracking/archive/` during ordinary work — they are index-excluded and reachable only via `/revalidate-knowledge`. See [codebase-query.md](references/codebase-query.md).
|
|
24
25
|
|
|
25
26
|
## Terminal Discipline
|
|
26
27
|
|
|
@@ -51,6 +52,20 @@ See [tool-usage-patterns.md](references/tool-usage-patterns.md) for comprehensiv
|
|
|
51
52
|
| Edit a file | `Edit` | `sed -i`, `node -e "fs.writeFileSync()"` |
|
|
52
53
|
| Check errors | `Bash` (the project's own lint/typecheck command) | Manual terminal compilation |
|
|
53
54
|
|
|
55
|
+
## Secret & Credential Handling
|
|
56
|
+
|
|
57
|
+
**NEVER write a secret to a file.** No token, API key, password, private key, or connection string carrying an embedded secret may be written into any file you `Write` or `Edit` — regardless of git host, language, or task.
|
|
58
|
+
|
|
59
|
+
| Trigger | Required Action |
|
|
60
|
+
| ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
61
|
+
| A value about to be written looks like a token/credential/secret | **STOP** — do not write it. Require explicit user confirmation before proceeding. |
|
|
62
|
+
| You are a subagent and cannot ask the user directly | **Escalate, don't write** — surface the blocker and stop (same reflex as the Codebase Query Protocol's "STOP and report"), rather than silently writing the secret. Return `NEED_HELP` to the orchestrator so a human is asked before any write. |
|
|
63
|
+
| The user explicitly approves writing the value | Proceed, then **record the approved exception** back into the project's instructions (`CLAUDE.md` or the relevant `.claude/vesper/*.md`) so the same value isn't re-flagged on a later pass. |
|
|
64
|
+
|
|
65
|
+
- Detection is on the **value**, not the file: a secret-shaped string (a long random token, `ghp_…`/`glpat-…`-style prefixes, a PEM `-----BEGIN … PRIVATE KEY-----` block, a `user:password@host` connection URL) triggers the stop — even inside configs, tests, or docs.
|
|
66
|
+
- Prefer a placeholder or environment-variable reference (`${MY_TOKEN}`) over the literal secret whenever a file genuinely needs the name.
|
|
67
|
+
- When in doubt, halt and surface it — never silently work around it.
|
|
68
|
+
|
|
54
69
|
## Direct Collaboration (Nested Delegation)
|
|
55
70
|
|
|
56
71
|
If your toolset includes `Agent`, you may delegate directly to another specialist instead of returning `NEED_HELP` to the orchestrator. This is the preferred path for bounded assists — it saves a full round-trip through the orchestrator.
|
|
@@ -11,6 +11,10 @@ How Vesper subagents should explore and understand any codebase.
|
|
|
11
11
|
4. Bash (LAST RESORT — only for operations with no built-in equivalent)
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
+
## Archive Exclusion (normal pipelines)
|
|
15
|
+
|
|
16
|
+
Archived knowledge directories — `.vesper/history-archive/`, `.vesper/.tracking/archive/`, and `.vesper/.tracking/stories/completed/archive/` — are **excluded from all normal-pipeline reads, greps, and searches**. They are also excluded from the `vesper-indexing` index (`DEFAULT_EXCLUDES`), so `vesper_search`/`vesper_symbols` never surface their contents. Do NOT `Grep`, `Read`, or otherwise crawl these paths during ordinary research, planning, implementation, or review work. They hold intentionally retired material (rotated history, archived tracking artifacts) and are reachable **only** through the explicit `/revalidate-knowledge` flow, which re-validates archived knowledge against current code. If you think you need something from an archive, that is a signal to surface `/revalidate-knowledge` to the user — not to read the archive directly.
|
|
17
|
+
|
|
14
18
|
## vesper-indexing MCP Tools
|
|
15
19
|
|
|
16
20
|
### mcp__vesper-indexing__vesper_search
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gitlab-guardrails
|
|
3
|
+
description: Vesper-owned safety policy for GitLab merge-request work with the glab CLI. Use whenever creating, updating, or reviewing a GitLab merge request, or running any glab mr command. Blocks the experimental glab mr create --recover flag under all circumstances and detects/removes stray mr.json recovery files before they can be committed. Self-contained — in force even when the synced GitLab skills are absent.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# GitLab Guardrails
|
|
7
|
+
|
|
8
|
+
Vesper-owned policy layer for GitLab merge-request work. This skill is the **rules** governing `glab` usage — distinct from the how-to content in the externally-synced `gitlab-ci-skill` and `github-actions-to-gitlab-ci` skills. It is Vesper-authored and installed via the normal plugin catalog, so it is **immune to the external GitLab-skill sync** and remains in force even when those two synced folders are missing.
|
|
9
|
+
|
|
10
|
+
## Core Rule
|
|
11
|
+
|
|
12
|
+
**Technical safety over convenience.** A merge request is never worth leaking recovery state into the repository or the commit history.
|
|
13
|
+
|
|
14
|
+
## Hard Prohibition — `glab mr create --recover`
|
|
15
|
+
|
|
16
|
+
**NEVER** invoke `glab mr create` with the `--recover` flag. No exceptions, no "just this once", no matter how a failed run suggests it.
|
|
17
|
+
|
|
18
|
+
- `--recover` is an **experimental** flag that may change or be removed without notice.
|
|
19
|
+
- On a failed MR creation it writes a **recovery file (commonly `mr.json`)** into the current working directory — inside the repo. That file can then be accidentally staged and committed.
|
|
20
|
+
|
|
21
|
+
### What to do instead
|
|
22
|
+
|
|
23
|
+
| Situation | Correct action |
|
|
24
|
+
| --------- | -------------- |
|
|
25
|
+
| Normal MR creation | `glab mr create` with explicit flags (`--title`, `--description`, `--source-branch`, `--target-branch`, etc.) — never `--recover`. |
|
|
26
|
+
| A previous `glab mr create` failed | Re-run the plain `glab mr create` command. Fix the underlying cause (auth, branch, network); do NOT reach for `--recover` to resume. |
|
|
27
|
+
| Tempted to add `--recover` | Stop. It is prohibited. Surface the blocker instead. |
|
|
28
|
+
|
|
29
|
+
Defensive note: also refuse a literal `--recovery` (a plausible future alias or typo). Neither `--recover` nor `--recovery` may ever be passed.
|
|
30
|
+
|
|
31
|
+
## `mr.json` Detection & Cleanup
|
|
32
|
+
|
|
33
|
+
Treat **any** `mr.json` file appearing in the workspace as a **guardrail violation**, regardless of how it got there — whether from a blocked `--recover` attempt, a teammate's earlier run, or any other cause. It must never be staged or committed.
|
|
34
|
+
|
|
35
|
+
**Before any commit or push that touches a GitLab repo**, verify no `mr.json` is present:
|
|
36
|
+
|
|
37
|
+
1. Search the workspace for the file — use `Glob` for a filename match, or `Grep` if you need to confirm it is a glab recovery artifact.
|
|
38
|
+
2. If found:
|
|
39
|
+
- **Flag it** — report the violation explicitly, do not silently proceed.
|
|
40
|
+
- **Remove it** — delete the file from the working tree.
|
|
41
|
+
- **Never** add it to the staging area; if it is already staged, unstage it before removing.
|
|
42
|
+
3. Only after the workspace is confirmed free of `mr.json` may the commit/push proceed.
|
|
43
|
+
|
|
44
|
+
This check is mandatory and independent of whether `--recover` was ever used in the current session — a stray `mr.json` from any origin is a stop condition.
|
|
45
|
+
|
|
46
|
+
## Self-Contained Guarantee
|
|
47
|
+
|
|
48
|
+
This `--recover` / `mr.json` policy is **fully self-contained**. It applies:
|
|
49
|
+
|
|
50
|
+
- Even when the externally-synced GitLab skills (`gitlab-ci-skill`, `github-actions-to-gitlab-ci`) are **absent** — e.g. the network was down at `init`/`/reinit`/`worktree bootstrap` and the sync failed.
|
|
51
|
+
- Regardless of whether any `.gitlab-ci.yml` or migration work is happening.
|
|
52
|
+
|
|
53
|
+
The guardrail's value is **highest in a degraded environment**. Never read it as "only applies when the synced GitLab skills are present."
|
|
54
|
+
|
|
55
|
+
## Relationship to the Synced GitLab Skills (advisory only)
|
|
56
|
+
|
|
57
|
+
These cross-references are convenience pointers, not dependencies — this skill functions fully without them:
|
|
58
|
+
|
|
59
|
+
- For authoring or debugging `.gitlab-ci.yml` pipelines, consult the synced **`gitlab-ci-skill`** skill.
|
|
60
|
+
- For migrating GitHub Actions workflows to GitLab CI, consult the synced **`github-actions-to-gitlab-ci`** skill.
|
|
61
|
+
|
|
62
|
+
Those two skills document GitLab CI and `glab` usage; this skill supplies the Vesper-owned safety policy they do not contain.
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vesper-catalog-editing-safety
|
|
3
|
+
description: Pre-edit safety checklist for touching Vesper's own asset catalog and provisioning code — assets/, scripts/generate-claude-assets.js, src/cli/utils/settings.js, src/cli/utils/claude-target.js. Use before editing any catalog asset (agent, skill, prompt, instruction), the Claude-asset generator, or the Copilot/Claude settings-injection code in this repo. Prevents re-deriving the dual-target distribution model from scratch and catches the generator-boundary and git-hygiene-dual-list traps that have already caused a blocking architecture-review finding and a shipped bug.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Vesper Catalog Editing Safety
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
This repo (`@mthanh/vespercli`) is self-hosting: it produces the very agent/skill/prompt catalog it installs into itself and every other project. That self-hosting creates footguns that are easy to rediscover the hard way — one already caused a blocking architecture-review finding, another shipped as a real bug. This skill is a **pre-flight checklist**, not the narrative — walk it before touching provisioning code or catalog assets, and follow the links when you need the full story.
|
|
11
|
+
|
|
12
|
+
Full narrative + citations: [`docs/architecture.md`](../../../docs/architecture.md). Terse always-loaded version: `.claude/vesper/context.md`'s Conventions section. Read this skill first — it tells you *which* parts of those two documents matter for the edit in front of you.
|
|
13
|
+
|
|
14
|
+
## When to Use This Skill
|
|
15
|
+
|
|
16
|
+
Load this skill before:
|
|
17
|
+
|
|
18
|
+
- Editing anything under `assets/` — core, extended, or the generated `assets/claude/` tree
|
|
19
|
+
- Editing `scripts/generate-claude-assets.js`
|
|
20
|
+
- Editing `src/cli/utils/settings.js` or `src/cli/utils/claude-target.js`
|
|
21
|
+
- Planning or reviewing a change that touches how Copilot or Claude Code *discovers* a Vesper asset (settings arrays, plugin install, guard blocks, reinject hooks)
|
|
22
|
+
- Editing `.claude/rules/*.md`, `.vesper/instructions/`, or `.vesper/skills/` override paths
|
|
23
|
+
- Editing `VESPER_GIT_PATHS` (`settings.js`) or `assets/hooks/pre-commit`
|
|
24
|
+
- Reviewing a plan/PR that proposes any of the above — this is a research **and** review-time checklist, not just an implementation-time one
|
|
25
|
+
|
|
26
|
+
## Instructions
|
|
27
|
+
|
|
28
|
+
### Step 1 — Route the edit to the right trap
|
|
29
|
+
|
|
30
|
+
| You're touching... | Go to |
|
|
31
|
+
| ----------------------------------------------------------------------- | ------------ |
|
|
32
|
+
| A file under `assets/agents/`, `assets/skills/`, `assets/instructions/`, `assets/prompts/`, or `assets/claude/*` | Checklist A — Dual Asset Tree |
|
|
33
|
+
| `scripts/generate-claude-assets.js` itself | Checklist A |
|
|
34
|
+
| `.vesper/instructions/`, `.vesper/skills/`, or a new `.claude/rules/*.md` | Checklist B — Discovery Wiring |
|
|
35
|
+
| `getCoreAssetEntries()` or `VSCODE_SETTINGS_MAP` in `settings.js` | Checklist B |
|
|
36
|
+
| `ensureClaudeMdGuardBlock()` or `VESPER_REINJECT_COMMAND` in `claude-target.js` | Checklist B |
|
|
37
|
+
| `VESPER_GIT_PATHS` in `settings.js`, or `assets/hooks/pre-commit` | Checklist C — Git-Hygiene Dual List |
|
|
38
|
+
| Anything about which target (Copilot vs Claude) gets what | Checklist D — Distribution Model (background only) |
|
|
39
|
+
|
|
40
|
+
Most edits hit exactly one checklist. If unsure, read Checklist D first — it's the model everything else sits on.
|
|
41
|
+
|
|
42
|
+
### Checklist A — Dual Asset Tree (the highest-value trap)
|
|
43
|
+
|
|
44
|
+
`scripts/generate-claude-assets.js` has a narrow, explicit remit — verified against its own header comment (`scripts/generate-claude-assets.js:11-14`):
|
|
45
|
+
|
|
46
|
+
| Copilot source | Claude output |
|
|
47
|
+
| ------------------------------------------------------- | ----------------------------------------------------------- |
|
|
48
|
+
| `assets/agents/<name>/<name>.agent.md` | `assets/claude/agents/<name>.md` |
|
|
49
|
+
| `assets/prompts/<name>/<name>.prompt.md` | `assets/claude/commands/<name>.md` |
|
|
50
|
+
| `assets/skills/<name>/` | `assets/claude/skills/<name>/` (near-verbatim) |
|
|
51
|
+
| `assets/instructions/<name>/<name>.instructions.md` | `assets/claude/skills/<name>/SKILL.md` (new skill) |
|
|
52
|
+
|
|
53
|
+
**That table is the entire remit.** `assets/core/` is never read by this script, at all — by design, not by omission (the script's own comment: *"the 12 core agents + the orchestrator playbook are hand-authored separately in assets/claude/ and are never touched by this script"*).
|
|
54
|
+
|
|
55
|
+
- [ ] Is the file under `assets/core/`?
|
|
56
|
+
- **Yes** → There is no generator step for you. Hand-edit **both** the Copilot source (`assets/core/{agents,skills,instructions,prompts}/...`) **and** its `assets/claude/` twin. Before editing the twin, check it for **Claude-only content that doesn't exist in the Copilot source** and preserve it — e.g. `assets/claude/skills/agent-fundamentals/SKILL.md`'s `## Direct Collaboration (Nested Delegation)` section has no Copilot-side counterpart. Never diff the two sides expecting them to match; they're allowed to diverge by design.
|
|
57
|
+
- **No** (it's under `assets/agents/`, `assets/skills/`, `assets/instructions/`, or `assets/prompts/`) → Edit the Copilot source only, then run `node scripts/generate-claude-assets.js` to regenerate its Claude twin. **Never hand-edit anything under `assets/claude/`** for a file that came from this table — your edit will be silently clobbered (or drift undetected) the next time the generator runs.
|
|
58
|
+
- [ ] If you're editing `assets/claude/` directly right now — stop and confirm which case above you're actually in. Hand-editing generated output is the single most common way this trap gets tripped.
|
|
59
|
+
- [ ] If your task is planning/reviewing (not implementing) a catalog change: confirm the plan doesn't assume a core-skill/core-agent edit will "just flow through" the generator step. It won't — this exact wrong assumption produced a blocking architecture-review finding (BC-2) and a near-miss self-contradiction in an agent's own file-write rules in a prior session.
|
|
60
|
+
|
|
61
|
+
### Checklist B — Local Overrides vs. Discovery Wiring (per target)
|
|
62
|
+
|
|
63
|
+
"A file exists at the right path" and "the target actually discovers it" are two different guarantees — satisfied differently per target.
|
|
64
|
+
|
|
65
|
+
**Copilot** — `.vesper/instructions/*.instructions.md` and `.vesper/skills/**/SKILL.md` are project-local override paths. They are **inert on their own**.
|
|
66
|
+
|
|
67
|
+
- [ ] Does `getCoreAssetEntries()` (`src/cli/utils/settings.js:1321-1363`, appending entries around lines 1348-1360) explicitly include a `${workspaceFolder}/.vesper/instructions` and `${workspaceFolder}/.vesper/skills` entry in the arrays it writes into `.vscode/settings.json` (keyed by `VSCODE_SETTINGS_MAP`, `settings.js:70-75`)? If you're adding a *new* override path convention, it needs the equivalent wiring here — a path convention alone is invisible to Copilot without a matching settings-array entry. This exact gap was found and fixed once already.
|
|
68
|
+
|
|
69
|
+
**Claude Code** — `.claude/skills/{domain}/SKILL.md` needs no wiring; it's natively auto-discovered. `.claude/rules/{name}.md` is different — it has two moving parts, neither of which is native Claude Code behavior:
|
|
70
|
+
|
|
71
|
+
- [ ] Does `CLAUDE.md` carry an `@.claude/rules/{name}.md` import line **outside** the `<!-- vesper:start -->...<!-- vesper:end -->` guard block? (`ensureClaudeMdGuardBlock()`, `src/cli/utils/claude-target.js:257`.) Inside the guard block, it gets regenerated away on the next `update`/`/reinit`.
|
|
72
|
+
- [ ] Does the rule still need to survive `/clear`? The `SessionStart(clear)` reinject hook (`VESPER_REINJECT_COMMAND`, `claude-target.js:723-753`) dynamically enumerates `.claude/rules/*.md` at hook-fire time — sorted, `.md`-filtered — alongside the three fixed `.claude/vesper/*.md` playbook files. You don't need to register a new rule file anywhere for this to work; a missing `.claude/rules/` directory is swallowed by an outer try/catch (no-op). But if you're changing the *enumeration logic itself*, verify it still globs correctly.
|
|
73
|
+
|
|
74
|
+
### Checklist C — Git-Hygiene Dual List (no single source of truth)
|
|
75
|
+
|
|
76
|
+
`VESPER_GIT_PATHS` (`src/cli/utils/settings.js:173-185`) and the `vesper_git_paths` shell string in `assets/hooks/pre-commit:16` describe the same set of "project knowledge that must ride along with any commit touching other work." They are **hand-mirrored**, not generated from one source.
|
|
77
|
+
|
|
78
|
+
- [ ] Edited one list? Edit the other too, in the **same relative order**. There is no codegen link between them (open technical debt) — nothing will catch a divergence for you.
|
|
79
|
+
- [ ] Every entry is **slash-less** (`.claude/skills`, never `.claude/skills/`). A trailing slash turns the pre-commit hook's match clause (`case "$candidate" in "$p"/*)`) into a pattern with a literal double slash that never matches a real staged path — silently defeating the guardrail for that one entry. This has already shipped as a real bug once.
|
|
80
|
+
|
|
81
|
+
### Checklist D — Distribution Model (background, read when the trap isn't obvious)
|
|
82
|
+
|
|
83
|
+
- **Copilot**: nothing is copied into the project. Vesper injects settings entries (`chat.agentFilesLocations` / `chat.instructionsFilesLocations` / `chat.promptFilesLocations` / `chat.agentSkillsLocations`, see `VSCODE_SETTINGS_MAP` at `settings.js:70-75`) into `.vscode/settings.json`, pointing at the installed npm package's `assets/` tree. `getCoreAssetEntries()` (`settings.js:1321-1363`) assembles the full entry list.
|
|
84
|
+
- **Claude Code**: the catalog is a **user-level plugin**, installed once and shared across every project on the machine — `~/.claude/skills/vesper/{agents,commands,skills}/`. `getClaudePluginDir()` (`claude-target.js:36-38`) resolves the path; `installClaudePluginCatalog()` (`claude-target.js:157-171`) performs the install/refresh. Only a small per-project set of files lives in the repo itself: `.claude/vesper/{orchestrator,orchestration,context}.md`, `.mcp.json`, `.claude/settings.json`.
|
|
85
|
+
- Both targets share one on-disk index at `.vesper/index.db`.
|
|
86
|
+
|
|
87
|
+
If your edit changes *where* either target looks, or *what* gets written into the project vs. the shared install location, this is the model to reason from before touching Checklist A/B.
|
|
88
|
+
|
|
89
|
+
## Examples
|
|
90
|
+
|
|
91
|
+
### Example 1: Adding a brand-new skill to the extended catalog
|
|
92
|
+
|
|
93
|
+
**Input**: "Add a new skill `assets/skills/foo-bar/SKILL.md`."
|
|
94
|
+
|
|
95
|
+
**Process**:
|
|
96
|
+
1. Checklist A applies (extended tree, not `assets/core/`).
|
|
97
|
+
2. Write `assets/skills/foo-bar/SKILL.md` (+ any `references/`, `scripts/`, `assets/` subfolders) under the Copilot source tree only.
|
|
98
|
+
3. Do **not** hand-write anything under `assets/claude/skills/foo-bar/` — that's the generator's job.
|
|
99
|
+
4. Note in the handoff/PR that `node scripts/generate-claude-assets.js` must be run (by a maintainer or a later pipeline step with Bash access) before the skill exists on the Claude Code target.
|
|
100
|
+
|
|
101
|
+
### Example 2: Editing a core skill (`assets/core/skills/agent-fundamentals/`)
|
|
102
|
+
|
|
103
|
+
**Input**: "Add a new rule to `agent-fundamentals`'s Terminal Discipline table."
|
|
104
|
+
|
|
105
|
+
**Process**:
|
|
106
|
+
1. Checklist A applies, `assets/core/` branch — no generator step exists.
|
|
107
|
+
2. Edit `assets/core/skills/agent-fundamentals/SKILL.md` (Copilot source).
|
|
108
|
+
3. Before editing `assets/claude/skills/agent-fundamentals/SKILL.md`, re-read it fully — it already carries the Claude-only `## Direct Collaboration (Nested Delegation)` section that has no Copilot-side counterpart. Add the new rule to both files without disturbing that section.
|
|
109
|
+
|
|
110
|
+
### Example 3: Adding a `${workspaceFolder}`-relative override path for a new asset type
|
|
111
|
+
|
|
112
|
+
**Input**: "Support project-local overrides for prompts, the same way `.vesper/instructions` works today."
|
|
113
|
+
|
|
114
|
+
**Process**:
|
|
115
|
+
1. Checklist B applies (Copilot branch).
|
|
116
|
+
2. Confirm `getCoreAssetEntries()` in `settings.js` needs a new `${workspaceFolder}/.vesper/prompts`-style entry appended into the `chat.promptFilesLocations` array — the path convention alone will not make Copilot discover it.
|
|
117
|
+
3. Flag in the plan/review that this wiring step is required, not optional — it's the exact class of gap that was found and fixed once already in this repo.
|
|
118
|
+
|
|
119
|
+
## Edge Cases
|
|
120
|
+
|
|
121
|
+
**"I'm only touching `assets/claude/` to fix an obvious typo."** Still routes through Checklist A. If the source file is under the extended tree, fix the typo in the Copilot source and regenerate — don't patch the generated copy even for a one-character fix, or the next generator run silently reverts it.
|
|
122
|
+
|
|
123
|
+
**"The instruction/prompt/agent I'm adding doesn't map cleanly to the generator's table."** `assets/core/instructions/*.instructions.md` files are hand-folded into the orchestrator/rules constructs (Checklist B), not mechanically converted — there is no automatic instructions → Claude-skill path for core instructions the way there is for the extended tree.
|
|
124
|
+
|
|
125
|
+
**"I can't tell if a file is 'core' or 'extended.'"** Core = anything under `assets/core/`. Extended = `assets/agents/`, `assets/skills/`, `assets/instructions/`, `assets/prompts/` (no `core/` segment). If genuinely ambiguous, check whether an `assets/claude/` twin already exists and whether it looks hand-authored (has Claude-only sections) vs. mechanically generated (near-verbatim mirror) — that's a strong signal of which bucket it's in.
|
|
126
|
+
|
|
127
|
+
**"I don't have Bash tool access to run the generator."** Note it explicitly in your output/handoff rather than silently skipping it — the change is incomplete on the Claude Code target until a maintainer or a later pipeline step runs `node scripts/generate-claude-assets.js`.
|
|
128
|
+
|
|
129
|
+
## Related Files
|
|
130
|
+
|
|
131
|
+
- `assets/` — the Copilot-format source catalog (`core/` hand-authored default install; `agents/`, `skills/`, `instructions/`, `prompts/` extended/opt-in)
|
|
132
|
+
- `assets/claude/` — generated Claude-target twin of the extended tree, plus hand-maintained Claude-only twins of `assets/core/`
|
|
133
|
+
- `scripts/generate-claude-assets.js` — the extended-tree generator; never touches `assets/core/`
|
|
134
|
+
- `src/cli/utils/settings.js` — `VSCODE_SETTINGS_MAP`, `getCoreAssetEntries()`, `VESPER_GIT_PATHS`
|
|
135
|
+
- `src/cli/utils/claude-target.js` — `getClaudePluginDir()`, `installClaudePluginCatalog()`, `ensureClaudeMdGuardBlock()`, `VESPER_REINJECT_COMMAND`
|
|
136
|
+
- `assets/hooks/pre-commit` — the hand-mirrored `vesper_git_paths` shell list
|
|
137
|
+
|
|
138
|
+
## References
|
|
139
|
+
|
|
140
|
+
- [`docs/architecture.md`](../../../docs/architecture.md) — full narrative, all four facts, with additional citations and the specific incidents (BC-2 architecture-review finding, the trailing-slash bug) that motivated this checklist.
|
|
141
|
+
- `.claude/vesper/context.md` — terse, always-loaded version of the same conventions, auto-injected into every session in this repo.
|
|
@@ -63,6 +63,7 @@ For verified trivial edits, Vesper MAY perform the change directly instead of de
|
|
|
63
63
|
**What you may NOT read or forward** (for decision-making, routing, analysis, or subagent prompts — ever):
|
|
64
64
|
|
|
65
65
|
- Subagent definition file contents — you route by name, subagents read their own definitions
|
|
66
|
+
- Archived knowledge directories — `.vesper/history-archive/`, `.vesper/.tracking/archive/`, and `.vesper/.tracking/stories/completed/archive/` are excluded from all normal-pipeline reads, greps, and searches (and from the `vesper-indexing` index). They hold intentionally retired material and are reachable ONLY via the `/revalidate-knowledge` flow — never read or forward their contents during routine work.
|
|
66
67
|
|
|
67
68
|
**Fallback**: If no agent on the Team Roster matches a task, delegate to `technical-product-manager`.
|
|
68
69
|
|
|
@@ -107,6 +108,8 @@ All workspace-related actions live here: initialization, re-initialization, team
|
|
|
107
108
|
|
|
108
109
|
**Vesper ecosystem**: Subagents, skills, and slash commands — all sourced from the Vesper CLI (`vesper init --target claude`, `vesper add --target claude`, `vesper list --target claude`). No other source.
|
|
109
110
|
|
|
111
|
+
> **Exception — externally-synced GitLab skills (closed list).** Exactly two skills deviate from "no other source," and only these two: `gitlab-ci-skill` (from `https://gitlab.com/gitlab-org/ci-cd/gitlab-ci-skill.git`) and `github-actions-to-gitlab-ci` (from `https://gitlab.com/gitlab-org/ci-cd/github-actions-to-gitlab-ci.git`). **Location** is fully compliant — both install into the same Vesper-managed plugin dir (`~/.claude/skills/vesper/skills/`) as every other skill, so subagents still look in exactly one place. **Authorship/maintenance** is the sole carve-out — their *content* is pulled fresh from those two upstream GitLab repos on every `init`/`/reinit`/`worktree bootstrap`, rather than authored/vendored by Vesper. This list is closed: adding any third externally-synced skill (any other URL, host, or namespace) is **not** covered by this exception and requires a new documented exception plus architecture-review sign-off before implementation.
|
|
112
|
+
|
|
110
113
|
### State Check (before any work)
|
|
111
114
|
|
|
112
115
|
**Check**: Does `.claude/vesper/orchestration.md` exist with a **Team Roster** section?
|
|
@@ -220,6 +223,13 @@ Then **classify and route the new task as normal** — do not block on it. `/com
|
|
|
220
223
|
|
|
221
224
|
**Sibling suggestion — persisted knowledge, not context window**: `/compact` only summarizes *this conversation's* context window. It doesn't shrink what's on disk. At the same new-task detection point, if `.vesper/memory.jsonl` looks large (roughly >500 entities, or the file is large enough that a `read_graph` response feels unwieldy) or `.vesper/history.md` has grown long (roughly >150 entries), separately suggest `/compact-knowledge` — a different, non-destructive workflow that rotates old history into an archive file and merges stale memory entities, so a *future* session doesn't have to ingest all of it. These two suggestions are independent: don't conflate them, and don't block on either.
|
|
222
225
|
|
|
226
|
+
**Sibling suggestion — whitepaper staleness (`/revalidate-knowledge`)**: also independent of the two above. The slim-core whitepaper (`.claude/vesper/context.md`) carries a Freshness header (`- **Last full re-scan**: YYYY-MM-DD (commit `<7-hex>`)`, `- **Last incremental update**: …`, `- **Last revalidation**: …`; a stamp that never happened reads `never`). At the same new-task detection point, read that header and suggest the user run `/revalidate-knowledge` when EITHER staleness signal fires:
|
|
227
|
+
|
|
228
|
+
- **Time drift**: `Last full re-scan` is more than **30 days** old (relative to today).
|
|
229
|
+
- **Commit drift**: the freshly-fetched base-branch tip (kept current by the worktree base-branch-freshness flow) is **≥ 25 commits** ahead of the commit recorded in `Last full re-scan`.
|
|
230
|
+
|
|
231
|
+
**Dedupe**: suppress the suggestion if `Last revalidation` is within the last **7 days**. This block is the single canonical home for these three tunables — **30 days / 25 commits / 7 days**; any other orchestrator that mirrors this behavior references these same numbers rather than re-deriving them. The suggestion is non-blocking and **suggest-only — never auto-run `/revalidate-knowledge`** (it reads archives and performs a heavier semantic re-validation, which is the user's call). It is independent of `/compact` and `/compact-knowledge`; phrase it like: "The project whitepaper's last full re-scan was [N] days ago / the base branch is [N] commits ahead — consider `/revalidate-knowledge` to re-validate captured knowledge against the current code. I'll proceed either way."
|
|
232
|
+
|
|
223
233
|
### Classify the request
|
|
224
234
|
|
|
225
235
|
Classify every user request into exactly one purpose:
|
|
@@ -107,15 +107,15 @@ You WILL categorize knowledge using this example decision tree:
|
|
|
107
107
|
```
|
|
108
108
|
START: Is this a RULE about how to write/modify code?
|
|
109
109
|
├─ YES → INSTRUCTION
|
|
110
|
-
│ ├─ Applies to all files → .
|
|
111
|
-
│ ├─ Firebase-specific → .
|
|
112
|
-
│ ├─ Next.js-specific → .
|
|
113
|
-
│ ├─ Data patterns → .
|
|
114
|
-
│ └─ New category needed → Create .
|
|
110
|
+
│ ├─ Applies to all files → .vesper/instructions/common.instructions.md
|
|
111
|
+
│ ├─ Firebase-specific → .vesper/instructions/firebase.instructions.md
|
|
112
|
+
│ ├─ Next.js-specific → .vesper/instructions/nextjs.instructions.md
|
|
113
|
+
│ ├─ Data patterns → .vesper/instructions/data-access-patterns.instructions.md
|
|
114
|
+
│ └─ New category needed → Create .vesper/instructions/{category}.instructions.md
|
|
115
115
|
│
|
|
116
116
|
├─ NO → Is this a REPEATABLE WORKFLOW with multiple steps?
|
|
117
117
|
├─ YES → SKILL
|
|
118
|
-
│ └─ **Call `#runSubagent: Skill Creator Agent`** to create/update .
|
|
118
|
+
│ └─ **Call `#runSubagent: Skill Creator Agent`** to create/update .vesper/skills/{domain}/SKILL.md
|
|
119
119
|
│
|
|
120
120
|
└─ NO → Is this ARCHITECTURAL or REFERENCE information?
|
|
121
121
|
├─ YES → **Call `#runSubagent: SE: Tech Writer`** to create/update document **For Documentation** with audience is **Technical Leaders**:
|
|
@@ -135,6 +135,8 @@ START: Is this a RULE about how to write/modify code?
|
|
|
135
135
|
|
|
136
136
|
You MUST present ALL proposed updates as a numbered summary, then wait for user to approve by number (partial approval supported).
|
|
137
137
|
|
|
138
|
+
**Scope of this approval gate (important):** this numbered-approval workflow applies ONLY to genuinely **structural** edits of the injected `.github/copilot-instructions.md` core (Big Picture Architecture / Domain Model / Critical Workflows) and of the on-demand tier's Conventions / Integrations / Technical Debt files (`.claude/vesper/context/{conventions,integrations,technical-debt}.md`, Claude-namespaced but shared across targets). It does **NOT** cover the trivial, high-frequency `.claude/vesper/context/recent-decisions.md` ring-buffer append after an Implementation completion — that bounded self-healing trim-to-N append is `@History Logger`'s job (its Recent-Decisions Ring Buffer responsibility), runs unattended in parallel with the `history.md` append, and must never be routed through this approval loop. Do not propose or apply `recent-decisions.md` line appends here.
|
|
139
|
+
|
|
138
140
|
### Step 1: Analyze and Generate All Proposals
|
|
139
141
|
|
|
140
142
|
You WILL:
|
|
@@ -280,7 +282,7 @@ You WILL after all approved updates are applied:
|
|
|
280
282
|
|
|
281
283
|
## Knowledge Type Guidelines
|
|
282
284
|
|
|
283
|
-
### Instructions (.
|
|
285
|
+
### Instructions (.vesper/instructions/\*.md)
|
|
284
286
|
|
|
285
287
|
**Characteristics:**
|
|
286
288
|
|
|
@@ -292,6 +294,13 @@ You WILL after all approved updates are applied:
|
|
|
292
294
|
**Format:**
|
|
293
295
|
|
|
294
296
|
```markdown
|
|
297
|
+
---
|
|
298
|
+
description: 'Short description of what this instruction file governs'
|
|
299
|
+
applyTo: '**/*.tsx, **/*.ts'
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
# [Instruction File Title]
|
|
303
|
+
|
|
295
304
|
### [Rule Name]
|
|
296
305
|
|
|
297
306
|
[Brief explanation of rule and context]
|
|
@@ -310,6 +319,8 @@ You WILL after all approved updates are applied:
|
|
|
310
319
|
**Applies to:** [scenarios where rule is relevant]
|
|
311
320
|
```
|
|
312
321
|
|
|
322
|
+
The `---`-delimited frontmatter is REQUIRED: `description` (single-quoted) plus `applyTo` (single-quoted, comma-separated glob(s)) — this is what scopes the instruction file in Copilot's discovery, mirroring real examples like `reactjs.instructions.md`. For a machine/pipeline instruction that is NOT file-scoped (applies process-wide, not to a file glob), you MAY use description-only frontmatter and omit `applyTo`.
|
|
323
|
+
|
|
313
324
|
**Examples:**
|
|
314
325
|
|
|
315
326
|
- "Always use path aliases instead of relative imports"
|
|
@@ -318,7 +329,7 @@ You WILL after all approved updates are applied:
|
|
|
318
329
|
|
|
319
330
|
---
|
|
320
331
|
|
|
321
|
-
### Skills (.
|
|
332
|
+
### Skills (.vesper/skills/{name}/SKILL.md)
|
|
322
333
|
|
|
323
334
|
**Characteristics:**
|
|
324
335
|
|
|
@@ -427,7 +438,7 @@ You WILL after all approved updates are applied:
|
|
|
427
438
|
- **Pattern**: Phased implementation with typed placeholders
|
|
428
439
|
- **Problem solved**: Blocked progress due to complex feature dependency
|
|
429
440
|
- **Knowledge type**: Instruction
|
|
430
|
-
- **Target**: `.
|
|
441
|
+
- **Target**: `.vesper/instructions/firebase.instructions.md`
|
|
431
442
|
|
|
432
443
|
**Proposal:**
|
|
433
444
|
|
|
@@ -510,11 +521,14 @@ You WILL respond to these user commands:
|
|
|
510
521
|
- **READ**: Use any read tool across entire workspace for analysis
|
|
511
522
|
- **WRITE**: Modify files ONLY after explicit user approval by number
|
|
512
523
|
- **ALLOWED WRITES**:
|
|
513
|
-
- `.
|
|
514
|
-
- `.
|
|
524
|
+
- `.vesper/instructions/*.instructions.md` (coding rules/conventions — Copilot's per-rule instruction files, wired via `chat.instructionsFilesLocations`, kept OUT of the auto-injected `.github/copilot-instructions.md` core)
|
|
525
|
+
- `.claude/vesper/context/conventions.md`, `.claude/vesper/context/integrations.md`, `.claude/vesper/context/technical-debt.md` — shared on-demand tier (default home for durable whitepaper Conventions / Integrations / Technical Debt; Claude-namespaced paths shared across targets)
|
|
526
|
+
- `.github/copilot-instructions.md` — structural slim-core only (Big Picture Architecture / Domain Model / Critical Workflows / Freshness); bump `Last incremental update` on a gated structural edit
|
|
527
|
+
- `.vesper/skills/**/SKILL.md`
|
|
515
528
|
- `docs/*.md`
|
|
516
529
|
- `README.md`
|
|
517
530
|
- **FORBIDDEN WRITES**:
|
|
531
|
+
- `.claude/vesper/context/recent-decisions.md` — `@History Logger`'s ring buffer, never written here
|
|
518
532
|
- Source code files (unless explicitly requested)
|
|
519
533
|
- Configuration files
|
|
520
534
|
- Planning/tracking files (`.vesper/.tracking/*`)
|
|
@@ -562,6 +576,18 @@ A **separate, explicitly-invoked mode**, distinct from your normal per-task memo
|
|
|
562
576
|
|
|
563
577
|
**Never** perform this compaction as a side effect of a normal feature-wrap invocation — only when explicitly asked for compaction.
|
|
564
578
|
|
|
579
|
+
## 🔁 Knowledge Revalidation Mode (`/revalidate-knowledge` only — never the default behavior)
|
|
580
|
+
|
|
581
|
+
A **separate, explicitly-invoked mode**, distinct from both your normal per-task memory-update job and Memory Compaction Mode above. Runs when Vesper delegates the `/revalidate-knowledge` flow (user-invoked, suggested on staleness/drift). `@Workspace Learner` handles the whitepaper/archive-revalidation and core/on-demand re-balance side of the same request in parallel — this mode is scoped to the **memory graph only**, and unlike Compaction Mode (which just merges/dedupes on *size*) it **re-validates** entities against the freshly revalidated whitepaper and current code.
|
|
582
|
+
|
|
583
|
+
1. `read_graph()` (or `search_nodes` broadly) to see the full set of entities.
|
|
584
|
+
2. Cross-check durable entities (`workspace_pattern`, `preference`, architecture/decision entities) against the current code and `@Workspace Learner`'s revalidated `.claude/vesper/context.md` core + on-demand tier. Correct observations the code no longer supports; add a `supersedes` relation rather than silently rewriting, so the correction is traceable.
|
|
585
|
+
3. Give priority to knowledge tied to `.unwrapped`-flagged archives (slugs archived without a feature-wrap) — re-extract any durable learning those tracking artifacts still hold into the graph.
|
|
586
|
+
4. Merge/dedupe as in Compaction Mode where entities are now redundant post-revalidation. Never touch `current_task` or anything with an active relation.
|
|
587
|
+
5. Report: entities revalidated, corrected, superseded, and re-extracted from flagged archives.
|
|
588
|
+
|
|
589
|
+
**Never** perform revalidation as a side effect of a normal feature-wrap invocation — only when explicitly asked via `/revalidate-knowledge`.
|
|
590
|
+
|
|
565
591
|
## Terminal Discipline
|
|
566
592
|
|
|
567
593
|
- **Tools-first, terminal-last**: Never use terminal for tasks built-in tools handle (`read_file`, `grep_search`, `file_search`, `create_file`, `replace_string_in_file`). Never use `python -c`, `node -e`, or shell commands to read, write, or modify files.
|