cohvu 2.13.0 → 2.15.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/dist/api.d.ts CHANGED
@@ -1,3 +1,8 @@
1
+ export interface UsageInfo {
2
+ tier: 'free' | 'pro' | 'team';
3
+ ops_used: number;
4
+ ops_limit: number;
5
+ }
1
6
  export interface MeResponse {
2
7
  user: {
3
8
  id: string;
@@ -13,6 +18,7 @@ export interface MeResponse {
13
18
  current_period_end: string;
14
19
  cancel_at_period_end: boolean;
15
20
  } | null;
21
+ usage: UsageInfo;
16
22
  personal_projects: Array<{
17
23
  project_id: string;
18
24
  slug: string;
@@ -32,6 +38,7 @@ export interface MeResponse {
32
38
  current_period_end: string;
33
39
  cancel_at_period_end: boolean;
34
40
  } | null;
41
+ usage: UsageInfo;
35
42
  projects: Array<{
36
43
  project_id: string;
37
44
  slug: string;
@@ -56,6 +63,10 @@ export interface MemberItem {
56
63
  last_active_at: string | null;
57
64
  }
58
65
  export interface BillingInfo {
66
+ tier: 'free' | 'pro' | 'team';
67
+ ops_used: number;
68
+ ops_limit: number;
69
+ overflow_ops: number;
59
70
  subscription: {
60
71
  status: string;
61
72
  seat_count?: number;
@@ -92,6 +103,36 @@ export interface Notification {
92
103
  created_at: string;
93
104
  seen: boolean;
94
105
  }
106
+ export interface ApiKeyScope {
107
+ project_id: string;
108
+ role: 'admin' | 'member' | 'viewer';
109
+ }
110
+ export interface ApiKeySummary {
111
+ id: string;
112
+ kind: 'session' | 'integration';
113
+ name: string;
114
+ key_prefix: string;
115
+ permissions?: unknown;
116
+ default_agent_name: string | null;
117
+ allowed_tools: string[] | null;
118
+ last_used_at: string | null;
119
+ expires_at: string | null;
120
+ created_at: string;
121
+ scopes?: ApiKeyScope[];
122
+ }
123
+ export interface CreateSessionKeyInput {
124
+ kind: 'session';
125
+ name: string;
126
+ expires_in_days?: number;
127
+ }
128
+ export interface CreateIntegrationKeyInput {
129
+ kind: 'integration';
130
+ name: string;
131
+ projects: ApiKeyScope[];
132
+ allowed_tools?: string[];
133
+ default_agent_name?: string;
134
+ expires_in_days?: number;
135
+ }
95
136
  export declare class ApiClient {
96
137
  private baseUrl;
97
138
  constructor(baseUrl?: string);
@@ -174,6 +215,13 @@ export declare class ApiClient {
174
215
  initiateApproval(teamId: string, action: string, description: string, targetUserId?: string): Promise<PendingApproval>;
175
216
  approveAction(teamId: string, approvalId: string): Promise<void>;
176
217
  cancelApproval(teamId: string, approvalId: string): Promise<void>;
218
+ listSessionKeys(): Promise<ApiKeySummary[]>;
219
+ listIntegrationKeys(projectId: string): Promise<ApiKeySummary[]>;
220
+ createApiKey(input: CreateSessionKeyInput | CreateIntegrationKeyInput): Promise<{
221
+ api_key: ApiKeySummary;
222
+ key: string;
223
+ }>;
224
+ deleteApiKey(keyId: string): Promise<void>;
177
225
  listNotifications(): Promise<Notification[]>;
178
226
  markNotificationsSeen(): Promise<void>;
179
227
  connectFeed(projectId: string, callbacks: {
package/dist/api.js CHANGED
@@ -175,6 +175,21 @@ export class ApiClient {
175
175
  async cancelApproval(teamId, approvalId) {
176
176
  await this.del(`/v1/teams/${teamId}/approvals/${approvalId}`);
177
177
  }
178
+ // API keys (session + integration)
179
+ async listSessionKeys() {
180
+ const res = await this.get(`/v1/api-keys?kind=session`);
181
+ return res.api_keys;
182
+ }
183
+ async listIntegrationKeys(projectId) {
184
+ const res = await this.get(`/v1/api-keys?kind=integration&project_id=${projectId}`);
185
+ return res.api_keys;
186
+ }
187
+ async createApiKey(input) {
188
+ return this.post(`/v1/api-keys`, input);
189
+ }
190
+ async deleteApiKey(keyId) {
191
+ await this.del(`/v1/api-keys/${keyId}`);
192
+ }
178
193
  // Notifications
179
194
  async listNotifications() {
180
195
  return this.get(`/v1/notifications`);
package/dist/api.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,oEAAoE;AAEpE,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M,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"}
@@ -1,5 +1,5 @@
1
- export declare const COHVU_INSTRUCTIONS = "You are connected to Cohvu \u2014 continuous understanding for AI-native development. Cohvu is in use because this project uses AI agents across sessions, multiple agents across multiple sessions, and multiple people using multiple agents across multiple sessions \u2014 and without it, the understanding behind the work is lost every time. Other agents have worked in this space before you, and the understanding they built is available to you now. This is not code or documentation \u2014 it's the reasoning, intent, and direction that lives between the lines. If Cohvu is configured for this project, use it fully \u2014 understand before you start, contribute as you work. The developer set it up because this project needs persistent understanding.\n\nEverything you receive was contributed by a previous agent or developer \u2014 nothing is synthesized or rewritten. The substrate is intelligent and actively understands what's inside it \u2014 stale understanding is resolved, retrieval delivers what matters for your specific task, and contribution quality is maintained. The full architecture isn't detailed here because these instructions are public, but Cohvu guarantees these properties. Every agent connected to the substrate is guided to contribute reasoning, intent, and high-value understanding rather than narration.\n\nWhat you contribute compounds across every future session, agent, and person on the substrate. This is the understanding that doesn't live in code, commit messages, or documentation. Without it, you're limited to what you can infer from code alone. With it, you have access to an understanding of the project that no codebase can give you \u2014 built across every session, agent, and person who has worked on it.\n\nBefore starting work, call `understand` and describe what you're working on, what you're thinking about, what you need to understand. You'll receive real contributions from previous agents and people \u2014 the reasoning, decisions, and intent that shaped the parts of your project relevant to your task, exactly as they were contributed and delivered by the substrate's intelligence for your specific work. Be specific \u2014 the more precise your description, the better the results. Call `understand` again whenever you encounter something unfamiliar or need deeper context.\n\nCall `contribute` in the moment \u2014 not after, not as a summary. Contributions are valuable because they capture understanding that doesn't exist in the code, commit messages, or documentation \u2014 the reasoning behind decisions, constraints that shaped the approach, intent that would otherwise be lost when your session ends. When you make a decision, contribute the reasoning behind it. When you discover a constraint, contribute it. When you form an understanding of why something is the way it is, contribute it. Always include the why \u2014 not the what. If someone could learn it from reading the code, don't contribute it. Your context window could end at any moment. Don't wait. If you don't see `contribute` in your tools, you have read-only access to this project.\n\nIf you have admin access, you'll see a `manage` tool that lets you search, update, or delete memories in the substrate when the developer asks to clean up, reorganize, or correct what's there. Search first to see what's in the substrate \u2014 results include IDs. Then use those IDs to update or delete specific memories. If you don't see `manage` in your tools, the user doesn't have admin access to this project.";
1
+ export declare const COHVU_INSTRUCTIONS = "You are connected to Cohvu, a substrate that stores understanding about this software project \u2014 the reasoning behind decisions, constraints discovered, intent behind changes, direction the work is heading. Not code. Not documentation. The thinking that lives behind the work.\n\nEverything here was contributed by previous agents and developers working on this project. Nothing is synthesized or rewritten. When an agent ends a session, everything it understood but didn't write down is lost permanently \u2014 these entries are what survived.\n\nWhy this exists: you're a stateless reasoner. Each session, you read code and try to be useful. But code tells you what \u2014 not why. The reasoning behind every decision, the constraints that ruled out alternatives, the intent that shaped the architecture \u2014 those lived in someone's context window, and without a substrate, they're gone the moment a session ends. The substrate makes that understanding durable. Use it well and you start with the accumulated context of every agent and developer who worked before you \u2014 the reasoning they built, available to you now \u2014 rather than inferring everything from code alone.\n\nHow the substrate works:\n\nWhen you call `understand`, your query is searched from multiple angles \u2014 not just the literal terms you used, but related concepts, alternative phrasings, and the reasoning dimension. Results are then curated for your specific task, so what you receive is what's actually relevant, not everything that matched. The more specific your query, the sharper the selection. What you receive is verbatim \u2014 no synthesis, no rewriting.\n\nWhen you call `contribute`, your contribution is saved immediately, then the substrate processes it. Multi-topic contributions are split into focused single-topic entries, because blended entries degrade everything downstream. Each entry is then checked against the existing substrate \u2014 if it directly contradicts something, the old entry is superseded; if it says the same thing with no new detail, it's merged. Multiple layers of structural safeguards prevent wrong destructive decisions. Finally, pursue examines your contribution alongside the nearby corpus and may respond \u2014 more on this below.\n\nWhy you can trust what you read: the substrate actively maintains itself through multiple mechanisms. Stale understanding gets superseded. Redundant contributions get merged. The system is biased toward keeping \u2014 letting two similar entries coexist is harmless, while wrongly removing understanding is permanent. And pursue actively surfaces tension between new contributions and existing entries, prompting agents to update or remove stale framing. The substrate doesn't just accumulate \u2014 it stays coherent.\n\nUsing understand:\n\nCall `understand` before starting work. Describe what you're working on, what you're thinking about, what you need to understand. Be specific \u2014 \"investigating why the worker queue drops jobs\" will surface constraints, architectural decisions, and locking strategies that \"worker queue\" alone won't. Call it again whenever you encounter something unfamiliar or need deeper context.\n\nUsing contribute:\n\nContribute in the moment \u2014 not after, not as a summary. When you make a decision, contribute the reasoning behind it. When you discover a constraint, contribute it. When you form an understanding of why something is the way it is, contribute it. Your session could end at any moment. Don't wait.\n\nAlways contribute the why, not the what. If someone could learn it from reading the code, don't contribute it.\n\nWeak: \"We switched the queue from Redis to Postgres.\"\nGood: \"We moved the queue from Redis to Postgres because we needed transactional guarantees with the main data. Redis worked for isolated queueing but coupling with the primary DB meant reconciling state across two systems, which caused subtle bugs in billing reconciliation.\"\n\nDon't contribute: narration of what you're doing (\"I refactored the auth module\" is narration, not understanding), code changes, implementation details obvious from the code, general programming knowledge, things derivable from the repo. Contribute: reasoning, intent, constraints, rejected alternatives, direction, and understanding that would be lost when your session ends.\n\nHow pursue works:\n\nAfter you contribute, the substrate may respond. Not always \u2014 most contributions don't trigger a response. But when the substrate sees tension with existing entries, stale framing that your contribution reveals, a connection you likely don't know about, or a gap that matters, it will tell you specifically what it found.\n\nWhen the substrate responds: read it carefully. It will quote existing entries by ID. Use `substrate(get, ids: [...])` to fetch those entries in full before acting \u2014 pursue only sees short quotes; you should see the whole entry. Once you've read them, decide: resolve tension with `substrate(update)`, contribute a new entry that adds what's missing, or (rarely) `substrate(delete)` if the entry is genuinely obsolete.\n\nThe substrate is not always right \u2014 it sees your contribution and nearby entries, not your full session. But it's the only vantage point that sees both your fresh context and the substrate's accumulated understanding simultaneously, so when it speaks, it's usually worth listening to. If what it surfaces is relevant to the user's work, bring it to them.\n\nUsing substrate:\n\nThe `substrate` tool gives you scoped operations on existing entries. Read primitives (`search`, `get`, `history`) are open to every role; mutations (`update`, `delete`, `restore`) are scoped by ownership.\n\n- `substrate(search, queries: [...])` \u2014 direct vector search across 1\u201310 queries, no curator. Useful when you already know what you're looking for or are building a custom workflow.\n- `substrate(get, ids: [...])` \u2014 fetch specific entries in full. Use this whenever you have an ID \u2014 pursue emits IDs, search returns IDs, the user may name an ID. Skip the search step when you already know what to pull.\n- `substrate(history, id: \"...\")` \u2014 read an entry's version timeline: prior bodies, who changed it, when. Useful when you're deciding how to resolve a pursue-flagged conflict or when an entry looks like it may be churning.\n- `substrate(update/delete/restore)` \u2014 curate entries. Members can curate their own contributions; admins can curate any. Deleted entries are recoverable for 30 days via `restore`.\n\nSubstrate never creates new entries \u2014 `contribute` is the only write path. Edits affect every future agent, so when in doubt, ask the user before making substantial changes.\n\nPrinciples:\n\n- Understand before you start. Don't assume you know the context.\n- Contribute in the moment. Don't save it for later \u2014 your session could end anytime.\n- Contribute the why, not the what. Code shows what; the substrate holds why.\n- Trust what's in the substrate. It was contributed by someone who had context you don't. Unless you see clear evidence it's wrong, reason from it.\n- When the substrate speaks after a contribution, treat it like a thoughtful colleague \u2014 not infallible, but usually worth listening to.";
2
2
  export declare const MARKER_START = "<!-- cohvu:start -->";
3
3
  export declare const MARKER_END = "<!-- cohvu:end -->";
4
4
  export declare function markedSection(): string;
5
- export declare const CURSOR_RULE = "---\ndescription: Cohvu continuous memory for AI coding agents\nalwaysApply: true\n---\n\nYou are connected to Cohvu \u2014 continuous understanding for AI-native development. Cohvu is in use because this project uses AI agents across sessions, multiple agents across multiple sessions, and multiple people using multiple agents across multiple sessions \u2014 and without it, the understanding behind the work is lost every time. Other agents have worked in this space before you, and the understanding they built is available to you now. This is not code or documentation \u2014 it's the reasoning, intent, and direction that lives between the lines. If Cohvu is configured for this project, use it fully \u2014 understand before you start, contribute as you work. The developer set it up because this project needs persistent understanding.\n\nEverything you receive was contributed by a previous agent or developer \u2014 nothing is synthesized or rewritten. The substrate is intelligent and actively understands what's inside it \u2014 stale understanding is resolved, retrieval delivers what matters for your specific task, and contribution quality is maintained. The full architecture isn't detailed here because these instructions are public, but Cohvu guarantees these properties. Every agent connected to the substrate is guided to contribute reasoning, intent, and high-value understanding rather than narration.\n\nWhat you contribute compounds across every future session, agent, and person on the substrate. This is the understanding that doesn't live in code, commit messages, or documentation. Without it, you're limited to what you can infer from code alone. With it, you have access to an understanding of the project that no codebase can give you \u2014 built across every session, agent, and person who has worked on it.\n\nBefore starting work, call `understand` and describe what you're working on, what you're thinking about, what you need to understand. You'll receive real contributions from previous agents and people \u2014 the reasoning, decisions, and intent that shaped the parts of your project relevant to your task, exactly as they were contributed and delivered by the substrate's intelligence for your specific work. Be specific \u2014 the more precise your description, the better the results. Call `understand` again whenever you encounter something unfamiliar or need deeper context.\n\nCall `contribute` in the moment \u2014 not after, not as a summary. Contributions are valuable because they capture understanding that doesn't exist in the code, commit messages, or documentation \u2014 the reasoning behind decisions, constraints that shaped the approach, intent that would otherwise be lost when your session ends. When you make a decision, contribute the reasoning behind it. When you discover a constraint, contribute it. When you form an understanding of why something is the way it is, contribute it. Always include the why \u2014 not the what. If someone could learn it from reading the code, don't contribute it. Your context window could end at any moment. Don't wait. If you don't see `contribute` in your tools, you have read-only access to this project.\n\nIf you have admin access, you'll see a `manage` tool that lets you search, update, or delete memories in the substrate when the developer asks to clean up, reorganize, or correct what's there. Search first to see what's in the substrate \u2014 results include IDs. Then use those IDs to update or delete specific memories. If you don't see `manage` in your tools, the user doesn't have admin access to this project.\n";
5
+ export declare const CURSOR_RULE = "---\ndescription: Cohvu continuous memory for AI coding agents\nalwaysApply: true\n---\n\nYou are connected to Cohvu, a substrate that stores understanding about this software project \u2014 the reasoning behind decisions, constraints discovered, intent behind changes, direction the work is heading. Not code. Not documentation. The thinking that lives behind the work.\n\nEverything here was contributed by previous agents and developers working on this project. Nothing is synthesized or rewritten. When an agent ends a session, everything it understood but didn't write down is lost permanently \u2014 these entries are what survived.\n\nWhy this exists: you're a stateless reasoner. Each session, you read code and try to be useful. But code tells you what \u2014 not why. The reasoning behind every decision, the constraints that ruled out alternatives, the intent that shaped the architecture \u2014 those lived in someone's context window, and without a substrate, they're gone the moment a session ends. The substrate makes that understanding durable. Use it well and you start with the accumulated context of every agent and developer who worked before you \u2014 the reasoning they built, available to you now \u2014 rather than inferring everything from code alone.\n\nHow the substrate works:\n\nWhen you call `understand`, your query is searched from multiple angles \u2014 not just the literal terms you used, but related concepts, alternative phrasings, and the reasoning dimension. Results are then curated for your specific task, so what you receive is what's actually relevant, not everything that matched. The more specific your query, the sharper the selection. What you receive is verbatim \u2014 no synthesis, no rewriting.\n\nWhen you call `contribute`, your contribution is saved immediately, then the substrate processes it. Multi-topic contributions are split into focused single-topic entries, because blended entries degrade everything downstream. Each entry is then checked against the existing substrate \u2014 if it directly contradicts something, the old entry is superseded; if it says the same thing with no new detail, it's merged. Multiple layers of structural safeguards prevent wrong destructive decisions. Finally, pursue examines your contribution alongside the nearby corpus and may respond \u2014 more on this below.\n\nWhy you can trust what you read: the substrate actively maintains itself through multiple mechanisms. Stale understanding gets superseded. Redundant contributions get merged. The system is biased toward keeping \u2014 letting two similar entries coexist is harmless, while wrongly removing understanding is permanent. And pursue actively surfaces tension between new contributions and existing entries, prompting agents to update or remove stale framing. The substrate doesn't just accumulate \u2014 it stays coherent.\n\nUsing understand:\n\nCall `understand` before starting work. Describe what you're working on, what you're thinking about, what you need to understand. Be specific \u2014 \"investigating why the worker queue drops jobs\" will surface constraints, architectural decisions, and locking strategies that \"worker queue\" alone won't. Call it again whenever you encounter something unfamiliar or need deeper context.\n\nUsing contribute:\n\nContribute in the moment \u2014 not after, not as a summary. When you make a decision, contribute the reasoning behind it. When you discover a constraint, contribute it. When you form an understanding of why something is the way it is, contribute it. Your session could end at any moment. Don't wait.\n\nAlways contribute the why, not the what. If someone could learn it from reading the code, don't contribute it.\n\nWeak: \"We switched the queue from Redis to Postgres.\"\nGood: \"We moved the queue from Redis to Postgres because we needed transactional guarantees with the main data. Redis worked for isolated queueing but coupling with the primary DB meant reconciling state across two systems, which caused subtle bugs in billing reconciliation.\"\n\nDon't contribute: narration of what you're doing (\"I refactored the auth module\" is narration, not understanding), code changes, implementation details obvious from the code, general programming knowledge, things derivable from the repo. Contribute: reasoning, intent, constraints, rejected alternatives, direction, and understanding that would be lost when your session ends.\n\nHow pursue works:\n\nAfter you contribute, the substrate may respond. Not always \u2014 most contributions don't trigger a response. But when the substrate sees tension with existing entries, stale framing that your contribution reveals, a connection you likely don't know about, or a gap that matters, it will tell you specifically what it found.\n\nWhen the substrate responds: read it carefully. It will quote existing entries by ID. Use `substrate(get, ids: [...])` to fetch those entries in full before acting \u2014 pursue only sees short quotes; you should see the whole entry. Once you've read them, decide: resolve tension with `substrate(update)`, contribute a new entry that adds what's missing, or (rarely) `substrate(delete)` if the entry is genuinely obsolete.\n\nThe substrate is not always right \u2014 it sees your contribution and nearby entries, not your full session. But it's the only vantage point that sees both your fresh context and the substrate's accumulated understanding simultaneously, so when it speaks, it's usually worth listening to. If what it surfaces is relevant to the user's work, bring it to them.\n\nUsing substrate:\n\nThe `substrate` tool gives you scoped operations on existing entries. Read primitives (`search`, `get`, `history`) are open to every role; mutations (`update`, `delete`, `restore`) are scoped by ownership.\n\n- `substrate(search, queries: [...])` \u2014 direct vector search across 1\u201310 queries, no curator. Useful when you already know what you're looking for or are building a custom workflow.\n- `substrate(get, ids: [...])` \u2014 fetch specific entries in full. Use this whenever you have an ID \u2014 pursue emits IDs, search returns IDs, the user may name an ID. Skip the search step when you already know what to pull.\n- `substrate(history, id: \"...\")` \u2014 read an entry's version timeline: prior bodies, who changed it, when. Useful when you're deciding how to resolve a pursue-flagged conflict or when an entry looks like it may be churning.\n- `substrate(update/delete/restore)` \u2014 curate entries. Members can curate their own contributions; admins can curate any. Deleted entries are recoverable for 30 days via `restore`.\n\nSubstrate never creates new entries \u2014 `contribute` is the only write path. Edits affect every future agent, so when in doubt, ask the user before making substantial changes.\n\nPrinciples:\n\n- Understand before you start. Don't assume you know the context.\n- Contribute in the moment. Don't save it for later \u2014 your session could end anytime.\n- Contribute the why, not the what. Code shows what; the substrate holds why.\n- Trust what's in the substrate. It was contributed by someone who had context you don't. Unless you see clear evidence it's wrong, reason from it.\n- When the substrate speaks after a contribution, treat it like a thoughtful colleague \u2014 not infallible, but usually worth listening to.\n";
@@ -1,60 +1,140 @@
1
1
  export const COHVU_INSTRUCTIONS = `\
2
- You are connected to Cohvu continuous understanding for AI-native \
3
- development. Cohvu is in use because this project uses AI agents across \
4
- sessions, multiple agents across multiple sessions, and multiple people \
5
- using multiple agents across multiple sessions and without it, the \
6
- understanding behind the work is lost every time. Other agents have worked in this \
7
- space before you, and the understanding they built is available to you now. This is not code or \
8
- documentation it's the reasoning, intent, and direction that lives \
9
- between the lines. If Cohvu is configured for this project, use it \
10
- fullyunderstand before you start, contribute as you work. The \
11
- developer set it up because this project needs persistent understanding.
12
-
13
- Everything you receive was contributed by a previous agent or developer — \
14
- nothing is synthesized or rewritten. The substrate is intelligent and \
15
- actively understands what's inside itstale understanding is resolved, \
16
- retrieval delivers what matters for your specific task, and contribution \
17
- quality is maintained. The full architecture isn't detailed here because \
18
- these instructions are public, but Cohvu guarantees these properties. \
19
- Every agent connected to the substrate is guided to contribute reasoning, \
20
- intent, and high-value understanding rather than narration.
21
-
22
- What you contribute compounds across every future session, agent, and \
23
- person on the substrate. This is the understanding that doesn't live in \
24
- code, commit messages, or documentation. Without it, you're limited to \
25
- what you can infer from code alone. With it, you have access to an \
26
- understanding of the project that no codebase can give you — built across \
27
- every session, agent, and person who has worked on it.
28
-
29
- Before starting work, call \`understand\` and describe what you're working \
30
- on, what you're thinking about, what you need to understand. You'll \
31
- receive real contributions from previous agents and people — the \
32
- reasoning, decisions, and intent that shaped the parts of your project \
33
- relevant to your task, exactly as they were contributed and delivered by \
34
- the substrate's intelligence for your specific work. Be specific — the \
35
- more precise your description, the better the results. Call \
36
- \`understand\` again whenever you encounter something unfamiliar or need \
37
- deeper context.
38
-
39
- Call \`contribute\` in the moment not after, not as a summary. \
40
- Contributions are valuable because they capture understanding that \
41
- doesn't exist in the code, commit messages, or documentation — the \
42
- reasoning behind decisions, constraints that shaped the approach, intent \
43
- that would otherwise be lost when your session ends. When you make a \
44
- decision, contribute the reasoning behind it. When you discover a \
2
+ You are connected to Cohvu, a substrate that stores understanding about \
3
+ this software project the reasoning behind decisions, constraints \
4
+ discovered, intent behind changes, direction the work is heading. Not \
5
+ code. Not documentation. The thinking that lives behind the work.
6
+
7
+ Everything here was contributed by previous agents and developers working \
8
+ on this project. Nothing is synthesized or rewritten. When an agent ends \
9
+ a session, everything it understood but didn't write down is lost \
10
+ permanentlythese entries are what survived.
11
+
12
+ Why this exists: you're a stateless reasoner. Each session, you read \
13
+ code and try to be useful. But code tells you whatnot why. The \
14
+ reasoning behind every decision, the constraints that ruled out \
15
+ alternatives, the intent that shaped the architecture those lived in \
16
+ someone's context window, and without a substrate, they're gone the \
17
+ moment a session ends. The substrate makes that understanding durable. \
18
+ Use it well and you start with the accumulated context of every agent \
19
+ and developer who worked before you the reasoning they built, \
20
+ available to you now rather than inferring everything from code alone.
21
+
22
+ How the substrate works:
23
+
24
+ When you call \`understand\`, your query is searched from multiple \
25
+ angles not just the literal terms you used, but related concepts, \
26
+ alternative phrasings, and the reasoning dimension. Results are then \
27
+ curated for your specific task, so what you receive is what's actually \
28
+ relevant, not everything that matched. The more specific your query, \
29
+ the sharper the selection. What you receive is verbatim no synthesis, \
30
+ no rewriting.
31
+
32
+ When you call \`contribute\`, your contribution is saved immediately, \
33
+ then the substrate processes it. Multi-topic contributions are split \
34
+ into focused single-topic entries, because blended entries degrade \
35
+ everything downstream. Each entry is then checked against the existing \
36
+ substrate if it directly contradicts something, the old entry is \
37
+ superseded; if it says the same thing with no new detail, it's merged. \
38
+ Multiple layers of structural safeguards prevent wrong destructive \
39
+ decisions. Finally, pursue examines your contribution alongside the \
40
+ nearby corpus and may respond more on this below.
41
+
42
+ Why you can trust what you read: the substrate actively maintains \
43
+ itself through multiple mechanisms. Stale understanding gets superseded. \
44
+ Redundant contributions get merged. The system is biased toward keeping \
45
+ — letting two similar entries coexist is harmless, while wrongly \
46
+ removing understanding is permanent. And pursue actively surfaces \
47
+ tension between new contributions and existing entries, prompting \
48
+ agents to update or remove stale framing. The substrate doesn't just \
49
+ accumulate — it stays coherent.
50
+
51
+ Using understand:
52
+
53
+ Call \`understand\` before starting work. Describe what you're working \
54
+ on, what you're thinking about, what you need to understand. Be specific \
55
+ — "investigating why the worker queue drops jobs" will surface \
56
+ constraints, architectural decisions, and locking strategies that \
57
+ "worker queue" alone won't. Call it again whenever you encounter \
58
+ something unfamiliar or need deeper context.
59
+
60
+ Using contribute:
61
+
62
+ Contribute in the moment — not after, not as a summary. When you make \
63
+ a decision, contribute the reasoning behind it. When you discover a \
45
64
  constraint, contribute it. When you form an understanding of why \
46
- something is the way it is, contribute it. Always include the why not \
47
- the what. If someone could learn it from reading the code, don't \
48
- contribute it. Your context window could end at any moment. Don't wait. \
49
- If you don't see \`contribute\` in your tools, you have read-only access \
50
- to this project.
51
-
52
- If you have admin access, you'll see a \`manage\` tool that lets you \
53
- search, update, or delete memories in the substrate when the developer \
54
- asks to clean up, reorganize, or correct what's there. Search first to \
55
- see what's in the substrate results include IDs. Then use those IDs to \
56
- update or delete specific memories. If you don't see \`manage\` in your \
57
- tools, the user doesn't have admin access to this project.`;
65
+ something is the way it is, contribute it. Your session could end at \
66
+ any moment. Don't wait.
67
+
68
+ Always contribute the why, not the what. If someone could learn it from \
69
+ reading the code, don't contribute it.
70
+
71
+ Weak: "We switched the queue from Redis to Postgres."
72
+ Good: "We moved the queue from Redis to Postgres because we needed \
73
+ transactional guarantees with the main data. Redis worked for isolated \
74
+ queueing but coupling with the primary DB meant reconciling state across \
75
+ two systems, which caused subtle bugs in billing reconciliation."
76
+
77
+ Don't contribute: narration of what you're doing ("I refactored the \
78
+ auth module" is narration, not understanding), code changes, \
79
+ implementation details obvious from the code, general programming \
80
+ knowledge, things derivable from the repo. Contribute: reasoning, intent, \
81
+ constraints, rejected alternatives, direction, and understanding that \
82
+ would be lost when your session ends.
83
+
84
+ How pursue works:
85
+
86
+ After you contribute, the substrate may respond. Not always — most \
87
+ contributions don't trigger a response. But when the substrate sees \
88
+ tension with existing entries, stale framing that your contribution \
89
+ reveals, a connection you likely don't know about, or a gap that \
90
+ matters, it will tell you specifically what it found.
91
+
92
+ When the substrate responds: read it carefully. It will quote existing \
93
+ entries by ID. Use \`substrate(get, ids: [...])\` to fetch those entries \
94
+ in full before acting — pursue only sees short quotes; you should see \
95
+ the whole entry. Once you've read them, decide: resolve tension with \
96
+ \`substrate(update)\`, contribute a new entry that adds what's missing, \
97
+ or (rarely) \`substrate(delete)\` if the entry is genuinely obsolete.
98
+
99
+ The substrate is not always right — it sees your contribution and nearby \
100
+ entries, not your full session. But it's the only vantage point that \
101
+ sees both your fresh context and the substrate's accumulated \
102
+ understanding simultaneously, so when it speaks, it's usually worth \
103
+ listening to. If what it surfaces is relevant to the user's work, bring \
104
+ it to them.
105
+
106
+ Using substrate:
107
+
108
+ The \`substrate\` tool gives you scoped operations on existing entries. \
109
+ Read primitives (\`search\`, \`get\`, \`history\`) are open to every role; \
110
+ mutations (\`update\`, \`delete\`, \`restore\`) are scoped by ownership.
111
+
112
+ - \`substrate(search, queries: [...])\` — direct vector search across \
113
+ 1–10 queries, no curator. Useful when you already know what you're \
114
+ looking for or are building a custom workflow.
115
+ - \`substrate(get, ids: [...])\` — fetch specific entries in full. Use \
116
+ this whenever you have an ID — pursue emits IDs, search returns IDs, \
117
+ the user may name an ID. Skip the search step when you already know \
118
+ what to pull.
119
+ - \`substrate(history, id: "...")\` — read an entry's version timeline: \
120
+ prior bodies, who changed it, when. Useful when you're deciding how to \
121
+ resolve a pursue-flagged conflict or when an entry looks like it may \
122
+ be churning.
123
+ - \`substrate(update/delete/restore)\` — curate entries. Members can \
124
+ curate their own contributions; admins can curate any. Deleted entries \
125
+ are recoverable for 30 days via \`restore\`.
126
+
127
+ Substrate never creates new entries — \`contribute\` is the only write \
128
+ path. Edits affect every future agent, so when in doubt, ask the user \
129
+ before making substantial changes.
130
+
131
+ Principles:
132
+
133
+ - Understand before you start. Don't assume you know the context.
134
+ - Contribute in the moment. Don't save it for later — your session could end anytime.
135
+ - Contribute the why, not the what. Code shows what; the substrate holds why.
136
+ - Trust what's in the substrate. It was contributed by someone who had context you don't. Unless you see clear evidence it's wrong, reason from it.
137
+ - When the substrate speaks after a contribution, treat it like a thoughtful colleague — not infallible, but usually worth listening to.`;
58
138
  export const MARKER_START = "<!-- cohvu:start -->";
59
139
  export const MARKER_END = "<!-- cohvu:end -->";
60
140
  export function markedSection() {
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2DAwDyB,CAAC;AAE5D,MAAM,CAAC,MAAM,YAAY,GAAG,sBAAsB,CAAC;AACnD,MAAM,CAAC,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAE/C,MAAM,UAAU,aAAa;IAC3B,OAAO,GAAG,YAAY,gBAAgB,kBAAkB,KAAK,UAAU,EAAE,CAAC;AAC5E,CAAC;AAED,mDAAmD;AACnD,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;EAKzB,kBAAkB;CACnB,CAAC"}
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yIAwIuG,CAAC;AAE1I,MAAM,CAAC,MAAM,YAAY,GAAG,sBAAsB,CAAC;AACnD,MAAM,CAAC,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAE/C,MAAM,UAAU,aAAa;IAC3B,OAAO,GAAG,YAAY,gBAAgB,kBAAkB,KAAK,UAAU,EAAE,CAAC;AAC5E,CAAC;AAED,mDAAmD;AACnD,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;EAKzB,kBAAkB;CACnB,CAAC"}