Quick answer
Docs go stale because nobody's job is to re-read them after each merge. Give that job to a scheduled agent. In Nori, an admin turns on the managed Docs gardening automation, which finds documentation that no longer matches the code and proposes one focused fix per run. Test gardening adds a regression test for recently changed code that nothing covers, or fixes a flaky test. Both post in a team channel, ask in the thread before opening a pull request by default, and never merge. Add your own release-triggered automation for the changelog.
Why docs and tests fall behind the code
Every team means to update the README and add the test. Then the fix ships at 18:00, the docs pull request never happens, and three months later the setup guide names a flag that no longer exists.
- Docs are nobody's task. Code review checks the diff, not the docs the diff made wrong.
- Tests lag behind hotfixes. Urgent changes merge with a promise to add coverage later.
- Changelogs are written from memory. Someone reconstructs a release from commit titles the day it ships.
- Flaky tests get retried, not fixed. Each retry costs CI time and trust in the suite.
This is small, regular, checkable work. That makes it a good fit for an agent on a schedule, as long as people still review what it proposes.
Common ways teams keep docs and tests current
| Approach | What it does well | What it leaves to people |
|---|---|---|
| Pull request templates and checklists | Reminds the author at the right moment | Writing the docs and tests |
| CI checks such as link checkers and coverage gates | Blocks clear breakage on every pull request | Finding docs that are wrong but still valid, and writing the missing test |
| Release tooling that builds notes from commits | Fast, consistent release notes | Readable summaries when commit messages are terse |
| A scheduled coding agent | Reads code and docs, writes the fix, opens a pull request | Reviewing and merging |
These work together. Keep your CI checks. The agent handles what checks only detect: writing the change.
What Nori's managed gardening automations do
Nori ships automations of its own and keeps their instructions up to date. Each one is off until an admin turns it on under Automations → Managed by Nori.
| Automation | What it does | Default schedule |
|---|---|---|
| Docs gardening | Finds documentation that no longer matches the code, or is missing, and proposes one focused fix | Tuesday 14:00 |
| Test gardening | Adds a regression test for recent untested code, fixes a flaky test, or removes a test that tests nothing | Wednesday 14:00 |
| Utils gardening | Finds code that rewrites a helper the repository already has and proposes switching a few call sites | Thursday 14:00 |
- Your repositories, your channel. Choose which repositories each one works in and which Slack or Discord channel it posts in. Blank repositories means every workspace repository.
- Your schedule. Set any five-field cron and an IANA time zone.
- Quiet when there is nothing to do. A run with nothing worth reporting posts nothing.
- Suggest first by default. The agent describes the change in its chat thread and waits for a yes before opening a pull request. In Open mode it opens pull requests directly, with no reviewers.
- Never merges. Managed automations open pull requests and stop there.
Details are in the managed automations guide.
How to set up nightly or weekly docs and test upkeep, step by step
- Connect GitHub and chat. Install the Jiro (by Nori) GitHub App on the repositories in scope, add them under Settings → Environment, and connect Slack or Discord.
- Protect main. Require a pull request review on your default branch, so every agent change waits for a person.
- Turn on Docs gardening and Test gardening. An admin uses the switch on each card under Automations → Managed by Nori.
- Point them at your repositories and channel. Use
nori-sessions triggers managed setwith--repos,--clientand--channel-id(example below). - Pick the cadence. Keep the weekly defaults, or set a nightly cron for docs gardening on a busy repository.
- Add a changelog automation. Create a From a webhook automation and call it from your release workflow.
- Review in the thread. Answer suggest-first proposals with a yes or a correction, then review the pull request as usual.
Worked example: docs, tests and changelog for two repositories
A 25-engineer SaaS team keeps an api and a web repository. They want docs checked every night, tests every week, and the changelog updated on each release. Names and IDs are illustrative.
Nightly docs gardening and weekly test gardening
nori-sessions triggers managed set --key docs-gardening --enabled true \
--client slack --channel-id C0123456789 --repos api,web \
--cron "0 2 * * 1-5" --timezone America/New_York
nori-sessions triggers managed set --key tests-gardening --enabled true \
--client slack --channel-id C0123456789 --repos api,web \
--cron "0 10 * * 3" --timezone America/New_York
Changelog on every GitHub release
Create a webhook automation with these instructions, delivered to a Slack thread in #releases:
A GitHub release was published; the payload is attached.
In the repository named in the payload, read the merged pull requests
between the previous release tag and this tag. Add a section for this
version to CHANGELOG.md under Added, Changed and Fixed, one line per
user-visible change with its PR number. Skip internal refactors.
Open a pull request titled "docs: changelog for <tag>". Never merge.
If the previous tag cannot be found, say so in the thread and stop.
Then call it from the release workflow. The webhook URL is a secret, so store it as one:
# .github/workflows/changelog.yml
on:
release:
types: [published]
jobs:
notify-nori:
runs-on: ubuntu-latest
steps:
- run: |
curl -X POST "$NORI_WEBHOOK" -H "Content-Type: application/json" \
-d '{"repo":"${{ github.repository }}","tag":"${{ github.event.release.tag_name }}"}'
env:
NORI_WEBHOOK: ${{ secrets.NORI_CHANGELOG_WEBHOOK }}
What the team sees in a typical week:
| When | Automation | Result |
|---|---|---|
| Tue 02:00 | Docs gardening | Thread: README names --legacy-auth, removed in api #3301. Proposed fix; PR opened after a yes |
| Wed 02:00 | Docs gardening | Nothing to report, no post |
| Wed 10:00 | Test gardening | PR: regression test for the rounding change in invoice_total() from api #3296 |
| Thu 16:40 | Changelog webhook | PR: CHANGELOG.md section for v4.12.0 with 9 entries |
Weekly test maintenance where a person approves every merge
The safe pattern uses layers you already trust:
- Managed automations never merge. They open pull requests and stop.
- Your own automations say so in the prompt. End each one with "Never merge."
- Branch protection decides. Sessions reach GitHub through the Jiro (by Nori) GitHub App with short-lived tokens scoped to the repositories you granted. A required review on
mainmeans only a person can approve what lands. See GitHub's protected branches docs. - Admins approve automations. A member's new automation, or a change to one, waits for an admin's approval before it runs.
For failing CI rather than missing tests, see fix failing CI and flaky tests with an agent. For more schedules, read coding agent automation recipes. Nori Enterprise runs all of this on-prem or in your own cloud, with integration services included.
Frequently asked questions
Our docs are always out of date with the code. How do we keep them current?
Give the job to a scheduled agent. Nori's Docs gardening automation finds documentation that no longer matches the code, proposes one focused fix per run in your Slack or Discord channel, and opens a pull request for your team to review. It runs weekly by default, and you can set any schedule.
How do I run nightly documentation updates with an AI agent that opens PRs?
Turn on Docs gardening and give it a nightly cron schedule and your time zone with nori-sessions triggers managed set. In the default Suggest first mode you approve each change in the thread before the pull request opens; in Open mode it opens pull requests directly.
Can an agent update the changelog every release?
Yes. Create a webhook automation with changelog instructions and call its URL from a GitHub Actions workflow on the release published event. The release details reach the agent, which edits CHANGELOG.md and opens a pull request.
Can an agent add regression tests for recently changed code that nothing covers?
Yes. Nori's Test gardening automation looks for recent code without tests and adds a regression test, fixes a flaky test, or removes a test that tests nothing. It works through a chat thread plus a pull request, and by default asks before opening the pull request.
How do I run weekly test maintenance with an agent so a person approves every merge?
Use Test gardening, which never merges, and require a pull request review on your default branch with GitHub branch protection. The agent can push branches and open pull requests, and a person approves every merge.
Can I change the gardening instructions?
Nori maintains the managed instructions and updates them with new releases. You choose repositories, schedule, channel and pull request mode. For different instructions, write your own scheduled automation.
Sources
Read on December 4, 2026.
- Nori docs: Automations managed by Nori
- Nori docs: Automations: schedules, reminders, and webhooks
- Nori docs: Trigger a coding agent from a webhook with an approval step
- Nori docs: Use GitHub with Nori sessions
- GitHub docs: About protected branches
- GitHub docs: Events that trigger workflows (release)