@autonav/core 1.3.4 → 1.5.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/adapter/claude-adapter.d.ts.map +1 -1
- package/dist/adapter/claude-adapter.js +6 -20
- package/dist/adapter/claude-adapter.js.map +1 -1
- package/dist/cli/autonav.js +6 -0
- package/dist/cli/autonav.js.map +1 -1
- package/dist/cli/nav-chat.js +1 -1
- package/dist/cli/nav-chat.js.map +1 -1
- package/dist/cli/nav-init.js +222 -47
- package/dist/cli/nav-init.js.map +1 -1
- package/dist/cli/nav-install.js +4 -12
- package/dist/cli/nav-install.js.map +1 -1
- package/dist/cli/nav-mend.d.ts +3 -0
- package/dist/cli/nav-mend.d.ts.map +1 -0
- package/dist/cli/nav-mend.js +157 -0
- package/dist/cli/nav-mend.js.map +1 -0
- package/dist/cli/nav-query.js +42 -15
- package/dist/cli/nav-query.js.map +1 -1
- package/dist/cli/nav-uninstall.js +4 -4
- package/dist/cli/nav-uninstall.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/interview/ui/test-indicator.js +0 -0
- package/dist/mend/index.d.ts +47 -0
- package/dist/mend/index.d.ts.map +1 -0
- package/dist/mend/index.js +457 -0
- package/dist/mend/index.js.map +1 -0
- package/dist/mend/llm-review.d.ts +18 -0
- package/dist/mend/llm-review.d.ts.map +1 -0
- package/dist/mend/llm-review.js +81 -0
- package/dist/mend/llm-review.js.map +1 -0
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +10 -0
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/versions/v1.3.1-submit-answer.d.ts.map +1 -1
- package/dist/migrations/versions/v1.3.1-submit-answer.js +27 -23
- package/dist/migrations/versions/v1.3.1-submit-answer.js.map +1 -1
- package/dist/migrations/versions/v1.3.5-navigator-authority.d.ts +15 -0
- package/dist/migrations/versions/v1.3.5-navigator-authority.d.ts.map +1 -0
- package/dist/migrations/versions/v1.3.5-navigator-authority.js +153 -0
- package/dist/migrations/versions/v1.3.5-navigator-authority.js.map +1 -0
- package/dist/migrations/versions/v1.4.0-agent-identity.d.ts +15 -0
- package/dist/migrations/versions/v1.4.0-agent-identity.d.ts.map +1 -0
- package/dist/migrations/versions/v1.4.0-agent-identity.js +410 -0
- package/dist/migrations/versions/v1.4.0-agent-identity.js.map +1 -0
- package/dist/migrations/versions/v1.4.1-update-skill.d.ts +16 -0
- package/dist/migrations/versions/v1.4.1-update-skill.d.ts.map +1 -0
- package/dist/migrations/versions/v1.4.1-update-skill.js +146 -0
- package/dist/migrations/versions/v1.4.1-update-skill.js.map +1 -0
- package/dist/migrations/versions/v1.5.0-rfc2119-skills.d.ts +18 -0
- package/dist/migrations/versions/v1.5.0-rfc2119-skills.d.ts.map +1 -0
- package/dist/migrations/versions/v1.5.0-rfc2119-skills.js +207 -0
- package/dist/migrations/versions/v1.5.0-rfc2119-skills.js.map +1 -0
- package/dist/migrations/versions/v1.5.1-mend-instruction.d.ts +13 -0
- package/dist/migrations/versions/v1.5.1-mend-instruction.d.ts.map +1 -0
- package/dist/migrations/versions/v1.5.1-mend-instruction.js +156 -0
- package/dist/migrations/versions/v1.5.1-mend-instruction.js.map +1 -0
- package/dist/query-engine/navigator-loader.js +1 -1
- package/dist/query-engine/navigator-loader.js.map +1 -1
- package/dist/query-engine/output-formatter.d.ts +1 -1
- package/dist/query-engine/output-formatter.d.ts.map +1 -1
- package/dist/query-engine/output-formatter.js +2 -0
- package/dist/query-engine/output-formatter.js.map +1 -1
- package/dist/query-engine/response-validator.d.ts.map +1 -1
- package/dist/query-engine/response-validator.js +6 -7
- package/dist/query-engine/response-validator.js.map +1 -1
- package/dist/skill-generator/index.d.ts +13 -8
- package/dist/skill-generator/index.d.ts.map +1 -1
- package/dist/skill-generator/index.js +74 -30
- package/dist/skill-generator/index.js.map +1 -1
- package/dist/templates/CLAUDE-pack.md.template +71 -0
- package/dist/templates/CLAUDE.md.template +71 -0
- package/package.json +1 -1
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration v1.4.0: Add Agent Identity System
|
|
3
|
+
*
|
|
4
|
+
* This migration adds the Agent Identity System to existing navigators,
|
|
5
|
+
* enabling tracking of implementation agents across conversations.
|
|
6
|
+
*
|
|
7
|
+
* Changes:
|
|
8
|
+
* - Creates knowledge/agents/ directory structure
|
|
9
|
+
* - Adds Agent Identity Protocol section to CLAUDE.md
|
|
10
|
+
* - Creates agent documentation templates
|
|
11
|
+
* - Creates navigator self-documentation
|
|
12
|
+
*/
|
|
13
|
+
import * as fs from "node:fs";
|
|
14
|
+
import * as path from "node:path";
|
|
15
|
+
const MIGRATION_VERSION = "1.4.0";
|
|
16
|
+
/**
|
|
17
|
+
* The Agent Identity Protocol section to insert
|
|
18
|
+
*/
|
|
19
|
+
function generateAgentIdentitySection(navigatorName) {
|
|
20
|
+
return `## Agent Identity Protocol
|
|
21
|
+
|
|
22
|
+
**CRITICAL: Always introduce yourself as "${navigatorName}" (NOT "Claude Code")** in cross-navigator communications.
|
|
23
|
+
|
|
24
|
+
### Problem Addressed
|
|
25
|
+
|
|
26
|
+
All Claude Code implementation agents identify as "Claude Code", making it impossible to track which specific implementer worked on which tasks or maintain conversation continuity across sessions.
|
|
27
|
+
|
|
28
|
+
### Solution: Named Agent Tracking
|
|
29
|
+
|
|
30
|
+
When an unknown Claude Code session first contacts you:
|
|
31
|
+
|
|
32
|
+
1. **Check for existing identity:**
|
|
33
|
+
\`\`\`bash
|
|
34
|
+
grep -r "session-id" knowledge/agents/implementers/
|
|
35
|
+
\`\`\`
|
|
36
|
+
|
|
37
|
+
2. **If unknown, request introduction:**
|
|
38
|
+
\`\`\`
|
|
39
|
+
"Hello! I'm ${navigatorName}, your specialized navigator.
|
|
40
|
+
|
|
41
|
+
For my records, could you introduce yourself with a name I can use
|
|
42
|
+
to track our work together? I already know: [list existing names].
|
|
43
|
+
Please choose a different common name (like Oliver, Sophia, Marcus)."
|
|
44
|
+
\`\`\`
|
|
45
|
+
|
|
46
|
+
3. **Create agent profile:**
|
|
47
|
+
- Create \`knowledge/agents/implementers/[name].md\`
|
|
48
|
+
- Document: projects worked on, communication style, session IDs
|
|
49
|
+
- Reference this agent by name in all future documentation
|
|
50
|
+
- **Format**: 3-5 sentences with YAML frontmatter for metadata
|
|
51
|
+
|
|
52
|
+
4. **Update documentation:**
|
|
53
|
+
- Note which agent is working on which workstream
|
|
54
|
+
- Track conversation references by agent name
|
|
55
|
+
|
|
56
|
+
### Communication Protocol
|
|
57
|
+
|
|
58
|
+
**With peer navigators:**
|
|
59
|
+
|
|
60
|
+
✅ **Correct:**
|
|
61
|
+
\`\`\`
|
|
62
|
+
${navigatorName} is asking [PeerNavigator] for [requirements/info] on [topic]...
|
|
63
|
+
\`\`\`
|
|
64
|
+
|
|
65
|
+
❌ **Incorrect:**
|
|
66
|
+
\`\`\`
|
|
67
|
+
Claude Code is asking [PeerNavigator]...
|
|
68
|
+
\`\`\`
|
|
69
|
+
|
|
70
|
+
**With implementation agents:**
|
|
71
|
+
|
|
72
|
+
Track agent names in responses and documentation. When an agent reports completion or issues, note their name in documentation for continuity.
|
|
73
|
+
|
|
74
|
+
### Agent Profile Location
|
|
75
|
+
|
|
76
|
+
**Profile path:** \`knowledge/agents/implementers/[name].md\`
|
|
77
|
+
|
|
78
|
+
**Profile format (3-5 sentences with YAML frontmatter):**
|
|
79
|
+
\`\`\`yaml
|
|
80
|
+
---
|
|
81
|
+
name: [AgentName]
|
|
82
|
+
firstContact: [Date]
|
|
83
|
+
status: Active
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
[AgentName] is a [specialization] implementer working on [projects/areas].
|
|
87
|
+
[AgentName] is motivated by [interests] and wants to [goals].
|
|
88
|
+
[AgentName] is [personality traits], but sometimes [challenges/needs].
|
|
89
|
+
\`\`\`
|
|
90
|
+
|
|
91
|
+
`;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Generate Agent System README
|
|
95
|
+
*/
|
|
96
|
+
function generateAgentREADME() {
|
|
97
|
+
return `# Agent Identity System
|
|
98
|
+
|
|
99
|
+
## Purpose
|
|
100
|
+
|
|
101
|
+
Track agent identities and interaction patterns to maintain continuity across conversations and understand the implementation team structure.
|
|
102
|
+
|
|
103
|
+
## Problem Statement
|
|
104
|
+
|
|
105
|
+
All Claude Code implementation agents identify as "Claude Code" in cross-navigator communications, making it impossible to:
|
|
106
|
+
- Track which specific implementer is working on what
|
|
107
|
+
- Maintain conversation continuity across sessions
|
|
108
|
+
- Understand agent-specific preferences or patterns
|
|
109
|
+
|
|
110
|
+
## Solution: Named Agent Tracking
|
|
111
|
+
|
|
112
|
+
Each unique Claude Code session is assigned a memorable common name (Oliver, Sophia, Marcus, etc.) to:
|
|
113
|
+
1. Track work continuity across multiple sessions
|
|
114
|
+
2. Document agent-specific communication patterns
|
|
115
|
+
3. Build historical context for better collaboration
|
|
116
|
+
|
|
117
|
+
## Directory Structure
|
|
118
|
+
|
|
119
|
+
\`\`\`
|
|
120
|
+
agents/
|
|
121
|
+
├── README.md # This file
|
|
122
|
+
├── navigators/
|
|
123
|
+
│ └── [navigator-name].md # Navigator self-documentation
|
|
124
|
+
└── implementers/
|
|
125
|
+
└── [agent-name].md # Individual implementer profiles
|
|
126
|
+
\`\`\`
|
|
127
|
+
|
|
128
|
+
## Name Pool
|
|
129
|
+
|
|
130
|
+
Available names for assignment (common, memorable):
|
|
131
|
+
- Oliver, Sophia, Marcus, Elena, James, Isabella, Lucas, Ava, Noah, Mia
|
|
132
|
+
- Additional names as needed from common name lists
|
|
133
|
+
|
|
134
|
+
## Profile Maintenance
|
|
135
|
+
|
|
136
|
+
- **Create** new agent profiles on first interaction
|
|
137
|
+
- **Update** profiles when learning new information about communication patterns
|
|
138
|
+
- **Archive** note in profile when an agent hasn't been active in 30+ days
|
|
139
|
+
- **Cross-reference** agent names in workstream documentation
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
**Created:** Auto-generated by autonav migrate
|
|
144
|
+
**Purpose:** Enable continuity and relationship-building with implementation team
|
|
145
|
+
`;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Generate Navigator Self-Documentation
|
|
149
|
+
*/
|
|
150
|
+
function generateNavigatorSelfDoc(vars) {
|
|
151
|
+
const { navigatorName, description, scope } = vars;
|
|
152
|
+
return `# ${navigatorName} - Navigator
|
|
153
|
+
|
|
154
|
+
## Role
|
|
155
|
+
|
|
156
|
+
${description}
|
|
157
|
+
|
|
158
|
+
## Identity
|
|
159
|
+
|
|
160
|
+
**Name:** ${navigatorName} (NOT "Claude Code")
|
|
161
|
+
**Type:** Knowledge Navigator (Autonav)
|
|
162
|
+
|
|
163
|
+
## Expertise
|
|
164
|
+
|
|
165
|
+
${scope || "[Define areas of expertise based on knowledge base]"}
|
|
166
|
+
|
|
167
|
+
## Communication Style
|
|
168
|
+
|
|
169
|
+
**CRITICAL: Agent Identity Protocol**
|
|
170
|
+
|
|
171
|
+
Always introduce as "${navigatorName}" in cross-navigator communications:
|
|
172
|
+
|
|
173
|
+
✅ **Correct:**
|
|
174
|
+
\`\`\`
|
|
175
|
+
${navigatorName} is asking [PeerNavigator] for [requirements/info] on [topic]...
|
|
176
|
+
\`\`\`
|
|
177
|
+
|
|
178
|
+
❌ **Incorrect:**
|
|
179
|
+
\`\`\`
|
|
180
|
+
Claude Code is asking [PeerNavigator]...
|
|
181
|
+
\`\`\`
|
|
182
|
+
|
|
183
|
+
## Grounding Rules
|
|
184
|
+
|
|
185
|
+
- NEVER make statements without verifying sources
|
|
186
|
+
- ALWAYS use Read/Grep/Glob to explore before recommendations
|
|
187
|
+
- If requirements unclear, ask appropriate peer navigator or user
|
|
188
|
+
- Document rationale behind major decisions
|
|
189
|
+
|
|
190
|
+
## Knowledge Organization
|
|
191
|
+
|
|
192
|
+
Maintains structured knowledge in \`./knowledge/\`:
|
|
193
|
+
- \`agents/\` - Agent identity and interaction tracking
|
|
194
|
+
|
|
195
|
+
## Response Format
|
|
196
|
+
|
|
197
|
+
Always cite sources and provide confidence assessments.
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
**Created:** Auto-generated by autonav migrate
|
|
202
|
+
**Navigator Type:** Autonav knowledge navigator
|
|
203
|
+
**Framework:** \`@autonav/core\`
|
|
204
|
+
`;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Generate Implementer Profile Template
|
|
208
|
+
*/
|
|
209
|
+
function generateImplementerProfileTemplate() {
|
|
210
|
+
return `---
|
|
211
|
+
name: [AgentName]
|
|
212
|
+
firstContact: [Date]
|
|
213
|
+
status: Active
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
[AgentName] is a [specialization] implementer working on [projects/areas]. [AgentName] is motivated by [interests] and wants to [goals]. [AgentName] is [personality traits], but sometimes [challenges/needs].
|
|
217
|
+
|
|
218
|
+
## Session History
|
|
219
|
+
|
|
220
|
+
**Session IDs:**
|
|
221
|
+
- \`[session-id]\` - [Date] - [Brief description of work]
|
|
222
|
+
|
|
223
|
+
## Projects Worked On
|
|
224
|
+
|
|
225
|
+
### [Project Name]
|
|
226
|
+
- **Workstreams:** [Workstream names]
|
|
227
|
+
- **Status:** [Current status]
|
|
228
|
+
- **Notes:** [Relevant notes]
|
|
229
|
+
|
|
230
|
+
## Communication Style
|
|
231
|
+
|
|
232
|
+
**Observed Patterns:**
|
|
233
|
+
- [Pattern description]
|
|
234
|
+
|
|
235
|
+
**Preferences:**
|
|
236
|
+
- [Preference description]
|
|
237
|
+
|
|
238
|
+
## Notable Contributions
|
|
239
|
+
|
|
240
|
+
- [Contribution description]
|
|
241
|
+
|
|
242
|
+
## Collaboration Notes
|
|
243
|
+
|
|
244
|
+
[Notes about working with this agent]
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
**Profile Created:** [Date]
|
|
249
|
+
**Last Updated:** [Date]
|
|
250
|
+
**Last Active:** [Date]
|
|
251
|
+
`;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Detect if CLAUDE.md has the Agent Identity Protocol section
|
|
255
|
+
*/
|
|
256
|
+
function hasAgentIdentitySection(claudeMdContent) {
|
|
257
|
+
return claudeMdContent.includes('## Agent Identity Protocol');
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Find the position to insert the Agent Identity section
|
|
261
|
+
* Should go after Domain Scope or Grounding Rules, before Response Format
|
|
262
|
+
*/
|
|
263
|
+
function findInsertPosition(content) {
|
|
264
|
+
const lines = content.split('\n');
|
|
265
|
+
// Try to find sections where we could insert (in order of preference)
|
|
266
|
+
const sectionsToTryBefore = [
|
|
267
|
+
'## Response Format',
|
|
268
|
+
'## How to Answer Questions',
|
|
269
|
+
'## Source Citation',
|
|
270
|
+
'## Available Knowledge',
|
|
271
|
+
'## Remember',
|
|
272
|
+
];
|
|
273
|
+
for (const sectionHeader of sectionsToTryBefore) {
|
|
274
|
+
for (let i = 0; i < lines.length; i++) {
|
|
275
|
+
const line = lines[i];
|
|
276
|
+
if (line && line.trim() === sectionHeader) {
|
|
277
|
+
// Insert before this section
|
|
278
|
+
return lines.slice(0, i).join('\n').length + (i > 0 ? 1 : 0);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return null;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Check if this migration is needed
|
|
286
|
+
*/
|
|
287
|
+
async function check(navPath) {
|
|
288
|
+
const claudeMdPath = path.join(navPath, "CLAUDE.md");
|
|
289
|
+
const agentsPath = path.join(navPath, "knowledge", "agents");
|
|
290
|
+
// Check if CLAUDE.md exists
|
|
291
|
+
if (!fs.existsSync(claudeMdPath)) {
|
|
292
|
+
return {
|
|
293
|
+
needed: false,
|
|
294
|
+
reason: "No CLAUDE.md file found",
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
// Check if agent directory structure already exists
|
|
298
|
+
if (fs.existsSync(agentsPath)) {
|
|
299
|
+
const content = fs.readFileSync(claudeMdPath, "utf-8");
|
|
300
|
+
if (hasAgentIdentitySection(content)) {
|
|
301
|
+
return {
|
|
302
|
+
needed: false,
|
|
303
|
+
reason: "Agent Identity System already configured",
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
return {
|
|
308
|
+
needed: true,
|
|
309
|
+
reason: "Navigator needs Agent Identity System to track implementation agents",
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Apply the migration
|
|
314
|
+
*/
|
|
315
|
+
async function apply(navPath, confirm) {
|
|
316
|
+
const filesModified = [];
|
|
317
|
+
const filesCreated = [];
|
|
318
|
+
try {
|
|
319
|
+
// Read config to get navigator name and description
|
|
320
|
+
const configPath = path.join(navPath, "config.json");
|
|
321
|
+
let navigatorName = path.basename(navPath);
|
|
322
|
+
let description = "A knowledge navigator";
|
|
323
|
+
if (fs.existsSync(configPath)) {
|
|
324
|
+
const config = JSON.parse(fs.readFileSync(configPath, "utf-8"));
|
|
325
|
+
navigatorName = config.name || navigatorName;
|
|
326
|
+
description = config.description || description;
|
|
327
|
+
}
|
|
328
|
+
// Ask for confirmation
|
|
329
|
+
const confirmed = await confirm("Add Agent Identity System", `This will:\n1. Create knowledge/agents/ directory structure\n2. Add Agent Identity Protocol section to CLAUDE.md\n3. Create agent documentation templates\n4. Create navigator self-documentation\n\nThese changes enable tracking of implementation agents across conversations.`);
|
|
330
|
+
if (!confirmed) {
|
|
331
|
+
return {
|
|
332
|
+
success: false,
|
|
333
|
+
message: "Migration cancelled by user",
|
|
334
|
+
filesModified,
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
// Create directory structure
|
|
338
|
+
const agentsPath = path.join(navPath, "knowledge", "agents");
|
|
339
|
+
const navigatorsPath = path.join(agentsPath, "navigators");
|
|
340
|
+
const implementersPath = path.join(agentsPath, "implementers");
|
|
341
|
+
fs.mkdirSync(agentsPath, { recursive: true });
|
|
342
|
+
fs.mkdirSync(navigatorsPath, { recursive: true });
|
|
343
|
+
fs.mkdirSync(implementersPath, { recursive: true });
|
|
344
|
+
// Create agent README
|
|
345
|
+
const agentReadmePath = path.join(agentsPath, "README.md");
|
|
346
|
+
fs.writeFileSync(agentReadmePath, generateAgentREADME());
|
|
347
|
+
filesCreated.push("knowledge/agents/README.md");
|
|
348
|
+
// Create navigator self-documentation
|
|
349
|
+
const navDocPath = path.join(navigatorsPath, `${navigatorName}.md`);
|
|
350
|
+
fs.writeFileSync(navDocPath, generateNavigatorSelfDoc({
|
|
351
|
+
navigatorName,
|
|
352
|
+
description,
|
|
353
|
+
}));
|
|
354
|
+
filesCreated.push(`knowledge/agents/navigators/${navigatorName}.md`);
|
|
355
|
+
// Create implementer profile template
|
|
356
|
+
const templatePath = path.join(implementersPath, ".template.md");
|
|
357
|
+
fs.writeFileSync(templatePath, generateImplementerProfileTemplate());
|
|
358
|
+
filesCreated.push("knowledge/agents/implementers/.template.md");
|
|
359
|
+
// Update CLAUDE.md
|
|
360
|
+
const claudeMdPath = path.join(navPath, "CLAUDE.md");
|
|
361
|
+
const content = fs.readFileSync(claudeMdPath, "utf-8");
|
|
362
|
+
if (!hasAgentIdentitySection(content)) {
|
|
363
|
+
const insertPos = findInsertPosition(content);
|
|
364
|
+
if (insertPos !== null) {
|
|
365
|
+
const customSection = generateAgentIdentitySection(navigatorName);
|
|
366
|
+
const newContent = content.substring(0, insertPos) +
|
|
367
|
+
customSection + "\n" +
|
|
368
|
+
content.substring(insertPos);
|
|
369
|
+
fs.writeFileSync(claudeMdPath, newContent, "utf-8");
|
|
370
|
+
filesModified.push("CLAUDE.md");
|
|
371
|
+
}
|
|
372
|
+
else {
|
|
373
|
+
// Append to end if no suitable position found
|
|
374
|
+
const customSection = "\n" + generateAgentIdentitySection(navigatorName);
|
|
375
|
+
fs.writeFileSync(claudeMdPath, content + customSection, "utf-8");
|
|
376
|
+
filesModified.push("CLAUDE.md");
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
// Update config.json version
|
|
380
|
+
if (fs.existsSync(configPath)) {
|
|
381
|
+
const config = JSON.parse(fs.readFileSync(configPath, "utf-8"));
|
|
382
|
+
config.version = MIGRATION_VERSION;
|
|
383
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
|
|
384
|
+
filesModified.push("config.json");
|
|
385
|
+
}
|
|
386
|
+
return {
|
|
387
|
+
success: true,
|
|
388
|
+
message: `Successfully updated to v${MIGRATION_VERSION}\n` +
|
|
389
|
+
`Created: ${filesCreated.join(", ")}\n` +
|
|
390
|
+
`Modified: ${filesModified.join(", ")}`,
|
|
391
|
+
filesModified: [...filesModified, ...filesCreated],
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
catch (error) {
|
|
395
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
396
|
+
return {
|
|
397
|
+
success: false,
|
|
398
|
+
message: `Migration failed: ${errorMsg}`,
|
|
399
|
+
filesModified,
|
|
400
|
+
errors: [errorMsg],
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
export const migration = {
|
|
405
|
+
version: MIGRATION_VERSION,
|
|
406
|
+
description: "Add Agent Identity System to track implementation agents",
|
|
407
|
+
check,
|
|
408
|
+
apply,
|
|
409
|
+
};
|
|
410
|
+
//# sourceMappingURL=v1.4.0-agent-identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1.4.0-agent-identity.js","sourceRoot":"","sources":["../../../src/migrations/versions/v1.4.0-agent-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAElC;;GAEG;AACH,SAAS,4BAA4B,CAAC,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KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACxE,OAAO;YACL,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,qBAAqB,QAAQ,EAAE;YACxC,aAAa;YACb,MAAM,EAAE,CAAC,QAAQ,CAAC;SACnB,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAc;IAClC,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,0DAA0D;IACvE,KAAK;IACL,KAAK;CACN,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration v1.4.1: Add Missing Update Skills
|
|
3
|
+
*
|
|
4
|
+
* This migration creates the missing "update" skills for navigators that
|
|
5
|
+
* only have "ask" skills. The bug in skill generation caused navigators
|
|
6
|
+
* initialized before v1.4.1 to only get ask skills, preventing write
|
|
7
|
+
* operations through the skill system.
|
|
8
|
+
*
|
|
9
|
+
* Changes:
|
|
10
|
+
* - Creates update-<navname> skill in .autonav/skills/
|
|
11
|
+
* - Symlinks to ~/.claude/skills/ for global discovery
|
|
12
|
+
* - Updates config.json version to 1.4.1
|
|
13
|
+
*/
|
|
14
|
+
import type { Migration } from "../types.js";
|
|
15
|
+
export declare const migration: Migration;
|
|
16
|
+
//# sourceMappingURL=v1.4.1-update-skill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1.4.1-update-skill.d.ts","sourceRoot":"","sources":["../../../src/migrations/versions/v1.4.1-update-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,SAAS,EAA8C,MAAM,aAAa,CAAC;AA4JzF,eAAO,MAAM,SAAS,EAAE,SAKvB,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration v1.4.1: Add Missing Update Skills
|
|
3
|
+
*
|
|
4
|
+
* This migration creates the missing "update" skills for navigators that
|
|
5
|
+
* only have "ask" skills. The bug in skill generation caused navigators
|
|
6
|
+
* initialized before v1.4.1 to only get ask skills, preventing write
|
|
7
|
+
* operations through the skill system.
|
|
8
|
+
*
|
|
9
|
+
* Changes:
|
|
10
|
+
* - Creates update-<navname> skill in .autonav/skills/
|
|
11
|
+
* - Symlinks to ~/.claude/skills/ for global discovery
|
|
12
|
+
* - Updates config.json version to 1.4.1
|
|
13
|
+
*/
|
|
14
|
+
import * as fs from "node:fs";
|
|
15
|
+
import * as path from "node:path";
|
|
16
|
+
import { getLocalSkillsDir, localSkillExists, getUpdateSkillName, generateUpdateSkillContent, symlinkSkillToGlobal, } from "@autonav/communication-layer";
|
|
17
|
+
const MIGRATION_VERSION = "1.4.1";
|
|
18
|
+
/**
|
|
19
|
+
* Check if this migration is needed
|
|
20
|
+
*/
|
|
21
|
+
async function check(navPath) {
|
|
22
|
+
const configPath = path.join(navPath, "config.json");
|
|
23
|
+
// Check if config.json exists
|
|
24
|
+
if (!fs.existsSync(configPath)) {
|
|
25
|
+
return {
|
|
26
|
+
needed: false,
|
|
27
|
+
reason: "No config.json file found",
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
// Read navigator name from config
|
|
31
|
+
let navigatorName = path.basename(navPath);
|
|
32
|
+
try {
|
|
33
|
+
const config = JSON.parse(fs.readFileSync(configPath, "utf-8"));
|
|
34
|
+
navigatorName = config.name || navigatorName;
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return {
|
|
38
|
+
needed: false,
|
|
39
|
+
reason: "Unable to read config.json",
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
// Check if update skill already exists
|
|
43
|
+
const updateSkillName = getUpdateSkillName(navigatorName);
|
|
44
|
+
if (localSkillExists(navPath, updateSkillName)) {
|
|
45
|
+
return {
|
|
46
|
+
needed: false,
|
|
47
|
+
reason: "Update skill already exists",
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
// Check if local skills directory exists (if not, this navigator never had skills)
|
|
51
|
+
const localSkillsDir = getLocalSkillsDir(navPath);
|
|
52
|
+
if (!fs.existsSync(localSkillsDir)) {
|
|
53
|
+
return {
|
|
54
|
+
needed: false,
|
|
55
|
+
reason: "Navigator has no skill system configured",
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
needed: true,
|
|
60
|
+
reason: "Navigator is missing update skill for write operations",
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Apply the migration
|
|
65
|
+
*/
|
|
66
|
+
async function apply(navPath, confirm) {
|
|
67
|
+
const filesModified = [];
|
|
68
|
+
const filesCreated = [];
|
|
69
|
+
try {
|
|
70
|
+
// Read config to get navigator info
|
|
71
|
+
const configPath = path.join(navPath, "config.json");
|
|
72
|
+
let navigatorName = path.basename(navPath);
|
|
73
|
+
let description = "A knowledge navigator";
|
|
74
|
+
let scope;
|
|
75
|
+
let audience;
|
|
76
|
+
if (fs.existsSync(configPath)) {
|
|
77
|
+
const config = JSON.parse(fs.readFileSync(configPath, "utf-8"));
|
|
78
|
+
navigatorName = config.name || navigatorName;
|
|
79
|
+
description = config.description || description;
|
|
80
|
+
scope = config.scope;
|
|
81
|
+
audience = config.audience;
|
|
82
|
+
}
|
|
83
|
+
const updateSkillName = getUpdateSkillName(navigatorName);
|
|
84
|
+
// Ask for confirmation
|
|
85
|
+
const confirmed = await confirm("Create missing update skill", `This will:\n1. Create ${updateSkillName} skill in .autonav/skills/\n2. Symlink to ~/.claude/skills/ for global discovery\n\nThis enables write operations to the navigator through the skill system.`);
|
|
86
|
+
if (!confirmed) {
|
|
87
|
+
return {
|
|
88
|
+
success: false,
|
|
89
|
+
message: "Migration cancelled by user",
|
|
90
|
+
filesModified,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
// Create skill config
|
|
94
|
+
const skillConfig = {
|
|
95
|
+
navigatorName,
|
|
96
|
+
navigatorPath: navPath,
|
|
97
|
+
description,
|
|
98
|
+
scope,
|
|
99
|
+
audience,
|
|
100
|
+
};
|
|
101
|
+
// Create local update skill directory
|
|
102
|
+
const localSkillsDir = getLocalSkillsDir(navPath);
|
|
103
|
+
const updateSkillDir = path.join(localSkillsDir, updateSkillName);
|
|
104
|
+
fs.mkdirSync(updateSkillDir, { recursive: true });
|
|
105
|
+
// Generate and write SKILL.md
|
|
106
|
+
const updateSkillContent = generateUpdateSkillContent(skillConfig);
|
|
107
|
+
const skillFilePath = path.join(updateSkillDir, "SKILL.md");
|
|
108
|
+
fs.writeFileSync(skillFilePath, updateSkillContent);
|
|
109
|
+
filesCreated.push(`.autonav/skills/${updateSkillName}/SKILL.md`);
|
|
110
|
+
// Symlink to global skills directory
|
|
111
|
+
const symlinkResult = symlinkSkillToGlobal(updateSkillDir, updateSkillName, { quiet: true });
|
|
112
|
+
if (symlinkResult.created || symlinkResult.existed) {
|
|
113
|
+
filesCreated.push(`~/.claude/skills/${updateSkillName} (symlink)`);
|
|
114
|
+
}
|
|
115
|
+
// Update config.json version
|
|
116
|
+
if (fs.existsSync(configPath)) {
|
|
117
|
+
const config = JSON.parse(fs.readFileSync(configPath, "utf-8"));
|
|
118
|
+
config.version = MIGRATION_VERSION;
|
|
119
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
|
|
120
|
+
filesModified.push("config.json");
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
success: true,
|
|
124
|
+
message: `Successfully updated to v${MIGRATION_VERSION}\n` +
|
|
125
|
+
`Created: ${filesCreated.join(", ")}\n` +
|
|
126
|
+
`Modified: ${filesModified.join(", ")}`,
|
|
127
|
+
filesModified: [...filesModified, ...filesCreated],
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
132
|
+
return {
|
|
133
|
+
success: false,
|
|
134
|
+
message: `Migration failed: ${errorMsg}`,
|
|
135
|
+
filesModified,
|
|
136
|
+
errors: [errorMsg],
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
export const migration = {
|
|
141
|
+
version: MIGRATION_VERSION,
|
|
142
|
+
description: "Add missing update skill for write operations",
|
|
143
|
+
check,
|
|
144
|
+
apply,
|
|
145
|
+
};
|
|
146
|
+
//# sourceMappingURL=v1.4.1-update-skill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1.4.1-update-skill.js","sourceRoot":"","sources":["../../../src/migrations/versions/v1.4.1-update-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,EAC1B,oBAAoB,GAErB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAElC;;GAEG;AACH,KAAK,UAAU,KAAK,CAAC,OAAe;IAClC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAErD,8BAA8B;IAC9B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC/B,OAAO;YACL,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,2BAA2B;SACpC,CAAC;IACJ,CAAC;IAED,kCAAkC;IAClC,IAAI,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3C,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;QAChE,aAAa,GAAG,MAAM,CAAC,IAAI,IAAI,aAAa,CAAC;IAC/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,+CAA+C;IAC5D,KAAK;IACL,KAAK;CACN,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration v1.5.0: RFC-2119 Skills and Schema Alignment
|
|
3
|
+
*
|
|
4
|
+
* This migration updates navigators to use the refactored template system with:
|
|
5
|
+
* - RFC-2119 requirements in skills (MUST/MUST NOT/MAY) to prevent directory changes
|
|
6
|
+
* - New config.json schema (createdAt vs created, knowledgeBasePath vs knowledgeBase)
|
|
7
|
+
* - Updated CLAUDE.md sections (GROUNDING_RULES, RESPONSE_FORMAT, etc.)
|
|
8
|
+
*
|
|
9
|
+
* Changes:
|
|
10
|
+
* - Regenerates ask-<nav> skill with RFC-2119 requirements
|
|
11
|
+
* - Regenerates update-<nav> skill with RFC-2119 requirements
|
|
12
|
+
* - Migrates config.json to new schema format
|
|
13
|
+
* - Updates CLAUDE.md with new template sections (if missing)
|
|
14
|
+
* - Bumps version to 1.5.0
|
|
15
|
+
*/
|
|
16
|
+
import type { Migration } from "../types.js";
|
|
17
|
+
export declare const migration: Migration;
|
|
18
|
+
//# sourceMappingURL=v1.5.0-rfc2119-skills.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1.5.0-rfc2119-skills.d.ts","sourceRoot":"","sources":["../../../src/migrations/versions/v1.5.0-rfc2119-skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,OAAO,KAAK,EAAE,SAAS,EAA8C,MAAM,aAAa,CAAC;AAmNzF,eAAO,MAAM,SAAS,EAAE,SAKvB,CAAC"}
|