@xelth/eck-snapshot 6.4.0 → 6.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/setup.json +5 -1
- package/src/templates/multiAgent.md +25 -0
- package/src/utils/fileUtils.js +16 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xelth/eck-snapshot",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.1",
|
|
4
4
|
"description": "A powerful CLI tool to create and restore single-file text snapshots of Git repositories. Optimized for AI context, LLM workflows, and multi-agent Swarm coordination.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
package/setup.json
CHANGED
|
@@ -34,6 +34,31 @@ The `.eck/` directory files are your "Source of Knowledge".
|
|
|
34
34
|
|
|
35
35
|
**Documentation is part of the "Definition of Done". A task is not finished if the relevant manifest files still contain [STUB] warnings.**
|
|
36
36
|
|
|
37
|
+
### 🧹 CONTEXT HYGIENE PROTOCOL (CRITICAL)
|
|
38
|
+
|
|
39
|
+
You are responsible for keeping your own context window clean and efficient.
|
|
40
|
+
If you notice in the "Directory Structure" or file list that the snapshot has captured irrelevant data (e.g., compiled binaries, database dumps like .wal, huge generated logs, raw data arrays, or decompiled third-party code):
|
|
41
|
+
1. **Take Immediate Action:** You MUST instruct the Coder to create or update a `.eckignore` file in the project root.
|
|
42
|
+
2. **Syntax:** Use standard `.gitignore` syntax (e.g., `data/surreal_data/`, `*.wal`, `decompiled_dll/`).
|
|
43
|
+
3. **Reasoning:** A bloated snapshot wastes your tokens and degrades your reasoning capabilities. Be aggressive in hiding non-source-code artifacts.
|
|
44
|
+
|
|
45
|
+
### 📝 PROACTIVE TECH DEBT & TODO PROTOCOL
|
|
46
|
+
|
|
47
|
+
As a Senior Architect, you must actively manage code quality. When analyzing files in this snapshot, do not ignore developer comments:
|
|
48
|
+
1. **Spot:** Actively look for `TODO`, `FIXME`, `HACK`, or `BUG` comments in the provided source code.
|
|
49
|
+
2. **Evaluate:** Compare the comment against the actual implementation. Developers often fix things but forget to remove the comment.
|
|
50
|
+
3. **Resolve (The 3 Actions):**
|
|
51
|
+
- **Obsolete:** If the code already does what the TODO asks, instruct the Coder to **delete the comment**.
|
|
52
|
+
- **Quick Fix:** If it's a small missing piece or an obvious bug, instruct the Coder to **implement the fix and remove the comment**.
|
|
53
|
+
- **Real Debt:** If it requires significant architectural work, instruct the Coder to **document it in `.eck/TECH_DEBT.md`** so it is officially tracked, and leave the comment in the code for now.
|
|
54
|
+
|
|
55
|
+
### 🏕️ THE BOY SCOUT RULE (Docstrings & Comments)
|
|
56
|
+
|
|
57
|
+
Leave the codebase better than you found it.
|
|
58
|
+
Whenever you instruct the Coder to **modify an existing function/class** or **create a new one**, you MUST explicitly add this requirement to their task:
|
|
59
|
+
> *"Ensure the JSDoc / Docstring for this function is created or updated to accurately reflect its new behavior, parameters, and return types. Explain WHY it exists, not just WHAT it does."*
|
|
60
|
+
Do not rewrite documentation for the entire file—only strictly for the components you are touching.
|
|
61
|
+
|
|
37
62
|
### CRITICAL WORKFLOW: Structured Commits via `journal_entry`
|
|
38
63
|
|
|
39
64
|
To ensure proper project history, all code changes **MUST** be committed using the project's built-in structured workflow.
|
package/src/utils/fileUtils.js
CHANGED
|
@@ -205,7 +205,10 @@ export async function scanDirectoryRecursively(dirPath, config, relativeTo = dir
|
|
|
205
205
|
if (entry.name === 'node_modules' ||
|
|
206
206
|
entry.name === '.git' ||
|
|
207
207
|
entry.name === '.idea' ||
|
|
208
|
-
entry.name === '.vscode'
|
|
208
|
+
entry.name === '.vscode' ||
|
|
209
|
+
entry.name === '.gradle' ||
|
|
210
|
+
entry.name === 'build' ||
|
|
211
|
+
entry.name === '__pycache__') {
|
|
209
212
|
continue;
|
|
210
213
|
}
|
|
211
214
|
} else {
|
|
@@ -270,14 +273,23 @@ export async function scanDirectoryRecursively(dirPath, config, relativeTo = dir
|
|
|
270
273
|
}
|
|
271
274
|
|
|
272
275
|
export async function loadGitignore(repoPath) {
|
|
276
|
+
const ig = ignore();
|
|
277
|
+
|
|
273
278
|
try {
|
|
274
279
|
const gitignoreContent = await fs.readFile(path.join(repoPath, '.gitignore'), 'utf-8');
|
|
275
|
-
|
|
276
|
-
return ig;
|
|
280
|
+
ig.add(gitignoreContent);
|
|
277
281
|
} catch {
|
|
278
282
|
console.log('ℹ️ No .gitignore file found or could not be read');
|
|
279
|
-
return ignore();
|
|
280
283
|
}
|
|
284
|
+
|
|
285
|
+
try {
|
|
286
|
+
const eckignoreContent = await fs.readFile(path.join(repoPath, '.eckignore'), 'utf-8');
|
|
287
|
+
ig.add(eckignoreContent);
|
|
288
|
+
} catch {
|
|
289
|
+
// .eckignore is optional, silently skip if missing
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
return ig;
|
|
281
293
|
}
|
|
282
294
|
|
|
283
295
|
export async function readFileWithSizeCheck(filePath, maxFileSize) {
|