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
fix: publish readiness-core to npm
THRISHAL123450792e03b3be9
diff --git a/.github/workflows/release-goal-audit.yml b/.github/workflows/release-goal-audit.ymlindex aa25531..7935474 100644--- a/.github/workflows/release-goal-audit.yml+++ b/.github/workflows/release-goal-audit.yml@@ -28,7 +28,19 @@ jobs:- name: Install, build, testworking-directory: tools/goal-auditrun: |- npm ci+ # Build monorepo sibling first — declared ^range may not be on npm yet+ (cd ../readiness-core && npm ci && npm run build)+ cp package.json package.json.release-bak+ cp package-lock.json package-lock.json.release-bak+ node -e "+ const fs = require('fs');+ const p = JSON.parse(fs.readFileSync('package.json', 'utf8'));+ p.dependencies['@cobusgreyling/readiness-core'] = 'file:../readiness-core';+ fs.writeFileSync('package.json', JSON.stringify(p, null, 2) + '\n');+ "+ npm install+ mv package.json.release-bak package.json+ mv package-lock.json.release-bak package-lock.jsonnpm run buildnpm testdiff --git a/.github/workflows/release-loop-audit.yml b/.github/workflows/release-loop-audit.ymlindex 23ef88f..a6ea923 100644--- a/.github/workflows/release-loop-audit.yml+++ b/.github/workflows/release-loop-audit.yml@@ -38,7 +38,19 @@ jobs:- name: Install, build, testworking-directory: tools/loop-auditrun: |- npm ci+ # Build monorepo sibling first — declared ^range may not be on npm yet+ (cd ../readiness-core && npm ci && npm run build)+ cp package.json package.json.release-bak+ cp package-lock.json package-lock.json.release-bak+ node -e "+ const fs = require('fs');+ const p = JSON.parse(fs.readFileSync('package.json', 'utf8'));+ p.dependencies['@cobusgreyling/readiness-core'] = 'file:../readiness-core';+ fs.writeFileSync('package.json', JSON.stringify(p, null, 2) + '\n');+ "+ npm install+ mv package.json.release-bak package.json+ mv package-lock.json.release-bak package-lock.jsonnpm run buildnpm testdiff --git a/.github/workflows/release-readiness-core.yml b/.github/workflows/release-readiness-core.ymlnew file mode 100644index 0000000..a79fc65--- /dev/null+++ b/.github/workflows/release-readiness-core.yml@@ -0,0 +1,49 @@+name: Release readiness-core++on:+ push:+ tags:+ - 'readiness-core-v*'+ workflow_dispatch:+ inputs:+ tag:+ description: 'Tag to publish (e.g. readiness-core-v1.0.0)'+ required: true+ type: string++permissions:+ contents: read+ id-token: write++jobs:+ test-and-publish:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v7+ with:+ ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', github.event.inputs.tag) || github.ref }}++ - uses: actions/setup-node@v7+ with:+ node-version: '22'+ registry-url: 'https://registry.npmjs.org'+ cache: 'npm'+ cache-dependency-path: tools/readiness-core/package-lock.json++ - name: Ensure npm supports trusted publishing (OIDC)+ run: |+ npm install -g npm@latest+ npm install -g sigstore++ - name: Install, build, test+ working-directory: tools/readiness-core+ run: |+ npm ci+ npm run build+ npm test++ - name: Publish to npm+ working-directory: tools/readiness-core+ run: npm publish --access public --provenance+ env:+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}diff --git a/docs/RELEASE.md b/docs/RELEASE.mdindex 31acca7..14ea3e7 100644--- a/docs/RELEASE.md+++ b/docs/RELEASE.md@@ -1,9 +1,10 @@# Release playbook — npm packages-This repo ships nine public npm packages from `tools/`:+This repo ships ten public npm packages from `tools/`:| Package | Directory | Release tag ||---------|-----------|-------------|+| `@cobusgreyling/readiness-core` | `tools/readiness-core` | `readiness-core-v*` || `@cobusgreyling/loop-audit` | `tools/loop-audit` | `loop-audit-v*` || `@cobusgreyling/loop-init` | `tools/loop-init` | `loop-init-v*` || `@cobusgreyling/loop-cost` | `tools/loop-cost` | `loop-cost-v*` |@@ -20,6 +21,7 @@ Link npm to GitHub, then for **each package** on [npmjs.com](https://www.npmjs.c| Package | Repository | Workflow filename ||---------|--------------|-------------------|+| `@cobusgreyling/readiness-core` | `cobusgreyling/loop-engineering` | `release-readiness-core.yml` || `@cobusgreyling/loop-audit` | `cobusgreyling/loop-engineering` | `release-loop-audit.yml` || `@cobusgreyling/loop-init` | `cobusgreyling/loop-engineering` | `release-loop-init.yml` || `@cobusgreyling/loop-cost` | `cobusgreyling/loop-engineering` | `release-loop-cost.yml` |@@ -47,6 +49,10 @@ Edit `version` in the package `package.json`, update that package's `CHANGELOG.mTag pushes trigger the release workflows:```bash+# readiness-core (MUST be published before loop-audit and goal-audit)+git tag readiness-core-v1.0.0+git push origin readiness-core-v1.0.0+# loop-audit (runs tests before publish)git tag loop-audit-v1.6.0git push origin loop-audit-v1.6.0@@ -84,7 +90,7 @@ git tag goal-audit-v1.0.2git push origin goal-audit-v1.0.2```-Workflows: `.github/workflows/release-loop-audit.yml`, `.github/workflows/release-loop-init.yml`, `.github/workflows/release-loop-cost.yml`, `.github/workflows/release-loop-sync.yml`, `.github/workflows/release-loop-context.yml`, `.github/workflows/release-loop-mcp-server.yml`, `.github/workflows/release-loop-worktree.yml`, `.github/workflows/release-loop-gate.yml`, `.github/workflows/release-goal-audit.yml`.+Workflows: `.github/workflows/release-readiness-core.yml`, `.github/workflows/release-loop-audit.yml`, `.github/workflows/release-loop-init.yml`, `.github/workflows/release-loop-cost.yml`, `.github/workflows/release-loop-sync.yml`, `.github/workflows/release-loop-context.yml`, `.github/workflows/release-loop-mcp-server.yml`, `.github/workflows/release-loop-worktree.yml`, `.github/workflows/release-loop-gate.yml`, `.github/workflows/release-goal-audit.yml`.## Verify after publishdiff --git a/package.json b/package.jsonindex 1adab32..43f2356 100644--- a/package.json+++ b/package.json@@ -15,8 +15,9 @@"test:loop-worktree": "cd tools/loop-worktree && npm test","test:goal-init": "cd tools/goal-init && npm test","test:readiness-core": "cd tools/readiness-core && npm test",- "test:tools": "npm run test:readiness-core && npm run test:loop-audit && npm run test:loop-init && npm run test:loop-cost && npm run test:loop-sync && npm run test:loop-context && npm run test:loop-gate && npm run test:mcp-server && npm run test:loop-worktree && npm run test:goal-init",- "build:tools": "cd tools/readiness-core && npm run build && cd ../loop-audit && npm run build && cd ../loop-init && npm run build && cd ../loop-cost && npm run build && cd ../loop-sync && npm run build && cd ../loop-context && npm run build && cd ../loop-gate && npm run build && cd ../mcp-server && npm run build && cd ../loop-worktree && npm run build && cd ../goal-init && npm run build",+ "test:goal-audit": "cd tools/goal-audit && npm test",+ "test:tools": "npm run test:readiness-core && npm run test:loop-audit && npm run test:loop-init && npm run test:loop-cost && npm run test:loop-sync && npm run test:loop-context && npm run test:loop-gate && npm run test:mcp-server && npm run test:loop-worktree && npm run test:goal-audit && npm run test:goal-init",+ "build:tools": "cd tools/readiness-core && npm run build && cd ../loop-audit && npm run build && cd ../loop-init && npm run build && cd ../loop-cost && npm run build && cd ../loop-sync && npm run build && cd ../loop-context && npm run build && cd ../loop-gate && npm run build && cd ../mcp-server && npm run build && cd ../loop-worktree && npm run build && cd ../goal-audit && npm run build && cd ../goal-init && npm run build","contributors:generate": "node scripts/generate-contributors.mjs","contributors:check": "node scripts/generate-contributors.mjs --check"},diff --git a/scripts/ci-audit-gates.sh b/scripts/ci-audit-gates.shindex 0b770fd..f0a30e2 100755--- a/scripts/ci-audit-gates.sh+++ b/scripts/ci-audit-gates.sh@@ -12,7 +12,17 @@ echo "Building readiness-core…")cd "$REPO_ROOT/tools/loop-audit"-npm ci+cp package.json package.json.ci-bak+cp package-lock.json package-lock.json.ci-bak+node -e "+ const fs = require('fs');+ const p = JSON.parse(fs.readFileSync('package.json', 'utf8'));+ p.dependencies['@cobusgreyling/readiness-core'] = 'file:../readiness-core';+ fs.writeFileSync('package.json', JSON.stringify(p, null, 2) + '\n');+"+npm install+mv package.json.ci-bak package.json+mv package-lock.json.ci-bak package-lock.jsonnpm testecho "=== Audit of repo root ==="node dist/cli.js "$REPO_ROOT" --json > /tmp/root-audit.jsondiff --git a/scripts/ci-validate-gates.sh b/scripts/ci-validate-gates.shindex b1b843f..5a21799 100755--- a/scripts/ci-validate-gates.sh+++ b/scripts/ci-validate-gates.sh@@ -34,20 +34,40 @@ echo "Building and testing readiness-core…"(cd tools/readiness-corenpm ci- npm run build+ npm test)echo "Building and testing loop-audit…"(cd tools/loop-audit- npm ci+ cp package.json package.json.ci-bak+ cp package-lock.json package-lock.json.ci-bak+ node -e "+ const fs = require('fs');+ const p = JSON.parse(fs.readFileSync('package.json', 'utf8'));+ p.dependencies['@cobusgreyling/readiness-core'] = 'file:../readiness-core';+ fs.writeFileSync('package.json', JSON.stringify(p, null, 2) + '\n');+ "+ npm install+ mv package.json.ci-bak package.json+ mv package-lock.json.ci-bak package-lock.jsonnpm test)echo "Building and testing goal-audit…"(cd tools/goal-audit- npm ci+ cp package.json package.json.ci-bak+ cp package-lock.json package-lock.json.ci-bak+ node -e "+ const fs = require('fs');+ const p = JSON.parse(fs.readFileSync('package.json', 'utf8'));+ p.dependencies['@cobusgreyling/readiness-core'] = 'file:../readiness-core';+ fs.writeFileSync('package.json', JSON.stringify(p, null, 2) + '\n');+ "+ npm install+ mv package.json.ci-bak package.json+ mv package-lock.json.ci-bak package-lock.jsonnpm test)diff --git a/tools/goal-audit/package.json b/tools/goal-audit/package.jsonindex 72d0a66..ef19ac8 100644--- a/tools/goal-audit/package.json+++ b/tools/goal-audit/package.json@@ -47,6 +47,6 @@"typescript": "^5.0.0"},"dependencies": {- "@cobusgreyling/readiness-core": "file:../readiness-core"+ "@cobusgreyling/readiness-core": "^1.0.0"}}diff --git a/tools/loop-audit/package.json b/tools/loop-audit/package.jsonindex df389a6..e8bf724 100644--- a/tools/loop-audit/package.json+++ b/tools/loop-audit/package.json@@ -52,6 +52,6 @@"typescript": "^7.0.2"},"dependencies": {- "@cobusgreyling/readiness-core": "file:../readiness-core"+ "@cobusgreyling/readiness-core": "^1.0.0"}}diff --git a/tools/readiness-core/README.md b/tools/readiness-core/README.mdnew file mode 100644index 0000000..dcc918c--- /dev/null+++ b/tools/readiness-core/README.md@@ -0,0 +1,7 @@+# @cobusgreyling/readiness-core++Core types and utilities for `loop-audit` and `goal-audit`.++## Usage++This package is intended for internal use within the `loop-engineering` monorepo. It exports shared types like `BaseAuditResult`, `Finding`, and core heuristics for auditing file existence and skill directories.diff --git a/tools/readiness-core/package.json b/tools/readiness-core/package.jsonindex 2d5740f..95c9eb3 100644--- a/tools/readiness-core/package.json+++ b/tools/readiness-core/package.json@@ -1,13 +1,13 @@{"name": "@cobusgreyling/readiness-core","version": "1.0.0",- "description": "Shared readiness types and utilities for loop audits.",- "private": true,+ "description": "Core types and utilities for loop and goal audits.","type": "module","main": "dist/index.js","types": "dist/index.d.ts","files": [- "dist"+ "dist",+ "README.md"],"scripts": {"build": "tsc",@@ -23,6 +23,13 @@"url": "git+https://github.com/cobusgreyling/loop-engineering.git","directory": "tools/readiness-core"},+ "homepage": "https://cobusgreyling.github.io/loop-engineering/",+ "bugs": {+ "url": "https://github.com/cobusgreyling/loop-engineering/issues"+ },+ "publishConfig": {+ "access": "public"+ },"devDependencies": {"@types/node": "^22.0.0","typescript": "^5.0.0"diff --git a/tools/readiness-core/test/index.test.mjs b/tools/readiness-core/test/index.test.mjsindex 3a446fb..812e3d7 100644--- a/tools/readiness-core/test/index.test.mjs+++ b/tools/readiness-core/test/index.test.mjs@@ -17,6 +17,20 @@ test('fileExists returns false for missing file', async () => {test('scanSkillDirectories finds skills in target directory', async () => {// We can test this by running it on a known directory or setting up a mock// For simplicity, let's scan the current directory and ensure it handles empty or missing gracefully.- const skills = await scanSkillDirectories(path.join(process.cwd(), 'test-data-missing'));- assert.deepStrictEqual(skills, []);+ const missingSkills = await scanSkillDirectories(path.join(process.cwd(), 'test-data-missing'));+ assert.deepStrictEqual(missingSkills, []);++ // Setup a mock fixture+ const fixtureDir = path.join(process.cwd(), '.test-fixture');+ await fs.rm(fixtureDir, { recursive: true, force: true });+ await fs.mkdir(path.join(fixtureDir, '.grok', 'skills', 'foo'), { recursive: true });+ await fs.mkdir(path.join(fixtureDir, 'skills', 'bar'), { recursive: true });+ await fs.writeFile(path.join(fixtureDir, 'skills', 'SKILL.md'), '# root-skill\n');++ const skills = await scanSkillDirectories(fixtureDir);+ assert.ok(skills.includes('foo'), 'Should detect tool-specific skill foo');+ assert.ok(skills.includes('bar'), 'Should detect generic skill bar');+ assert.ok(skills.includes('root-skill'), 'Should detect root SKILL.md');++ await fs.rm(fixtureDir, { recursive: true, force: true });});