agentloopkit 0.1.1 → 0.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A drop-in engineering loop for coding agents.
4
4
 
5
- Your coding agent can already write code. AgentLoopKit helps it work like a disciplined engineer: scoped task contracts, explicit safety rules, verification evidence, review summaries, and clean handoffs.
5
+ Your coding agent can write code. AgentLoopKit gives it the repo habits reviewers need: scoped task contracts, safety rules, verification evidence, review summaries, and clean handoffs.
6
6
 
7
7
  Vibe coding produces code. Agentic engineering produces auditable work.
8
8
 
@@ -10,6 +10,8 @@ Vibe coding produces code. Agentic engineering produces auditable work.
10
10
  <img src="https://raw.githubusercontent.com/abhiyoheswaran1/AgentLoopKit/main/docs/assets/readme/agentloopkit-showcase.png" alt="AgentLoopKit workflow showing task contracts, verification reports, and handoff artifacts" width="100%">
11
11
  </p>
12
12
 
13
+ The screenshots and terminal demo in this README are generated from committed sources in `docs/assets/readme/` with Playwright and VHS.
14
+
13
15
  ## What It Is
14
16
 
15
17
  AgentLoopKit is a repo-level toolkit for developers using Codex, Claude Code, Cursor, OpenCode, Gemini CLI, GitHub Copilot CLI, and other coding agents.
@@ -44,21 +46,49 @@ npx agentloopkit init
44
46
  npx agentloopkit init --dry-run
45
47
  ```
46
48
 
49
+ Pin the current version when you need repeatable CI or team setup:
50
+
51
+ ```bash
52
+ npx --yes agentloopkit@0.24.1 version
53
+ npx --yes agentloopkit@0.24.1 init
54
+ ```
55
+
47
56
  Run the CLI after install:
48
57
 
49
58
  ```bash
50
59
  npx agentloopkit doctor
51
60
  npx agentloopkit create-task --title "Add settings page" --type feature
61
+ npx agentloopkit task list
62
+ npx agentloopkit task show .agentloop/tasks/2026-06-09-add-settings-page.md
63
+ npx agentloopkit task set .agentloop/tasks/2026-06-09-add-settings-page.md
64
+ npx agentloopkit task status .agentloop/tasks/2026-06-09-add-settings-page.md in-progress
65
+ npx agentloopkit status
66
+ npx agentloopkit next
52
67
  npx agentloopkit verify
53
- npx agentloopkit summarize --write
68
+ npx agentloopkit handoff
69
+ npx agentloopkit check-gates
70
+ npx agentloopkit check-gates --strict
71
+ npx agentloopkit report
72
+ npx agentloopkit badge
73
+ npx agentloopkit ci-summary
74
+ npx agentloopkit release-notes
75
+ npx agentloopkit npm-status
76
+ npx agentloopkit policy list
77
+ npx agentloopkit policy show security
78
+ npx agentloopkit policy status
79
+ npx agentloopkit task archive .agentloop/tasks/2026-06-09-add-settings-page.md
54
80
  npx agentloopkit install-agent codex
55
81
  npx agentloopkit install-agent all
82
+ npx agentloopkit completion zsh
83
+ npx agentloopkit completion powershell
56
84
  ```
57
85
 
58
86
  <p align="center">
59
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/AgentLoopKit/main/docs/assets/readme/agentloopkit-cli.gif" alt="Terminal demo running AgentLoopKit init, doctor, create-task, and summarize" width="100%">
87
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/AgentLoopKit/main/docs/assets/readme/agentloopkit-cli.gif" alt="Terminal demo running AgentLoopKit init, task contracts, active task status, task-linked verify, handoff, reports, badges, release notes, gates, and task archive commands" width="100%">
60
88
  </p>
61
89
 
90
+ The VHS demo is generated from committed sources in this repository.
91
+
62
92
  Pinned team usage:
63
93
 
64
94
  ```bash
@@ -78,18 +108,39 @@ pnpm build
78
108
 
79
109
  ## CLI Commands
80
110
 
81
- | Command | Purpose |
82
- | ------------------------------- | ------------------------------------------------------- |
83
- | `agentloop init` | Generate the repo harness and config |
84
- | `agentloop init --dry-run` | Preview generated files without writing them |
85
- | `agentloop doctor` | Check setup health, commands, git state, and risk files |
86
- | `agentloop create-task` | Create a task contract in `.agentloop/tasks/` |
87
- | `agentloop verify` | Run configured checks and write a verification report |
88
- | `agentloop summarize` | Generate a deterministic PR or reviewer summary |
89
- | `agentloop install-agent codex` | Add agent-specific instructions |
90
- | `agentloop install-agent all` | Add all bundled agent instruction files |
91
- | `agentloop list-templates` | List bundled templates |
92
- | `agentloop version` | Print the CLI version |
111
+ | Command | Purpose |
112
+ | --------------------------------------- | ------------------------------------------------------------------------------ |
113
+ | `agentloop init` | Generate the repo harness and config |
114
+ | `agentloop init --dry-run` | Preview generated files without writing them |
115
+ | `agentloop doctor` | Check setup health, template version, commands, git state, and risk categories |
116
+ | `agentloop create-task` | Create a task contract in `.agentloop/tasks/` |
117
+ | `agentloop task list` | List task contracts and show the pinned active task |
118
+ | `agentloop task show <path>` | Print a task contract without changing active state |
119
+ | `agentloop task set <path>` | Pin the active task for status and handoffs |
120
+ | `agentloop task status <path> <status>` | Update a task contract status line |
121
+ | `agentloop task archive <path>` | Move a task contract into `.agentloop/tasks/archive/` |
122
+ | `agentloop task current` | Print the pinned active task |
123
+ | `agentloop task clear` | Clear the active task pointer |
124
+ | `agentloop status` | Show active task, latest report, dirty files, next step |
125
+ | `agentloop next` | Print only the next recommended loop action |
126
+ | `agentloop check-gates` | Check task, verification, handoff, harness, policy, and git evidence |
127
+ | `agentloop check-gates --strict` | Treat warning gates as failures for CI |
128
+ | `agentloop verify` | Run configured checks and write a verification report |
129
+ | `agentloop summarize` | Generate a deterministic PR or reviewer summary |
130
+ | `agentloop handoff` | Write a reviewer handoff summary |
131
+ | `agentloop report` | Write a local static HTML evidence report |
132
+ | `agentloop badge` | Write a local SVG evidence badge |
133
+ | `agentloop ci-summary` | Summarize CI context and local AgentLoop evidence |
134
+ | `agentloop release-notes` | Draft local release notes from changelog, git, task, and verification evidence |
135
+ | `agentloop npm-status` | Check npm registry status without publishing |
136
+ | `agentloop policy list` | List local safety policy files |
137
+ | `agentloop policy show <policy>` | Print a local safety policy without mutating files |
138
+ | `agentloop policy status` | Compare local policy files with bundled templates |
139
+ | `agentloop install-agent codex` | Add agent-specific instructions |
140
+ | `agentloop install-agent all` | Add all bundled agent instruction files |
141
+ | `agentloop list-templates` | List bundled templates |
142
+ | `agentloop completion <shell>` | Print bash, zsh, fish, or PowerShell completion scripts |
143
+ | `agentloop version` | Print the CLI version |
93
144
 
94
145
  The package exposes two binaries:
95
146
 
@@ -98,10 +149,32 @@ agentloop init
98
149
  agentloopkit init
99
150
  ```
100
151
 
152
+ ## Shell Completions
153
+
154
+ AgentLoopKit prints completion scripts to stdout. It does not edit `.zshrc`, `.bashrc`, fish config, PowerShell startup files, or other shell profile files.
155
+
156
+ Inspect a script before installing it:
157
+
158
+ ```bash
159
+ agentloop completion zsh
160
+ agentloop completion bash
161
+ agentloop completion fish
162
+ agentloop completion powershell
163
+ agentloop completion pwsh
164
+ ```
165
+
166
+ Example zsh setup:
167
+
168
+ ```bash
169
+ mkdir -p ~/.zsh/completions
170
+ agentloop completion zsh > ~/.zsh/completions/_agentloop
171
+ ```
172
+
101
173
  ## Generated Files
102
174
 
103
175
  ```text
104
176
  .agentloop/
177
+ manifest.json
105
178
  loops/
106
179
  gates/
107
180
  handoffs/
@@ -117,10 +190,12 @@ agentloop.config.json
117
190
 
118
191
  `init` appends to an existing `AGENTS.md` instead of overwriting it.
119
192
 
120
- The package ships `schema/agentloop.config.schema.json` for editors and config validation.
193
+ The package ships `schema/agentloop.config.schema.json` for editors and config validation. Generated configs use the GitHub raw schema URL for editor support; the CLI validates config locally and does not fetch that URL at runtime.
121
194
 
122
195
  See `docs/configuration.md` for config fields and schema notes.
123
196
 
197
+ Fresh `init` also writes `.agentloop/manifest.json` so `doctor` can report which template generation created the local harness. See `docs/template-migrations.md` for manual upgrade guidance.
198
+
124
199
  ## Agent Usage
125
200
 
126
201
  Install instructions for the agent you use:
@@ -141,9 +216,34 @@ AgentLoopKit only writes safe repo-local Markdown instructions when exact third-
141
216
  Create a contract before a coding session:
142
217
 
143
218
  ```bash
144
- agentloop create-task --type feature --title "Add settings page"
219
+ agentloop create-task --type feature --title "Add settings page" \
220
+ --problem-statement "Users cannot manage account preferences" \
221
+ --desired-outcome "Users can update settings from the app" \
222
+ --likely-file src/settings \
223
+ --forbidden-file migrations/ \
224
+ --acceptance "Settings can be saved" \
225
+ --verification "pnpm test" \
226
+ --rollback "Remove the settings route"
227
+ ```
228
+
229
+ Pin the contract when more than one task exists:
230
+
231
+ ```bash
232
+ agentloop task list
233
+ agentloop task show .agentloop/tasks/2026-06-09-add-settings-page.md
234
+ agentloop task set .agentloop/tasks/2026-06-09-add-settings-page.md
235
+ agentloop task status .agentloop/tasks/2026-06-09-add-settings-page.md in-progress
236
+ agentloop task archive .agentloop/tasks/2026-06-09-add-settings-page.md
237
+ agentloop task current
238
+ agentloop task clear
145
239
  ```
146
240
 
241
+ `task list --json` gives agents a deterministic list with `path`, `title`, `status`, `active`, and `modifiedAt`. Listing tasks does not create or update `.agentloop/state.json`.
242
+ `create-task --json` returns the created task path and Markdown content so agents do not need to parse the human success line.
243
+ `task show --json` returns the selected task metadata and Markdown content without changing active state.
244
+ `task status --json` updates only the `- Status:` line. Supported values are `proposed`, `in-progress`, `blocked`, `review`, and `done`. Status is not verification evidence; run `agentloop verify` before claiming completion.
245
+ `task archive --json` moves one named Markdown contract into `.agentloop/tasks/archive/`, refuses to overwrite an existing archive file, and clears the active task pointer when it archives the active task. Archive after verification and handoff, not as a substitute for either.
246
+
147
247
  Each contract records:
148
248
 
149
249
  - problem statement
@@ -165,24 +265,205 @@ Each contract records:
165
265
  .agentloop/reports/YYYY-MM-DD-HH-mm-verification-report.md
166
266
  ```
167
267
 
168
- It does not hide failures. If no commands are configured, it writes a report saying nothing was verified.
268
+ Pass `--task .agentloop/tasks/file.md` to include task title, type, status, and path in the report. AgentLoopKit reads Markdown task contracts for this flag. It reports `.env`-style paths as unavailable instead of reading them.
269
+
270
+ It does not hide failures. Failed reports include a short failure summary with each failed command, exit code, and final useful output lines before the full command output. If long logs are truncated, the report keeps the first and last output so the final error stays visible. If no commands are configured, it writes a report saying nothing was verified.
271
+
272
+ When `agentloop verify` runs in GitHub Actions, the report records the workflow, event, ref, commit, run URL, and run attempt. Local reports stay quiet. AgentLoopKit does not read `.env` files or print arbitrary environment variables.
273
+
274
+ In monorepos, `doctor` warns on common workspace markers and suggests package-specific verification commands. Add package checks to the task contract when root commands do not cover the touched package, for example `pnpm --filter web test` or `npm --workspace api test`. AgentLoopKit records and runs configured commands; it does not infer package graphs or run workspace commands automatically.
275
+
276
+ `doctor` also reports potential risk files by category, such as migrations, auth, deployment, lockfiles, and env files. It lists path examples only. It does not read `.env` contents or claim to scan secrets.
277
+ See `docs/doctor-risk-files.md` for category examples, limits, and reviewer actions.
278
+
279
+ ## Status
280
+
281
+ `agentloop status` gives agents and humans a quick local readout:
282
+
283
+ - active task contract, using `agentloop task set` when present
284
+ - newest task contract when no active task is pinned
285
+ - latest verification report
286
+ - working tree state
287
+ - configured and missing commands
288
+ - next suggested command
289
+
290
+ Use JSON output in scripts:
291
+
292
+ ```bash
293
+ agentloop status --json
294
+ ```
295
+
296
+ Use `agentloop next` when an agent or script only needs the next local command:
297
+
298
+ ```bash
299
+ agentloop next
300
+ agentloop next --json
301
+ ```
302
+
303
+ `next` uses the same decision rules as `status`. It does not run verification commands, create task state, call an LLM, make network requests, or read `.env` contents.
304
+ When an active in-progress task exists, an older verification report does not count as current evidence for that task.
305
+
306
+ See `docs/status.md` for output fields and next-action rules.
307
+
308
+ ## Gate Checks
309
+
310
+ `agentloop check-gates` checks review evidence without running tests or calling an LLM. It looks for:
311
+
312
+ - a task contract
313
+ - a generated verification report
314
+ - a generated handoff summary
315
+ - repo harness files
316
+ - core safety policies
317
+ - git working tree context
318
+
319
+ Use JSON output in scripts:
320
+
321
+ ```bash
322
+ agentloop check-gates --json
323
+ agentloop check-gates --strict
324
+ ```
325
+
326
+ Warnings keep exit code `0` by default. Use `--strict` in CI when warning gates should fail the command.
327
+
328
+ `doctor` checks setup health. `check-gates` checks whether the current work session has the evidence reviewers expect.
329
+
330
+ See `docs/check-gates.md` for gate statuses and exit-code behavior.
331
+
332
+ ## HTML Reports
333
+
334
+ `agentloop report` writes a local static HTML page from the current task contract, latest verification report, latest handoff, git status, diff stats, and deterministic review summary:
335
+
336
+ ```bash
337
+ agentloop report
338
+ agentloop report --json
339
+ agentloop report --out .agentloop/reports/review.html
340
+ ```
341
+
342
+ The command does not run tests, call an LLM, fetch assets, read `.env` contents, or send data anywhere. It writes one local file under `.agentloop/reports/` by default. Use it after `verify` and `handoff` when you want a browser-readable artifact for a PR or CI upload.
343
+
344
+ See `docs/html-reports.md` for inputs, output paths, and safety behavior.
345
+
346
+ ## Evidence Badges
347
+
348
+ `agentloop badge` writes a local SVG badge from existing evidence:
349
+
350
+ ```bash
351
+ agentloop badge
352
+ agentloop badge --source gates
353
+ agentloop badge --json
354
+ ```
355
+
356
+ The default badge reads the latest verification report and writes `.agentloop/reports/agentloop-verification.svg`. Gate badges read local gate status and write `.agentloop/reports/agentloop-gates.svg`. The command does not run tests, call a badge service, read `.env`, or upload anything.
357
+
358
+ See `docs/badges.md` for badge sources and CI usage.
359
+
360
+ ## CI Summaries
361
+
362
+ `agentloop ci-summary` reads allowlisted CI provenance fields and existing AgentLoop artifacts:
363
+
364
+ ```bash
365
+ agentloop ci-summary
366
+ agentloop ci-summary --json
367
+ agentloop ci-summary --write
368
+ ```
369
+
370
+ In GitHub Actions, GitLab CI, and Buildkite it reports provider, workflow or pipeline, event, ref, commit, and run URL when those allowlisted fields are present. Unsupported CI providers report generic CI when `CI=true` is present. The command does not call provider APIs, read secrets, upload files, run tests, or dump arbitrary environment variables.
371
+
372
+ Use `--write` when CI should upload a small Markdown summary alongside verification reports, HTML reports, badges, and handoffs. Verification consumers still read `*-verification-report.md`; CI summary artifacts do not replace verification evidence.
373
+
374
+ See `docs/ci-summary.md`.
375
+
376
+ ## Release Notes
377
+
378
+ `agentloop release-notes` drafts local release notes from the repository state:
379
+
380
+ ```bash
381
+ agentloop release-notes
382
+ agentloop release-notes --from v0.19.0 --to HEAD
383
+ agentloop release-notes --release-version 0.24.0
384
+ agentloop release-notes --json
385
+ agentloop release-notes --write
386
+ ```
387
+
388
+ The command reads local package metadata, changelog entries, git history, changed files, working tree status, the active task, the latest verification report, and the latest CI summary when those artifacts exist. It does not create tags, publish packages, call GitHub or npm APIs, read tokens, upload files, or rewrite changelogs.
389
+
390
+ Use it before creating a GitHub release so the release note draft includes the same evidence reviewers see in AgentLoop handoffs.
391
+
392
+ See `docs/release-notes.md`.
393
+
394
+ `agentloop npm-status` checks whether npm latest matches the local package version:
395
+
396
+ ```bash
397
+ agentloop npm-status
398
+ agentloop npm-status --json
399
+ agentloop npm-status --expect-current
400
+ agentloop npm-status --registry-json npm-view.json
401
+ ```
402
+
403
+ Use it after a publish attempt before saying npm has caught up. It runs `npm view` unless you pass captured registry JSON. It does not publish packages, create tags, read tokens, read `.env` files, upload files, or change package metadata.
404
+
405
+ See `docs/npm-status.md`.
169
406
 
170
407
  <p align="center">
171
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/AgentLoopKit/main/docs/assets/readme/agentloopkit-verification.png" alt="AgentLoopKit verification report screenshot showing command results and reviewer handoff sections" width="100%">
408
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/AgentLoopKit/main/docs/assets/readme/agentloopkit-verification.png" alt="AgentLoopKit verification report screenshot showing task context, passing command results, and reviewer handoff sections" width="100%">
172
409
  </p>
173
410
 
411
+ ## Policies
412
+
413
+ `agentloop policy` makes generated repo policy files visible from the CLI:
414
+
415
+ ```bash
416
+ agentloop policy list
417
+ agentloop policy show security
418
+ agentloop policy status
419
+ agentloop policy list --json
420
+ agentloop policy status --json
421
+ ```
422
+
423
+ The command reads Markdown files from `.agentloop/policies/`. `policy status` reports `current`, `modified`, `missing`, and `extra` files by comparing local Markdown with bundled templates. It does not enforce compliance, scan source code, fetch remote policy packs, or mutate policy files.
424
+
425
+ Local policy files are repo guidance. A `modified` policy can be intentional; review it like code instead of overwriting it to match the bundled template.
426
+
427
+ See `docs/policies.md`.
428
+
429
+ ## Security Reviews
430
+
431
+ Use `security-review` task contracts when a change touches auth, sessions, permissions, secrets, dependencies, deployment config, migrations, billing, or other sensitive areas.
432
+
433
+ AgentLoopKit helps reviewers see scope, checks run, checks skipped, risk notes, and rollback instructions. It does not scan code, certify compliance, or prove that code is secure.
434
+
435
+ See `docs/security-review.md` and `examples/security-review/` for a copyable review task, verification report, and PR summary.
436
+
437
+ ## Dependency Upgrades
438
+
439
+ Use `dependency-upgrade` task contracts when an agent changes packages or lockfiles. AgentLoopKit records upgrade scope, lockfile impact, verification, risks, and rollback notes. It does not choose package versions, scan advisories, or call package registries.
440
+
441
+ See `docs/dependency-upgrades.md` and `examples/dependency-upgrade/`.
442
+
443
+ ## CI Recipes
444
+
445
+ Use `agentloop check-gates --strict` as a review-evidence gate in pull request CI. Use `agentloop verify`, `agentloop handoff`, `agentloop report`, `agentloop badge`, `agentloop ci-summary --write`, and `agentloop release-notes --write` in CI when you want evidence artifacts uploaded for reviewers.
446
+
447
+ CI-generated verification reports include GitHub Actions provenance when available, so reviewers can trace an artifact back to the workflow run that created it.
448
+
449
+ See `docs/github-actions.md`, `examples/github-actions/`, `examples/gitlab-ci/`, and `examples/buildkite/` for copy-pasteable workflows. Pin `agentloopkit@0.24.1` or a newer vetted release when reproducibility matters.
450
+
174
451
  ## PR Summaries
175
452
 
176
- `agentloop summarize` uses deterministic inputs:
453
+ `agentloop handoff` writes a reviewer-ready summary using deterministic inputs:
177
454
 
178
455
  - git status
179
456
  - git diff stats
180
- - latest task contract
457
+ - active task contract, or newest task when no active task is pinned
181
458
  - latest verification report
182
459
  - config settings
183
460
 
461
+ The summary groups changed files into review areas such as source, tests, docs, CI, config, AgentLoop artifacts, and risk-sensitive paths. It adds review-focus hints from file paths only.
462
+
184
463
  It does not call an LLM.
185
464
 
465
+ Use `agentloop summarize` to preview the same output without writing a handoff file. `agentloop summarize --write` remains available for scripts.
466
+
186
467
  ## Safety Principles
187
468
 
188
469
  AgentLoopKit is intentionally boring:
@@ -232,22 +513,19 @@ See `examples/` for sample generated harnesses:
232
513
  - `examples/python-service`
233
514
  - `examples/docs-only`
234
515
  - `examples/empty-repo`
516
+ - `examples/github-actions`
517
+ - `examples/security-review`
518
+ - `examples/dependency-upgrade`
519
+
520
+ See `docs/stack-recipes.md` for Next.js, React/Vite, Remix, SvelteKit, Node API, Django, FastAPI, Python, docs-only, empty-repo, and monorepo verification recipes.
235
521
 
236
522
  ## Roadmap
237
523
 
238
524
  See `ROADMAP.md`.
239
525
 
240
- ## Publishing Status
241
-
242
- AgentLoopKit is published on npm as `agentloopkit`.
243
-
244
- The repository includes a GitHub Actions publish workflow for npm trusted publishing after the package is configured on npm. The workflow runs checks before `npm publish` and skips publish when the version already exists.
245
-
246
- See `docs/launch-checklist.md` before publishing.
247
-
248
526
  ## Contributing
249
527
 
250
- See `CONTRIBUTING.md`.
528
+ See `CONTRIBUTING.md` for local setup and PR expectations. Maintainers can use `docs/contributor-playbook.md` for copyable good-first issue examples.
251
529
 
252
530
  ## License
253
531