mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 21:53:28 +08:00
feat: define skill placement and provenance policy (#748)
This commit is contained in:
@@ -99,13 +99,14 @@ function validateCommands() {
|
||||
}
|
||||
|
||||
// Check skill directory references (e.g., "skills/tdd-workflow/")
|
||||
// learned and imported are reserved roots (~/.claude/skills/); no local dir expected
|
||||
const reservedSkillRoots = new Set(['learned', 'imported']);
|
||||
const skillRefs = contentNoCodeBlocks.matchAll(/skills\/([a-z][-a-z0-9]*)\//g);
|
||||
for (const match of skillRefs) {
|
||||
const refName = match[1];
|
||||
if (!validSkills.has(refName)) {
|
||||
console.warn(`WARN: ${file} - references skill directory skills/${refName}/ (not found locally)`);
|
||||
warnCount++;
|
||||
}
|
||||
if (reservedSkillRoots.has(refName) || validSkills.has(refName)) continue;
|
||||
console.warn(`WARN: ${file} - references skill directory skills/${refName}/ (not found locally)`);
|
||||
warnCount++;
|
||||
}
|
||||
|
||||
// Check agent name references in workflow diagrams (e.g., "planner -> tdd-guide")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Validate selective-install manifests and profile/module relationships.
|
||||
* Module paths are curated repo paths only. Generated/imported skill roots
|
||||
* (~/.claude/skills/learned, etc.) are never in manifests.
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
@@ -109,6 +111,7 @@ function validateInstallManifests() {
|
||||
const normalizedPath = normalizeRelativePath(relativePath);
|
||||
const absolutePath = path.join(REPO_ROOT, normalizedPath);
|
||||
|
||||
// All module paths must exist; no optional/generated paths in manifests
|
||||
if (!fs.existsSync(absolutePath)) {
|
||||
console.error(
|
||||
`ERROR: Module ${module.id} references missing path: ${normalizedPath}`
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Validate skill directories have SKILL.md with required structure
|
||||
* Validate curated skill directories (skills/ in repo).
|
||||
* Scope: curated only. Learned/imported/evolved roots are out of scope.
|
||||
* If skills/ does not exist, exit 0 (no curated skills to validate).
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
@@ -10,7 +12,7 @@ const SKILLS_DIR = path.join(__dirname, '../../skills');
|
||||
|
||||
function validateSkills() {
|
||||
if (!fs.existsSync(SKILLS_DIR)) {
|
||||
console.log('No skills directory found, skipping validation');
|
||||
console.log('No curated skills directory (skills/), skipping');
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user