feat(M3): Shared-source generator for agent variants
This commit is contained in:
@@ -47,13 +47,20 @@ const SKIP_PATHS = new Set([
|
||||
"pi-package",
|
||||
]);
|
||||
|
||||
// Also skip any _source/ subdirectory within skills — canonical source files
|
||||
// use relative paths calibrated to the generated location (one level shallower).
|
||||
const SKIP_SEGMENT = "_source";
|
||||
|
||||
function shouldSkip(absPath) {
|
||||
const rel = path.relative(REPO_ROOT, absPath);
|
||||
for (const skip of SKIP_PATHS) {
|
||||
if (rel === skip || rel.startsWith(skip + path.sep)) return true;
|
||||
}
|
||||
const parts = rel.split(path.sep);
|
||||
return parts.includes("node_modules");
|
||||
if (parts.includes("node_modules")) return true;
|
||||
// Skip canonical _source/ directories (links calibrated to generated location)
|
||||
if (parts.includes(SKIP_SEGMENT)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function collectMarkdownFiles(dir) {
|
||||
|
||||
Reference in New Issue
Block a user