@mrciphersmith/keryx 0.3.8 → 0.3.10
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/cli.js +27 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -17628,7 +17628,7 @@ var package_default;
|
|
|
17628
17628
|
var init_package = __esm(() => {
|
|
17629
17629
|
package_default = {
|
|
17630
17630
|
name: "@mrciphersmith/keryx",
|
|
17631
|
-
version: "0.3.
|
|
17631
|
+
version: "0.3.10",
|
|
17632
17632
|
description: "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
|
|
17633
17633
|
private: false,
|
|
17634
17634
|
publishConfig: {
|
|
@@ -74043,10 +74043,13 @@ ${blockEnd}`;
|
|
|
74043
74043
|
const metaprojectIgnoreLines = new Set(metaprojectIgnoreBlock.split(`
|
|
74044
74044
|
`));
|
|
74045
74045
|
const withoutExistingManagedBlock = existing.replace(blockPattern, "");
|
|
74046
|
+
const keepBlanketIgnore = !await metaprojectIsTracked(projectRoot);
|
|
74046
74047
|
const withoutLegacyMetaprojectIgnore = withoutExistingManagedBlock.split(`
|
|
74047
74048
|
`).filter((line) => {
|
|
74048
74049
|
const trimmed = line.trim();
|
|
74049
|
-
|
|
74050
|
+
if (trimmed === ".metaproject/" || trimmed === ".metaproject")
|
|
74051
|
+
return keepBlanketIgnore;
|
|
74052
|
+
return !metaprojectIgnoreLines.has(trimmed);
|
|
74050
74053
|
}).join(`
|
|
74051
74054
|
`);
|
|
74052
74055
|
const next = `${withoutLegacyMetaprojectIgnore.trimEnd()}
|
|
@@ -74057,6 +74060,15 @@ ${managedBlock}
|
|
|
74057
74060
|
await writeContained(projectRoot, ".gitignore", next);
|
|
74058
74061
|
}
|
|
74059
74062
|
}
|
|
74063
|
+
async function metaprojectIsTracked(projectRoot) {
|
|
74064
|
+
try {
|
|
74065
|
+
const proc = Bun.spawn(["git", "ls-files", "--", ".metaproject"], { cwd: projectRoot, stdout: "pipe", stderr: "ignore" });
|
|
74066
|
+
const out = await new Response(proc.stdout).text();
|
|
74067
|
+
return await proc.exited === 0 && out.trim().length > 0;
|
|
74068
|
+
} catch {
|
|
74069
|
+
return false;
|
|
74070
|
+
}
|
|
74071
|
+
}
|
|
74060
74072
|
async function findLegacyMemoryArtifacts(projectRoot) {
|
|
74061
74073
|
const found = [];
|
|
74062
74074
|
for (const relativePath of LEGACY_MEMORY_ARTIFACT_PATHS) {
|
|
@@ -97269,9 +97281,12 @@ function classify2(file) {
|
|
|
97269
97281
|
const decision = classifyRuleSourceCategory(file.path, file.text);
|
|
97270
97282
|
return { file: { ...file, category: decision.category }, decision };
|
|
97271
97283
|
}
|
|
97284
|
+
function stripKeryxManagedBlock(text) {
|
|
97285
|
+
return text.replace(/<!-- keryx:index -->[\s\S]*?<!-- \/keryx:index -->\n?/g, "");
|
|
97286
|
+
}
|
|
97272
97287
|
async function discoverRuleSources(cwd, explicitPaths) {
|
|
97273
97288
|
const discovered = [];
|
|
97274
|
-
for (const root of [join5(cwd, ".metaproject", "rules"), join5(cwd, "rules")]) {
|
|
97289
|
+
for (const root of [join5(cwd, ".metaproject", "rules"), join5(cwd, "rules"), join5(cwd, ".claude", "rules")]) {
|
|
97275
97290
|
for (const file of await walkMatching(root, [".md", ".mdc"])) {
|
|
97276
97291
|
const text = await readIfExists(file);
|
|
97277
97292
|
if (text === undefined)
|
|
@@ -97279,6 +97294,15 @@ async function discoverRuleSources(cwd, explicitPaths) {
|
|
|
97279
97294
|
discovered.push(classify2({ path: relative3(cwd, file), kind: "project-rule", text }));
|
|
97280
97295
|
}
|
|
97281
97296
|
}
|
|
97297
|
+
for (const name of ["CLAUDE.md", "AGENTS.md"]) {
|
|
97298
|
+
const text = await readIfExists(join5(cwd, name));
|
|
97299
|
+
if (text === undefined)
|
|
97300
|
+
continue;
|
|
97301
|
+
const body = stripKeryxManagedBlock(text);
|
|
97302
|
+
if (body.trim().length > 0)
|
|
97303
|
+
discovered.push(classify2({ path: name, kind: "project-rule", text: body }));
|
|
97304
|
+
break;
|
|
97305
|
+
}
|
|
97282
97306
|
const skillRoots = [
|
|
97283
97307
|
[join5(cwd, ".metaproject", "project-skills"), "project-skill"],
|
|
97284
97308
|
[join5(cwd, ".metaproject", "skills", "gdskills"), "gdskill"]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrciphersmith/keryx",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.10",
|
|
4
4
|
"description": "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|