diff --git a/.github/workflows/daily-triage.yml b/.github/workflows/daily-triage.yml index 6b96c7e..f03a847 100644 --- a/.github/workflows/daily-triage.yml +++ b/.github/workflows/daily-triage.yml @@ -65,7 +65,7 @@ jobs: ## High Priority (loop is acting or waiting on human) - Maintain loop readiness score ≥ 58 (current: **${SCORE}**, level **${LEVEL}**). - - Publish \`@cobusgreyling/loop-audit\` and \`@cobusgreyling/loop-init\` to npm when \`NPM_TOKEN\` is configured (see docs/RELEASE.md). + - Keep npm packages current after tool changes (tag \`loop-audit-v*\`, \`loop-init-v*\`, \`loop-cost-v*\` — see docs/RELEASE.md). $([ "$FAILING" -gt 0 ] && echo "- **${FAILING}** dogfood workflow(s) failing — investigate CI.") ## Watch List diff --git a/.github/workflows/release-loop-cost.yml b/.github/workflows/release-loop-cost.yml new file mode 100644 index 0000000..5e5c66d --- /dev/null +++ b/.github/workflows/release-loop-cost.yml @@ -0,0 +1,39 @@ +name: Release loop-cost + +on: + push: + tags: + - 'loop-cost-v*' + +permissions: + contents: read + id-token: write + +jobs: + test-and-publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-node@v6 + with: + node-version: '22' + registry-url: 'https://registry.npmjs.org' + cache: 'npm' + cache-dependency-path: tools/loop-cost/package-lock.json + + - name: Ensure npm supports trusted publishing (OIDC) + run: npm install -g npm@latest + + - name: Install, build, test + working-directory: tools/loop-cost + run: | + npm ci + npm run build + npm test + + - name: Publish to npm + working-directory: tools/loop-cost + run: npm publish --access public --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ba4e8ab..b5d1199 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,8 +52,9 @@ Also add an entry to `patterns/registry.yaml`. ## Community -- **Questions**: open an issue with label `question` or `pattern-request` -- **Discussions**: enable GitHub Discussions on the repo for pattern Q&A (recommended for maintainers) +- **Questions**: [GitHub Discussions](https://github.com/cobusgreyling/loop-engineering/discussions) (preferred) or issue with label `question` +- **Show your loop**: post in Discussions or add a row to [docs/adopters.md](./docs/adopters.md) +- **Good first issues**: look for label [`good first issue`](https://github.com/cobusgreyling/loop-engineering/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) - **Security**: see [SECURITY.md](./SECURITY.md) — do not file public issues for exploitable vulnerabilities Thank you for helping make this the go-to reference for loop engineering. \ No newline at end of file diff --git a/README.md b/README.md index 3cd47dc..db4ab1d 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,11 @@
@@ -42,10 +44,10 @@ A loop is a recursive goal: you define a purpose and the AI iterates (often with | [Pattern Picker](docs/pattern-picker.md) | Which loop to run first — **start here if unsure** | | [Primitives Matrix](docs/primitives-matrix.md) | Grok vs Claude Code vs Codex — bookmark this | | [Loop Design Checklist](docs/loop-design-checklist.md) | Ship readiness rubric | -| [Patterns](patterns/README.md) | 6 production patterns including the new low-risk Changelog Drafter | +| [Patterns](patterns/README.md) | 7 production patterns + [interactive picker](https://cobusgreyling.github.io/loop-engineering/#interactive) | | [Starters](starters/) | Clone-and-run kits (Grok, Claude Code, Codex) | -| [loop-audit](tools/loop-audit/) | Loop Readiness Score CLI — `npx @cobusgreyling/loop-audit` | -| [loop-init](tools/loop-init/) | Scaffold starters + budget/run-log — `npx @cobusgreyling/loop-init` | +| [loop-audit](tools/loop-audit/) | Loop Readiness Score CLI (v1.4 + activity detection) — `npx @cobusgreyling/loop-audit . --suggest` | +| [loop-init](tools/loop-init/) | Scaffold starters + budget/run-log (v1.2) — `npx @cobusgreyling/loop-init . --pattern daily-triage --tool grok` | | [loop-cost](tools/loop-cost/) | Token spend estimator — `npx @cobusgreyling/loop-cost` | | [Stories](stories/) | Real wins and honest failures | @@ -107,10 +109,11 @@ flowchart LR | [Dependency Sweeper](patterns/dependency-sweeper.md) | 6h–1d | [dependency-sweeper](starters/dependency-sweeper/) | L2 patch-only | Medium | | [Changelog Drafter](patterns/changelog-drafter.md) | 1d or tag | [changelog-drafter](starters/changelog-drafter/) | **L1** draft | Low | | [Post-Merge Cleanup](patterns/post-merge-cleanup.md) | 1d–6h | [post-merge-cleanup](starters/post-merge-cleanup/) | **L1** off-peak | Low | +| [Issue Triage](patterns/issue-triage.md) | 2h–1d | [minimal-loop](starters/minimal-loop/) | **L1** propose-only | Low | -Not sure which to pick? See [pattern-picker](docs/pattern-picker.md). +Not sure which to pick? Try the [interactive picker](https://cobusgreyling.github.io/loop-engineering/#interactive) or [pattern-picker](docs/pattern-picker.md). -Machine-readable index: [patterns/registry.yaml](patterns/registry.yaml) (now 6 patterns) +Machine-readable index: [patterns/registry.yaml](patterns/registry.yaml) (7 patterns) ## Getting Started (5 minutes) @@ -131,7 +134,9 @@ bash scripts/before-after-demo.sh /loop 1d Run loop-triage. Update STATE.md. No auto-fix in week one. ``` -Packages publish from tagged releases — see [docs/RELEASE.md](docs/RELEASE.md). Until npm is live, run from this repo: +All three CLIs publish to npm from tagged releases — see [docs/RELEASE.md](docs/RELEASE.md). No clone required. + +**Develop from source** (monorepo contributors): ```bash cd tools/loop-init && npm ci && npm test && node dist/cli.js /path/to/project --pattern daily-triage --tool grok @@ -173,7 +178,7 @@ Addy Osmani: ## Contributing -Share production patterns, tool mappings, and failure stories. See [CONTRIBUTING.md](CONTRIBUTING.md) and [GitHub Discussions](https://github.com/cobusgreyling/loop-engineering/discussions). +Share production patterns, tool mappings, and failure stories. See [CONTRIBUTING.md](CONTRIBUTING.md), [adopters](docs/adopters.md), and [GitHub Discussions](https://github.com/cobusgreyling/loop-engineering/discussions). ## Sources diff --git a/docs/RELEASE.md b/docs/RELEASE.md index 3641ac0..ed0a23a 100644 --- a/docs/RELEASE.md +++ b/docs/RELEASE.md @@ -6,7 +6,7 @@ This repo ships two public npm packages from `tools/`: |---------|-----------|-------------| | `@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*` (add workflow when publishing) | +| `@cobusgreyling/loop-cost` | `tools/loop-cost` | `loop-cost-v*` | ## One-time setup (trusted publishing — recommended) @@ -16,6 +16,7 @@ Link npm to GitHub, then for **each package** on [npmjs.com](https://www.npmjs.c |---------|--------------|-------------------| | `@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` | Names must match **exactly** (case-sensitive). No `NPM_TOKEN` secret is required when trusted publishing is configured. @@ -35,17 +36,22 @@ git tag loop-audit-v1.3.0 git push origin loop-audit-v1.3.0 # loop-init (bundles starters/templates, runs smoke tests) -git tag loop-init-v1.1.0 -git push origin loop-init-v1.1.0 +git tag loop-init-v1.2.0 +git push origin loop-init-v1.2.0 + +# loop-cost (bundles patterns/registry.yaml) +git tag loop-cost-v1.0.0 +git push origin loop-cost-v1.0.0 ``` -Workflows: `.github/workflows/release-loop-audit.yml`, `.github/workflows/release-loop-init.yml`. +Workflows: `.github/workflows/release-loop-audit.yml`, `.github/workflows/release-loop-init.yml`, `.github/workflows/release-loop-cost.yml`. ## Verify after publish ```bash npx @cobusgreyling/loop-audit --help npx @cobusgreyling/loop-init --help +npx @cobusgreyling/loop-cost --help mkdir /tmp/loop-init-test && cd /tmp/loop-init-test npx @cobusgreyling/loop-init . --pattern daily-triage --tool grok --dry-run diff --git a/docs/adopters.md b/docs/adopters.md new file mode 100644 index 0000000..d37947f --- /dev/null +++ b/docs/adopters.md @@ -0,0 +1,33 @@ +# Adopters & community setups + +Forks and stars mean people are trying this in their own stacks. If you run a loop from this repo (or adapted from it), add yourself here via PR. + +## How to list your project + +Open a PR that adds a row to the table below: + +| Field | What to include | +|-------|-----------------| +| **Project** | Repo link or product name | +| **Pattern(s)** | e.g. Daily Triage + Issue Triage | +| **Tool** | Grok, Claude Code, Codex, GitHub Actions, mixed | +| **Level** | L1 / L2 / L3 (honest) | +| **Notes** | One line — what worked or what broke | + +## Adopters + +| Project | Pattern(s) | Tool | Level | Notes | +|---------|------------|------|-------|-------| +| [loop-engineering](https://github.com/cobusgreyling/loop-engineering) (this repo) | Daily Triage, Changelog Drafter, audit dogfood | GitHub Actions + Grok | L3 | Reference implementation — dogfoods `loop-audit` on every PR | + +*Your project here — see [CONTRIBUTING.md](../CONTRIBUTING.md).* + +## Show & tell + +Prefer chat over a PR? Post in [GitHub Discussions → Show your loop](https://github.com/cobusgreyling/loop-engineering/discussions/categories/show-your-loop) with: + +1. Which pattern you picked and why +2. Your first `/loop` or scheduler command +3. One surprise (good or bad) + +Failure reports are first-class — see [stories/](../stories/). \ No newline at end of file diff --git a/docs/assets/css/showcase.css b/docs/assets/css/showcase.css index baf7adf..2bb301f 100644 --- a/docs/assets/css/showcase.css +++ b/docs/assets/css/showcase.css @@ -506,4 +506,106 @@ section { .nav-links { display: none; } .hero { padding: 48px 0 40px; } .flow-arrow { display: none; } -} \ No newline at end of file +} + +/* === Interactive widgets (v1.4 site upgrade) === */ +.interactive { + background: var(--bg-elevated); + border: 1px solid var(--border); + border-radius: var(--radius); + padding: 28px; + margin: 24px 0; +} + +.symptom-pills { + display: flex; + flex-wrap: wrap; + gap: 8px; + margin: 16px 0; +} + +.symptom-pill { + padding: 8px 14px; + background: var(--bg-card); + border: 1px solid var(--border); + border-radius: 999px; + font-size: 0.82rem; + color: var(--text-muted); + cursor: pointer; + user-select: none; + transition: all 0.15s; +} + +.symptom-pill:hover { border-color: var(--accent); color: var(--text); } +.symptom-pill.active { + background: rgba(62, 232, 197, 0.15); + border-color: var(--accent); + color: var(--accent); + font-weight: 600; +} + +.reco-card { + margin-top: 16px; + padding: 16px 18px; + background: #050810; + border: 1px solid var(--accent); + border-radius: 10px; + font-size: 0.9rem; +} + +.reco-card .cmd { + font-family: var(--font-mono); + background: rgba(255,255,255,0.04); + padding: 2px 6px; + border-radius: 4px; +} + +.check-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); + gap: 8px 16px; + margin: 16px 0; +} + +.check-item { + display: flex; + align-items: center; + gap: 8px; + font-size: 0.85rem; + color: var(--text-muted); + cursor: pointer; +} + +.check-item input { accent-color: var(--accent); } + +.live-score { + display: flex; + align-items: center; + gap: 16px; + margin: 12px 0; + padding: 12px 16px; + background: var(--bg-card); + border-radius: 10px; +} + +.live-score .big { + font-size: 2.1rem; + font-weight: 800; + color: var(--accent); + line-height: 1; +} + +.live-score .meta { font-size: 0.85rem; } + +.copy-btn { + font-size: 0.7rem; + padding: 2px 8px; + border-radius: 4px; + background: rgba(62,232,197,0.1); + color: var(--accent); + border: 1px solid rgba(62,232,197,0.3); + cursor: pointer; + margin-left: 8px; +} + +.copy-btn:hover { background: rgba(62,232,197,0.2); } \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 03670d2..2f9cf00 100644 --- a/docs/index.html +++ b/docs/index.html @@ -32,7 +32,7 @@Loop engineering moves you from "I prompt → agent responds → I prompt again" @@ -43,6 +43,12 @@
+ Or try instantly: npx @cobusgreyling/loop-init . --pattern daily-triage --tool grok
+
+ npx @cobusgreyling/loop-audit . --suggest
+
+
Get started
+
+Play with it
+Pick your pain. See the exact loop + commands. Simulate your score live.
+ +Check the boxes you already have (or plan to add). Score updates live.
+ +loop-audit v1.4 scoring. L3 requires verifier + state + cost observability + proven activity.
+ Deep dives