faf-cli 4.4.4 → 5.0.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 +32 -21
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +151 -4
- package/dist/cli.js.map +1 -1
- package/dist/commands/agents.d.ts +14 -0
- package/dist/commands/agents.d.ts.map +1 -0
- package/dist/commands/agents.js +353 -0
- package/dist/commands/agents.js.map +1 -0
- package/dist/commands/bi-sync.d.ts +4 -0
- package/dist/commands/bi-sync.d.ts.map +1 -1
- package/dist/commands/bi-sync.js +51 -0
- package/dist/commands/bi-sync.js.map +1 -1
- package/dist/commands/cursor.d.ts +13 -0
- package/dist/commands/cursor.d.ts.map +1 -0
- package/dist/commands/cursor.js +310 -0
- package/dist/commands/cursor.js.map +1 -0
- package/dist/commands/go.d.ts.map +1 -1
- package/dist/commands/go.js +22 -19
- package/dist/commands/go.js.map +1 -1
- package/dist/commands/memory.d.ts +14 -0
- package/dist/commands/memory.d.ts.map +1 -0
- package/dist/commands/memory.js +293 -0
- package/dist/commands/memory.js.map +1 -0
- package/dist/commands/pro.d.ts +10 -0
- package/dist/commands/pro.d.ts.map +1 -0
- package/dist/commands/pro.js +113 -0
- package/dist/commands/pro.js.map +1 -0
- package/dist/commands/ram.d.ts +17 -0
- package/dist/commands/ram.d.ts.map +1 -0
- package/dist/commands/ram.js +303 -0
- package/dist/commands/ram.js.map +1 -0
- package/dist/commands/readme.js +8 -8
- package/dist/commands/readme.js.map +1 -1
- package/dist/commands/sixws.js +1 -1
- package/dist/commands/taf-log.d.ts +1 -0
- package/dist/commands/taf-log.d.ts.map +1 -1
- package/dist/commands/taf-log.js +53 -5
- package/dist/commands/taf-log.js.map +1 -1
- package/dist/commands/taf-stars.d.ts +8 -0
- package/dist/commands/taf-stars.d.ts.map +1 -0
- package/dist/commands/taf-stars.js +105 -0
- package/dist/commands/taf-stars.js.map +1 -0
- package/dist/commands/taf.d.ts +1 -0
- package/dist/commands/taf.d.ts.map +1 -1
- package/dist/commands/taf.js +9 -0
- package/dist/commands/taf.js.map +1 -1
- package/dist/compiler/faf-compiler.d.ts.map +1 -1
- package/dist/compiler/faf-compiler.js +24 -2
- package/dist/compiler/faf-compiler.js.map +1 -1
- package/dist/engines/v252-hybrid-engine.d.ts +1 -1
- package/dist/engines/v252-hybrid-engine.d.ts.map +1 -1
- package/dist/engines/v252-hybrid-engine.js +1 -1
- package/dist/engines/v252-hybrid-engine.js.map +1 -1
- package/dist/github/repo-selector.js +4 -4
- package/dist/github/repo-selector.js.map +1 -1
- package/dist/licensing/license-messages.d.ts +20 -0
- package/dist/licensing/license-messages.d.ts.map +1 -0
- package/dist/licensing/license-messages.js +77 -0
- package/dist/licensing/license-messages.js.map +1 -0
- package/dist/licensing/pro-gate.d.ts +54 -0
- package/dist/licensing/pro-gate.d.ts.map +1 -0
- package/dist/licensing/pro-gate.js +243 -0
- package/dist/licensing/pro-gate.js.map +1 -0
- package/dist/taf/index.d.ts +4 -0
- package/dist/taf/index.d.ts.map +1 -1
- package/dist/taf/index.js +16 -1
- package/dist/taf/index.js.map +1 -1
- package/dist/taf/star-badge.d.ts +32 -0
- package/dist/taf/star-badge.d.ts.map +1 -0
- package/dist/taf/star-badge.js +158 -0
- package/dist/taf/star-badge.js.map +1 -0
- package/dist/taf/star-rating.d.ts +30 -0
- package/dist/taf/star-rating.d.ts.map +1 -0
- package/dist/taf/star-rating.js +79 -0
- package/dist/taf/star-rating.js.map +1 -0
- package/dist/taf/test-output-parser.d.ts +42 -0
- package/dist/taf/test-output-parser.d.ts.map +1 -0
- package/dist/taf/test-output-parser.js +114 -0
- package/dist/taf/test-output-parser.js.map +1 -0
- package/dist/utils/agents-parser.d.ts +60 -0
- package/dist/utils/agents-parser.d.ts.map +1 -0
- package/dist/utils/agents-parser.js +325 -0
- package/dist/utils/agents-parser.js.map +1 -0
- package/dist/utils/cursorrules-parser.d.ts +56 -0
- package/dist/utils/cursorrules-parser.d.ts.map +1 -0
- package/dist/utils/cursorrules-parser.js +315 -0
- package/dist/utils/cursorrules-parser.js.map +1 -0
- package/dist/utils/memory-parser.d.ts +95 -0
- package/dist/utils/memory-parser.d.ts.map +1 -0
- package/dist/utils/memory-parser.js +408 -0
- package/dist/utils/memory-parser.js.map +1 -0
- package/package.json +1 -1
- package/project.faf +12 -20
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MEMORY.md Parser — Claude Code Auto-Memory Interop
|
|
4
|
+
*
|
|
5
|
+
* Bidirectional interoperability between FAF and Claude Code's
|
|
6
|
+
* auto-memory system (~/.claude/projects/<id>/memory/MEMORY.md).
|
|
7
|
+
*
|
|
8
|
+
* Key difference from other targets: MEMORY.md lives OUTSIDE the
|
|
9
|
+
* project root, has a 200-line auto-load ceiling, and must MERGE
|
|
10
|
+
* (not overwrite) to preserve Claude's own notes.
|
|
11
|
+
*
|
|
12
|
+
* Path convention:
|
|
13
|
+
* ~/.claude/projects/<project-id>/memory/MEMORY.md
|
|
14
|
+
* project-id = absolute path with / replaced by -
|
|
15
|
+
* e.g. /Users/wolfejam/FAF/cli → -Users-wolfejam-FAF-cli
|
|
16
|
+
*/
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.computeProjectId = computeProjectId;
|
|
22
|
+
exports.getGitRoot = getGitRoot;
|
|
23
|
+
exports.resolveMemoryDir = resolveMemoryDir;
|
|
24
|
+
exports.resolveMemoryPath = resolveMemoryPath;
|
|
25
|
+
exports.parseMemoryMd = parseMemoryMd;
|
|
26
|
+
exports.memoryExport = memoryExport;
|
|
27
|
+
exports.memoryImport = memoryImport;
|
|
28
|
+
exports.detectMemoryMd = detectMemoryMd;
|
|
29
|
+
exports.getMemoryStatus = getMemoryStatus;
|
|
30
|
+
const fs_1 = require("fs");
|
|
31
|
+
const path_1 = __importDefault(require("path"));
|
|
32
|
+
const child_process_1 = require("child_process");
|
|
33
|
+
// ============================================================================
|
|
34
|
+
// Path Resolution
|
|
35
|
+
// ============================================================================
|
|
36
|
+
/**
|
|
37
|
+
* Compute Claude Code project ID from an absolute path.
|
|
38
|
+
* Convention: /Users/wolfejam/FAF/cli → -Users-wolfejam-FAF-cli
|
|
39
|
+
*/
|
|
40
|
+
function computeProjectId(projectPath) {
|
|
41
|
+
// Normalize: resolve to absolute, remove trailing slash
|
|
42
|
+
const normalized = path_1.default.resolve(projectPath).replace(/\/+$/, '');
|
|
43
|
+
// Replace all / with -
|
|
44
|
+
return normalized.replace(/\//g, '-');
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get the git repository root for a directory.
|
|
48
|
+
* Returns null if not in a git repo.
|
|
49
|
+
*/
|
|
50
|
+
function getGitRoot(cwd) {
|
|
51
|
+
try {
|
|
52
|
+
const root = (0, child_process_1.execSync)('git rev-parse --show-toplevel', {
|
|
53
|
+
cwd: cwd || process.cwd(),
|
|
54
|
+
encoding: 'utf-8',
|
|
55
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
56
|
+
}).trim();
|
|
57
|
+
return root;
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Resolve the memory directory for a project.
|
|
65
|
+
* → ~/.claude/projects/-Users-wolfejam-FAF-cli/memory/
|
|
66
|
+
*/
|
|
67
|
+
function resolveMemoryDir(projectPath) {
|
|
68
|
+
const home = process.env.HOME || process.env.USERPROFILE || '';
|
|
69
|
+
const configDir = process.env.CLAUDE_CONFIG_DIR || path_1.default.join(home, '.claude');
|
|
70
|
+
const projectId = computeProjectId(projectPath);
|
|
71
|
+
return path_1.default.join(configDir, 'projects', projectId, 'memory');
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Resolve the full MEMORY.md path for a project.
|
|
75
|
+
* → ~/.claude/projects/-Users-wolfejam-FAF-cli/memory/MEMORY.md
|
|
76
|
+
*/
|
|
77
|
+
function resolveMemoryPath(projectPath) {
|
|
78
|
+
return path_1.default.join(resolveMemoryDir(projectPath), 'MEMORY.md');
|
|
79
|
+
}
|
|
80
|
+
// ============================================================================
|
|
81
|
+
// Section Markers
|
|
82
|
+
// ============================================================================
|
|
83
|
+
const FAF_SECTION_START = '# Project Context (from project.faf)';
|
|
84
|
+
const FAF_SECTION_END = '*This section is managed by tri-sync.';
|
|
85
|
+
// ============================================================================
|
|
86
|
+
// Parsing
|
|
87
|
+
// ============================================================================
|
|
88
|
+
/**
|
|
89
|
+
* Parse MEMORY.md into our section and Claude's notes.
|
|
90
|
+
*/
|
|
91
|
+
function parseMemoryMd(content) {
|
|
92
|
+
const normalized = content.replace(/^\uFEFF/, '').replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
|
93
|
+
const lines = normalized.split('\n');
|
|
94
|
+
const startIdx = normalized.indexOf(FAF_SECTION_START);
|
|
95
|
+
const endIdx = normalized.indexOf(FAF_SECTION_END);
|
|
96
|
+
if (startIdx !== -1 && endIdx !== -1) {
|
|
97
|
+
// Find the end of our section (after the end marker line)
|
|
98
|
+
const endLineIdx = normalized.indexOf('\n', endIdx);
|
|
99
|
+
const endOfSection = endLineIdx !== -1 ? endLineIdx + 1 : normalized.length;
|
|
100
|
+
const fafSection = normalized.substring(startIdx, endOfSection);
|
|
101
|
+
const before = normalized.substring(0, startIdx);
|
|
102
|
+
const after = normalized.substring(endOfSection);
|
|
103
|
+
const claudeNotes = (before + after).trim();
|
|
104
|
+
return {
|
|
105
|
+
fafSection,
|
|
106
|
+
claudeNotes,
|
|
107
|
+
totalLines: lines.length,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
fafSection: null,
|
|
112
|
+
claudeNotes: normalized.trim(),
|
|
113
|
+
totalLines: lines.length,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
// ============================================================================
|
|
117
|
+
// Export: FAF → MEMORY.md
|
|
118
|
+
// ============================================================================
|
|
119
|
+
/**
|
|
120
|
+
* Generate the FAF section content from parsed .faf data.
|
|
121
|
+
* Kept deliberately concise — aims for 30-60 lines to leave room for Claude's notes.
|
|
122
|
+
*/
|
|
123
|
+
function generateFafSection(fafData) {
|
|
124
|
+
const lines = [];
|
|
125
|
+
lines.push(FAF_SECTION_START);
|
|
126
|
+
lines.push('');
|
|
127
|
+
// Quick Reference
|
|
128
|
+
const projectName = fafData.project?.name || fafData.name || 'Unknown';
|
|
129
|
+
const projectGoal = fafData.project?.goal || fafData.project?.description || fafData.ai_tldr?.project || '';
|
|
130
|
+
const projectType = fafData.project?.type || '';
|
|
131
|
+
const techStack = fafData.instant_context?.tech_stack || fafData.ai_tldr?.stack || '';
|
|
132
|
+
const mainLang = fafData.instant_context?.main_language || fafData.project?.main_language || '';
|
|
133
|
+
lines.push('## Quick Reference');
|
|
134
|
+
lines.push(`- **Name:** ${projectName}`);
|
|
135
|
+
if (projectGoal) {
|
|
136
|
+
lines.push(`- **Goal:** ${projectGoal}`);
|
|
137
|
+
}
|
|
138
|
+
if (projectType) {
|
|
139
|
+
lines.push(`- **App Type:** ${projectType}`);
|
|
140
|
+
}
|
|
141
|
+
if (techStack) {
|
|
142
|
+
lines.push(`- **Stack:** ${techStack}`);
|
|
143
|
+
}
|
|
144
|
+
if (mainLang) {
|
|
145
|
+
lines.push(`- **Main Language:** ${mainLang}`);
|
|
146
|
+
}
|
|
147
|
+
lines.push('');
|
|
148
|
+
// Tech Stack details
|
|
149
|
+
const stack = fafData.stack || {};
|
|
150
|
+
const hasStack = stack.frontend || stack.backend || stack.build || stack.runtime;
|
|
151
|
+
if (hasStack) {
|
|
152
|
+
lines.push('## Tech Stack');
|
|
153
|
+
if (stack.frontend) {
|
|
154
|
+
lines.push(`- Frontend: ${stack.frontend}`);
|
|
155
|
+
}
|
|
156
|
+
if (stack.backend) {
|
|
157
|
+
lines.push(`- Backend: ${stack.backend}`);
|
|
158
|
+
}
|
|
159
|
+
if (stack.build) {
|
|
160
|
+
lines.push(`- Build: ${stack.build}`);
|
|
161
|
+
}
|
|
162
|
+
if (stack.runtime) {
|
|
163
|
+
lines.push(`- Runtime: ${stack.runtime}`);
|
|
164
|
+
}
|
|
165
|
+
if (stack.package_manager) {
|
|
166
|
+
lines.push(`- Package Manager: ${stack.package_manager}`);
|
|
167
|
+
}
|
|
168
|
+
if (stack.database && stack.database !== 'None') {
|
|
169
|
+
lines.push(`- Database: ${stack.database}`);
|
|
170
|
+
}
|
|
171
|
+
lines.push('');
|
|
172
|
+
}
|
|
173
|
+
// Architecture / what building
|
|
174
|
+
const whatBuilding = fafData.instant_context?.what_building || fafData.human_context?.what || '';
|
|
175
|
+
const architecture = fafData.project?.architecture || [];
|
|
176
|
+
if (whatBuilding || architecture.length > 0) {
|
|
177
|
+
lines.push('## Key Architecture');
|
|
178
|
+
if (whatBuilding) {
|
|
179
|
+
lines.push(`- ${whatBuilding}`);
|
|
180
|
+
}
|
|
181
|
+
for (const item of architecture) {
|
|
182
|
+
lines.push(`- ${item}`);
|
|
183
|
+
}
|
|
184
|
+
lines.push('');
|
|
185
|
+
}
|
|
186
|
+
// Conventions (from warnings + preferences)
|
|
187
|
+
const warnings = fafData.ai_instructions?.warnings || [];
|
|
188
|
+
const codingStyle = fafData.project?.codingStyle || [];
|
|
189
|
+
const preferences = fafData.preferences || {};
|
|
190
|
+
const conventionItems = [...warnings, ...codingStyle];
|
|
191
|
+
if (preferences.quality_bar) {
|
|
192
|
+
conventionItems.push(`Quality bar: ${preferences.quality_bar}`);
|
|
193
|
+
}
|
|
194
|
+
if (preferences.testing) {
|
|
195
|
+
conventionItems.push(`Testing: ${preferences.testing}`);
|
|
196
|
+
}
|
|
197
|
+
if (preferences.commit_style) {
|
|
198
|
+
conventionItems.push(`Commit style: ${preferences.commit_style}`);
|
|
199
|
+
}
|
|
200
|
+
if (conventionItems.length > 0) {
|
|
201
|
+
lines.push('## Conventions');
|
|
202
|
+
for (const item of conventionItems) {
|
|
203
|
+
lines.push(`- ${item}`);
|
|
204
|
+
}
|
|
205
|
+
lines.push('');
|
|
206
|
+
}
|
|
207
|
+
// Build Commands
|
|
208
|
+
const howContext = fafData.human_context?.how || '';
|
|
209
|
+
const buildCommands = fafData.project?.buildCommands || [];
|
|
210
|
+
if (howContext || buildCommands.length > 0) {
|
|
211
|
+
lines.push('## Build Commands');
|
|
212
|
+
if (howContext) {
|
|
213
|
+
lines.push(`- ${howContext}`);
|
|
214
|
+
}
|
|
215
|
+
for (const cmd of buildCommands) {
|
|
216
|
+
lines.push(`- ${cmd}`);
|
|
217
|
+
}
|
|
218
|
+
lines.push('');
|
|
219
|
+
}
|
|
220
|
+
// Key Files
|
|
221
|
+
const keyFiles = fafData.instant_context?.key_files || fafData.key_files || [];
|
|
222
|
+
if (keyFiles.length > 0) {
|
|
223
|
+
lines.push('## Key Files');
|
|
224
|
+
for (const file of keyFiles) {
|
|
225
|
+
if (typeof file === 'string') {
|
|
226
|
+
lines.push(`- ${file}`);
|
|
227
|
+
}
|
|
228
|
+
else if (file.path) {
|
|
229
|
+
lines.push(`- ${file.path}${file.purpose ? ` — ${file.purpose}` : ''}`);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
lines.push('');
|
|
233
|
+
}
|
|
234
|
+
// Footer
|
|
235
|
+
lines.push('---');
|
|
236
|
+
lines.push(`*Seeded from project.faf by faf-cli tri-sync — ${new Date().toISOString().split('T')[0]}*`);
|
|
237
|
+
lines.push(`${FAF_SECTION_END} Claude's own notes below are preserved.*`);
|
|
238
|
+
return lines.join('\n');
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Export .faf data to MEMORY.md.
|
|
242
|
+
* Merge mode (default): replace only our section, preserve Claude's notes.
|
|
243
|
+
* Force mode: overwrite entire file.
|
|
244
|
+
*/
|
|
245
|
+
async function memoryExport(fafContent, outputPath, options) {
|
|
246
|
+
const warnings = [];
|
|
247
|
+
const fafSection = generateFafSection(fafContent);
|
|
248
|
+
const fafLines = fafSection.split('\n').length;
|
|
249
|
+
if (fafLines > 80) {
|
|
250
|
+
warnings.push(`FAF section is ${fafLines} lines — consider trimming to leave room for Claude's notes (200 line ceiling)`);
|
|
251
|
+
}
|
|
252
|
+
// Ensure directory exists
|
|
253
|
+
const dir = path_1.default.dirname(outputPath);
|
|
254
|
+
await fs_1.promises.mkdir(dir, { recursive: true });
|
|
255
|
+
if (options?.merge !== false) {
|
|
256
|
+
// Merge mode (default)
|
|
257
|
+
try {
|
|
258
|
+
const raw = await fs_1.promises.readFile(outputPath, 'utf-8');
|
|
259
|
+
// Normalize CRLF/CR to LF before string surgery (matches parseMemoryMd behavior)
|
|
260
|
+
const existing = raw.replace(/^\uFEFF/, '').replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
|
261
|
+
const parsed = parseMemoryMd(existing);
|
|
262
|
+
let merged;
|
|
263
|
+
if (parsed.fafSection !== null) {
|
|
264
|
+
// Replace our section, preserve Claude's notes
|
|
265
|
+
const startIdx = existing.indexOf(FAF_SECTION_START);
|
|
266
|
+
const endIdx = existing.indexOf(FAF_SECTION_END);
|
|
267
|
+
const endLineIdx = existing.indexOf('\n', endIdx);
|
|
268
|
+
const endOfSection = endLineIdx !== -1 ? endLineIdx + 1 : existing.length;
|
|
269
|
+
const before = existing.substring(0, startIdx);
|
|
270
|
+
const after = existing.substring(endOfSection);
|
|
271
|
+
merged = `${before}${fafSection}\n${after}`;
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
// Our section doesn't exist yet — prepend it
|
|
275
|
+
merged = `${fafSection}\n\n${existing}`;
|
|
276
|
+
}
|
|
277
|
+
const totalLines = merged.split('\n').length;
|
|
278
|
+
if (totalLines > 200) {
|
|
279
|
+
warnings.push(`Total MEMORY.md is ${totalLines} lines — exceeds 200-line auto-load ceiling. Lines 201+ will be silently truncated by Claude Code.`);
|
|
280
|
+
}
|
|
281
|
+
await fs_1.promises.writeFile(outputPath, merged);
|
|
282
|
+
return { success: true, filePath: outputPath, linesWritten: totalLines, warnings, merged: true };
|
|
283
|
+
}
|
|
284
|
+
catch {
|
|
285
|
+
// File doesn't exist — write fresh
|
|
286
|
+
await fs_1.promises.writeFile(outputPath, `${fafSection}\n`);
|
|
287
|
+
return { success: true, filePath: outputPath, linesWritten: fafLines, warnings, merged: false };
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
// Force mode — overwrite entirely
|
|
292
|
+
await fs_1.promises.writeFile(outputPath, `${fafSection}\n`);
|
|
293
|
+
return { success: true, filePath: outputPath, linesWritten: fafLines, warnings, merged: false };
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
// ============================================================================
|
|
297
|
+
// Import: MEMORY.md → FAF (harvest)
|
|
298
|
+
// ============================================================================
|
|
299
|
+
/**
|
|
300
|
+
* Import/harvest Claude's notes from MEMORY.md into structured data.
|
|
301
|
+
* Conservative: only extracts clearly structured entries.
|
|
302
|
+
*/
|
|
303
|
+
async function memoryImport(memoryPath) {
|
|
304
|
+
const warnings = [];
|
|
305
|
+
const harvested = {
|
|
306
|
+
patterns: [],
|
|
307
|
+
conventions: [],
|
|
308
|
+
keyFiles: [],
|
|
309
|
+
notes: [],
|
|
310
|
+
};
|
|
311
|
+
try {
|
|
312
|
+
await fs_1.promises.access(memoryPath);
|
|
313
|
+
}
|
|
314
|
+
catch {
|
|
315
|
+
return {
|
|
316
|
+
success: false,
|
|
317
|
+
warnings: [`MEMORY.md not found: ${memoryPath}`],
|
|
318
|
+
harvested,
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
const content = await fs_1.promises.readFile(memoryPath, 'utf-8');
|
|
322
|
+
const parsed = parseMemoryMd(content);
|
|
323
|
+
if (!parsed.claudeNotes || parsed.claudeNotes.trim().length === 0) {
|
|
324
|
+
warnings.push('No Claude notes found to harvest');
|
|
325
|
+
return { success: true, warnings, harvested };
|
|
326
|
+
}
|
|
327
|
+
// Parse Claude's notes section by section
|
|
328
|
+
const lines = parsed.claudeNotes.split('\n');
|
|
329
|
+
let currentSection = '';
|
|
330
|
+
for (const line of lines) {
|
|
331
|
+
// Track H2 sections
|
|
332
|
+
const h2Match = line.match(/^##\s+(.+)$/);
|
|
333
|
+
if (h2Match) {
|
|
334
|
+
currentSection = h2Match[1].trim().toLowerCase();
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
// Extract bullet points
|
|
338
|
+
const bulletMatch = line.match(/^[-*]\s+(.+)$/);
|
|
339
|
+
if (bulletMatch) {
|
|
340
|
+
const item = bulletMatch[1].trim();
|
|
341
|
+
if (currentSection.includes('pattern') || currentSection.includes('convention')) {
|
|
342
|
+
harvested.patterns.push(item);
|
|
343
|
+
}
|
|
344
|
+
else if (currentSection.includes('file') || currentSection.includes('path')) {
|
|
345
|
+
harvested.keyFiles.push(item);
|
|
346
|
+
}
|
|
347
|
+
else if (currentSection.includes('style') || currentSection.includes('rule')) {
|
|
348
|
+
harvested.conventions.push(item);
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
harvested.notes.push(item);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
const totalHarvested = harvested.patterns.length +
|
|
356
|
+
harvested.conventions.length +
|
|
357
|
+
harvested.keyFiles.length +
|
|
358
|
+
harvested.notes.length;
|
|
359
|
+
if (totalHarvested === 0) {
|
|
360
|
+
warnings.push('No structured entries found to harvest (Claude notes may be free-form prose)');
|
|
361
|
+
}
|
|
362
|
+
return { success: true, warnings, harvested };
|
|
363
|
+
}
|
|
364
|
+
// ============================================================================
|
|
365
|
+
// Detection
|
|
366
|
+
// ============================================================================
|
|
367
|
+
/**
|
|
368
|
+
* Detect MEMORY.md at Claude's expected path for this project.
|
|
369
|
+
* Returns the path if found, null otherwise.
|
|
370
|
+
*/
|
|
371
|
+
async function detectMemoryMd(projectPath) {
|
|
372
|
+
const memoryPath = resolveMemoryPath(projectPath);
|
|
373
|
+
try {
|
|
374
|
+
await fs_1.promises.access(memoryPath);
|
|
375
|
+
return memoryPath;
|
|
376
|
+
}
|
|
377
|
+
catch {
|
|
378
|
+
return null;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Get memory status for display.
|
|
383
|
+
*/
|
|
384
|
+
async function getMemoryStatus(projectPath) {
|
|
385
|
+
const memoryPath = resolveMemoryPath(projectPath);
|
|
386
|
+
const status = {
|
|
387
|
+
exists: false,
|
|
388
|
+
path: memoryPath,
|
|
389
|
+
totalLines: 0,
|
|
390
|
+
fafSectionLines: 0,
|
|
391
|
+
claudeNotesLines: 0,
|
|
392
|
+
hasFafSection: false,
|
|
393
|
+
};
|
|
394
|
+
try {
|
|
395
|
+
const content = await fs_1.promises.readFile(memoryPath, 'utf-8');
|
|
396
|
+
const parsed = parseMemoryMd(content);
|
|
397
|
+
status.exists = true;
|
|
398
|
+
status.totalLines = parsed.totalLines;
|
|
399
|
+
status.hasFafSection = parsed.fafSection !== null;
|
|
400
|
+
status.fafSectionLines = parsed.fafSection ? parsed.fafSection.split('\n').length : 0;
|
|
401
|
+
status.claudeNotesLines = parsed.claudeNotes ? parsed.claudeNotes.split('\n').filter((l) => l.trim()).length : 0;
|
|
402
|
+
}
|
|
403
|
+
catch {
|
|
404
|
+
// File doesn't exist
|
|
405
|
+
}
|
|
406
|
+
return status;
|
|
407
|
+
}
|
|
408
|
+
//# sourceMappingURL=memory-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-parser.js","sourceRoot":"","sources":["../../src/utils/memory-parser.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;AAgDH,4CAKC;AAMD,gCAWC;AAMD,4CAKC;AAMD,8CAEC;AAgBD,sCA6BC;AAiHD,oCA0DC;AAUD,oCAmEC;AAUD,wCAQC;AAKD,0CA+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AAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3H,CAAC;IAAC,MAAM,CAAC;QACP,qBAAqB;IACvB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "faf-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "The Persistent AI Context Standard • Foundation Layer for AI • IANA-Registered • Anthropic-Approved • project.faf = AI's foundation",
|
|
5
5
|
"icon": "https://faf.one/orange-smiley.svg",
|
|
6
6
|
"logo": "https://faf.one/orange-smiley.svg",
|
package/project.faf
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
faf_version: 2.5.0
|
|
2
|
-
generated: 2026-02-
|
|
2
|
+
generated: 2026-02-18T19:56:53.057Z
|
|
3
3
|
ai_scoring_system: 2025-09-20
|
|
4
4
|
ai_score: 83%
|
|
5
5
|
ai_confidence: HIGH
|
|
6
6
|
ai_value: 30_seconds_replaces_20_minutes_of_questions
|
|
7
7
|
ai_tldr:
|
|
8
|
-
project: faf-cli - "The Persistent AI Context Standard • Foundation Layer for AI
|
|
9
|
-
• IANA-Registered • Anthropic-Approved • project.faf = AI's foundation"
|
|
8
|
+
project: faf-cli - "The Persistent AI Context Standard • Foundation Layer for AI • IANA-Registered • Anthropic-Approved • project.faf = AI's foundation"
|
|
10
9
|
stack: CLI/TypeScript/TypeScript (tsc)/npm registry/Node.js
|
|
11
10
|
quality_bar: production_ready
|
|
12
11
|
current_focus: Production deployment preparation
|
|
13
12
|
your_role: Build features with perfect context
|
|
14
13
|
instant_context:
|
|
15
|
-
what_building: The Persistent AI Context Standard • Foundation Layer for AI •
|
|
16
|
-
IANA-Registered • Anthropic-Approved • project.faf = AI's foundation
|
|
14
|
+
what_building: The Persistent AI Context Standard • Foundation Layer for AI • IANA-Registered • Anthropic-Approved • project.faf = AI's foundation
|
|
17
15
|
tech_stack: CLI/TypeScript/TypeScript (tsc)/npm registry/Node.js
|
|
18
16
|
main_language: TypeScript
|
|
19
17
|
deployment: npm registry
|
|
@@ -28,8 +26,7 @@ context_quality:
|
|
|
28
26
|
- None - fully specified!
|
|
29
27
|
project:
|
|
30
28
|
name: faf-cli
|
|
31
|
-
goal: The Persistent AI Context Standard • Foundation Layer for AI •
|
|
32
|
-
IANA-Registered • Anthropic-Approved • project.faf = AI's foundation
|
|
29
|
+
goal: The Persistent AI Context Standard • Foundation Layer for AI • IANA-Registered • Anthropic-Approved • project.faf = AI's foundation
|
|
33
30
|
main_language: TypeScript
|
|
34
31
|
type: cli-ts
|
|
35
32
|
ai_instructions:
|
|
@@ -67,7 +64,7 @@ preferences:
|
|
|
67
64
|
documentation: as_needed
|
|
68
65
|
state:
|
|
69
66
|
phase: development
|
|
70
|
-
version:
|
|
67
|
+
version: 5.0.0
|
|
71
68
|
focus: production_deployment
|
|
72
69
|
status: green_flag
|
|
73
70
|
next_milestone: npm_publication
|
|
@@ -93,16 +90,8 @@ tags:
|
|
|
93
90
|
user_defined: null
|
|
94
91
|
human_context:
|
|
95
92
|
who: 🏎️⚡️_wolfejam.dev team
|
|
96
|
-
what: The Persistent AI Context Standard • Foundation Layer for AI •
|
|
97
|
-
|
|
98
|
-
why: To enable faf, turbo-cat, format-discovery, catalytic-converter,
|
|
99
|
-
ai-context, project-dna, context-mirroring, c-mirror, bi-sync, cli,
|
|
100
|
-
free-forever, podium, fast-af, claude, chatgpt, gemini, cursor, ai-tools,
|
|
101
|
-
developer-productivity, anti-faff, react, nextjs, next, svelte, sveltekit,
|
|
102
|
-
typescript, vite, n8n, workflow-automation, stack-detection,
|
|
103
|
-
framework-detection, react-tools, typescript-tools, integration-system, mcp,
|
|
104
|
-
model-context-protocol, mcp-server, persistent, persistent-context,
|
|
105
|
-
persistent-project-context, context-on-demand, ai-readiness
|
|
93
|
+
what: The Persistent AI Context Standard • Foundation Layer for AI • IANA-Registered • Anthropic-Approved • project.faf = AI's foundation
|
|
94
|
+
why: To enable faf, turbo-cat, format-discovery, catalytic-converter, ai-context, project-dna, context-mirroring, c-mirror, bi-sync, cli, free-forever, podium, fast-af, claude, chatgpt, gemini, cursor, ai-tools, developer-productivity, anti-faff, react, nextjs, next, svelte, sveltekit, typescript, vite, n8n, workflow-automation, stack-detection, framework-detection, react-tools, typescript-tools, integration-system, mcp, model-context-protocol, mcp-server, persistent, persistent-context, persistent-project-context, context-on-demand, ai-readiness
|
|
106
95
|
where: npm registry + GitHub
|
|
107
96
|
when: Production/Stable
|
|
108
97
|
how: Test-driven development
|
|
@@ -132,6 +121,9 @@ gemini:
|
|
|
132
121
|
notes: Native Gemini CLI integration via FAF
|
|
133
122
|
faf_dna:
|
|
134
123
|
birth_dna: 86
|
|
135
|
-
birth_certificate: FAF-2026-CLIX-
|
|
136
|
-
birth_date: 2026-02-
|
|
124
|
+
birth_certificate: FAF-2026-CLIX-KQPK
|
|
125
|
+
birth_date: 2026-02-18T19:56:53.125Z
|
|
137
126
|
current_score: 86
|
|
127
|
+
metadata:
|
|
128
|
+
last_claude_sync: 2026-03-02T03:42:51.027Z
|
|
129
|
+
bi_sync: active
|