Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost.
TypeScript agentic-aiai-agentsai-codinganthropicautomationclaudeclaude-codecodexcoding-agentsdevops-automationdevtoolsgithub-actionsgrokllmloop-engineeringmcpprompt-engineering
chore(loop-sync): rebase fixes for merge (#47)
Cobus Greylinga975f8728d11
diff --git a/tools/loop-sync/dist/sync.js b/tools/loop-sync/dist/sync.jsindex 45f9bfc..74bfa31 100644--- a/tools/loop-sync/dist/sync.js+++ b/tools/loop-sync/dist/sync.js@@ -114,27 +114,33 @@ function compareMarkdownFiles(file1Content, file2Content, threshold = 0.5) {*/async function scanSkillsDirectory(targetDir) {const skillsVersions = new Map();- const skillsDir = path.join(targetDir, '.claude', 'skills');- if (!await fileExists(skillsDir)) {- return skillsVersions;- }- try {- const entries = await readdir(skillsDir);- for (const entry of entries) {- const skillPath = path.join(skillsDir, entry);- const statResult = await stat(skillPath);- if (statResult.isDirectory()) {- const skillMd = path.join(skillPath, 'SKILL.md');- const content = await readFileContent(skillMd);- if (content) {- const { frontmatter } = extractFrontmatter(content);- skillsVersions.set(entry, frontmatter.version || 'unknown');+ const skillDirs = [+ path.join(targetDir, 'skills'),+ path.join(targetDir, '.grok', 'skills'),+ path.join(targetDir, '.claude', 'skills'),+ path.join(targetDir, '.codex', 'skills'),+ ];+ for (const skillsDir of skillDirs) {+ if (!await fileExists(skillsDir))+ continue;+ try {+ const entries = await readdir(skillsDir);+ for (const entry of entries) {+ const skillPath = path.join(skillsDir, entry);+ const statResult = await stat(skillPath);+ if (statResult.isDirectory()) {+ const skillMd = path.join(skillPath, 'SKILL.md');+ const content = await readFileContent(skillMd);+ if (content) {+ const { frontmatter } = extractFrontmatter(content);+ skillsVersions.set(entry, frontmatter.version || 'unknown');+ }}}}- }- catch (error) {- // Ignore errors+ catch {+ // Ignore unreadable dirs+ }}return skillsVersions;}@@ -210,7 +216,11 @@ export async function runSync(options) {}// Scan skills for version informationconst skillsVersions = await scanSkillsDirectory(targetDir);- if (skillsVersions.size === 0 && await fileExists(path.join(targetDir, '.claude', 'skills'))) {+ const hasSkillsDir = await fileExists(path.join(targetDir, 'skills'))+ || await fileExists(path.join(targetDir, '.grok', 'skills'))+ || await fileExists(path.join(targetDir, '.claude', 'skills'))+ || await fileExists(path.join(targetDir, '.codex', 'skills'));+ if (skillsVersions.size === 0 && hasSkillsDir) {suggestions.push('No skills found. Run loop-init to scaffold skills.');}// Calculate scorediff --git a/tools/loop-sync/package-lock.json b/tools/loop-sync/package-lock.jsonindex 65657e7..d08609a 100644--- a/tools/loop-sync/package-lock.json+++ b/tools/loop-sync/package-lock.json@@ -12,18 +12,21 @@"loop-sync": "dist/cli.js"},"devDependencies": {- "@types/node": "^26.0.1",+ "@types/node": "^22.0.0","typescript": "^5.9.3"+ },+ "engines": {+ "node": ">=18"}},"node_modules/@types/node": {- "version": "26.0.1",- "resolved": "https://registry.npmjs.org/@types/node/-/node-26.0.1.tgz",- "integrity": "sha512-fc3KiUoBt6kie0N9bIW3E47vZsuaMf0PM2AaUpLCLT0s/LvX1nxAim6Fc049cNxODPpGm6qRAuUOB86SkRuPQw==",+ "version": "22.20.0",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.0.tgz",+ "integrity": "sha512-QWlFW2wf3nTjC13/DqRnBpR4ZO36VJH/JVBkA/vcnmbTBNQIlnObqyqZE1tUR7+Ni23Lda8R1BxMfbXRpCUx5g==","dev": true,"license": "MIT","dependencies": {- "undici-types": "~8.3.0"+ "undici-types": "~6.21.0"}},"node_modules/typescript": {@@ -41,9 +44,9 @@}},"node_modules/undici-types": {- "version": "8.3.0",- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",- "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==",+ "version": "6.21.0",+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==","dev": true,"license": "MIT"}diff --git a/tools/loop-sync/package.json b/tools/loop-sync/package.jsonindex 3e6a74a..8cb4316 100644--- a/tools/loop-sync/package.json+++ b/tools/loop-sync/package.json@@ -14,7 +14,7 @@"scripts": {"build": "tsc","test": "npm run build && node --test test/sync.test.mjs",- "bundle": "node scripts/bundle-assets.mjs"+ "prepublishOnly": "npm test"},"keywords": ["loop-engineering",@@ -33,7 +33,11 @@"bugs": {"url": "https://github.com/cobusgreyling/loop-engineering/issues"},+ "engines": {+ "node": ">=18"+ },"devDependencies": {+ "@types/node": "^22.0.0","typescript": "^5.9.3"}}\ No newline at end of filediff --git a/tools/loop-sync/src/sync.ts b/tools/loop-sync/src/sync.tsindex 427bf2b..a7a722b 100644--- a/tools/loop-sync/src/sync.ts+++ b/tools/loop-sync/src/sync.ts@@ -281,7 +281,7 @@ export async function runSync(options: SyncOptions): Promise<DriftReport> {const hasSkillsDir = await fileExists(path.join(targetDir, 'skills'))|| await fileExists(path.join(targetDir, '.grok', 'skills'))|| await fileExists(path.join(targetDir, '.claude', 'skills'))- || await fileExists(path.join(targetDir, '.codex', 'skills');+ || await fileExists(path.join(targetDir, '.codex', 'skills'));if (skillsVersions.size === 0 && hasSkillsDir) {suggestions.push('No skills found. Run loop-init to scaffold skills.');