Routines on Desktop
automate the daily refresh · your state file writes itself overnight.
Module 02 gave you a Team Brain. Module 03 keeps it current without anyone having to type. Three scheduled routines — one nightly, one Sunday, one Friday — that read yesterday's PRs, Jira changes, standup notes, and the team's signal channels and write back to state-shared.md and decisions.md.
The artifacts are the same four files from Module 02. What's new is the schedule layer. Runs three ways:
- Hosted (cloud-scheduled) — Anthropic, OpenAI, Google run the schedule for you. Best for: Claude Routines, ChatGPT Tasks, Gemini Scheduled Actions.
- Self-hosted scheduler — cron, Task Scheduler, launchd, or GitHub Actions kicks a CLI agent. Best for teams that need filesystem write or have data-residency constraints.
- Manual ritual with a template pack — the steward runs a saved morning brief and Friday sync prompt by hand. The agent does 90% of the work; the schedule is the steward's calendar.
You wake up to a Team Brain that's already current. The Friday Sync from Module 02 becomes a 3-minute "approve drafts" pass instead of 15 minutes of typing.
// unlock includes
- Three path-specific bootstrap prompts (Hosted · Self-hosted · Manual ritual)
- Three routine specs:
state-refresh(nightly),project-staleness-check(Sunday eve),decisions-promotion(Friday) - The Setup Companion PDF — click-by-click for each path
- Trigger-based bonus routines (on-PR-merge, on-Jira-status-change)
- Notification rules — ping the steward only when human review is needed
Unlock Module 03 now
Subscribers see Modules 02–07 immediately. Drop your email — we'll also flag you when Modules 04–07 ship. No spam.
Pick where the schedule runs
Hosted (Claude Routines / ChatGPT Tasks), self-hosted (cron / Task Scheduler), or your calendar.
Plug in your sources
Where the routine reads from: GitHub / Jira / Slack / standup channel / your team-brain folder.
Run the prompt
One prompt drafts the three routines for your stack. Steward reviews, approves, schedules.
Three routines. Drafted in 30 minutes by the prompt below. Run themselves on cadence after that. Everything else is optional bonus.
state-refresh
nightly · ~02:00Reads yesterday's PRs, Jira changes, standup notes, key Slack threads. Drafts tomorrow's state-shared.md block. Steward approves on first coffee.
project-staleness-check
sunday eveDiffs project-shared.md against the live source-of-truth (roadmap, sprint board). Flags stale lines. Drafts updates for steward review on Monday.
decisions-promotion
fridayScans the week's standups, Slack, and PR titles for "we decided X" patterns. Drafts append-entries for decisions.md. Steward confirms or edits.
on-PR-merge writes a one-liner to today's state-shared block. on-Jira-status-change flags scope drift. Cloud platforms (Claude Routines, GitHub Actions) handle this; cron doesn't.routines-inbox/ folder.Where does your schedule run?
Hosted (cloud-scheduled)
For most IT Pros. Anthropic, OpenAI, or Google runs the schedule on their infra. You write the prompt; the platform fires it on cadence (or on a GitHub event, or on API trigger). No machine of yours has to be online. The newest, fastest path — Claude Routines launched in April 2026.
Self-hosted scheduler
For teams with data-residency constraints, on-prem repos, or a strong "schedule on hardware we own" preference. OS scheduler kicks a CLI agent at the cron tab time; the agent reads local repos and writes to the team-brain folder directly. More control, more upkeep.
Manual ritual with a template pack
For teams that aren't ready to automate yet, or where governance forbids unattended AI writes. The steward runs a saved "morning brief" prompt at start-of-day and a saved "Friday sync" prompt at end-of-week. The schedule is your calendar, not a cron tab. You keep most of the value with none of the infra.
Click-by-click setup for each path → Setup Companion PDF in the Downloads block above.
Routines need read-access to where work happened yesterday. Pick the sources your team already uses; the prompt below drafts the right routine connectors.
Code & tickets
- GitHub / GitLab / Bitbucket — yesterday's merged PRs
- Jira / Linear / Asana — yesterday's status changes
- CI logs — failed builds, deploys
Conversations & meetings
- Slack / Teams — standup channel, decisions channel
- Meeting notes from yesterday's calls
- Email decisions thread (if you have one)
The team brain (write target)
team-brain/state-shared.md— main write targetteam-brain/decisions.md— append-onlyteam-brain/project-shared.md— staleness flags
Notification surface (when ambiguous)
- Slack DM to steward
- Email digest
routines-inbox/folder (Path B only)
Read-only by default. Routines should NOT write to source systems (GitHub PRs, Jira tickets) — only to the team-brain folder and notifications. If a routine wants to update Jira, it should draft and ping; the steward executes. Module 04 (Connect Your Tools) covers connector scoping in depth.
Pick the prompt that matches your path. The output is three routine specs — each with a name, schedule, prompt body, and expected output. The steward registers them on whatever platform you picked. ~30 minutes.
› Show the Path A prompt // for Claude Routines · ChatGPT Tasks · Gemini Scheduled Actions
Act as my Routines builder.
## Safety contract (Path A — hosted scheduling)
- Read only from the connectors I authorize (GitHub, Jira, Slack, Drive, etc.).
- Output is THREE routine specs as labeled markdown blocks. I'll register each in my hosted platform (Claude Routines, ChatGPT Tasks, Gemini Scheduled Actions, etc.).
- Routines write only to the team-brain artifact (a Project file, a Drive doc, a notification channel) — never back to source systems (GitHub, Jira, etc.).
- Skip credentials and confidential data in any sample I show you.
- Log every connector you assume in the debrief.
## What to build
Three routine specs:
1. **`state-refresh`** — nightly. Reads yesterday's PRs / Jira changes / standup notes. Writes tomorrow's `state-shared.md` block.
2. **`project-staleness-check`** — Sunday evening. Diffs `project-shared.md` against the live source-of-truth (roadmap doc, sprint board). Flags stale lines.
3. **`decisions-promotion`** — Friday. Scans the week for "we decided X" patterns. Drafts entries for `decisions.md`.
Each spec includes: name · platform · schedule (cron / human-readable) · trigger type · prompt body · expected output · notification rule.
## Steps
### 1. Inventory silently
What hosted platform am I likely on? Probe via the questions, not assumption. (Claude Pro/Max/Team → Claude Routines. ChatGPT Plus/Pro/Team → ChatGPT Tasks. Workspace Enterprise → Gemini Scheduled Actions or Workspace Agents.)
### 2. Ask 4–6 short questions
1. Which hosted platform am I using? (Claude / ChatGPT / Gemini / something else.)
2. What's the team's source-of-truth for project status? (Jira / Linear / a roadmap doc / sprint board URL.)
3. Where does the standup happen? (Slack channel name / Teams channel / async doc / no standup.)
4. Where should drafted entries land? (A Drive doc / a Project file / a Slack DM / an email digest.)
5. Who's the steward (the human who reviews drafts each morning / Friday)?
6. Anything OFF-LIMITS for the routine to read? (private channels, NDA repos, payroll-adjacent.)
### 3. Draft three routine specs
Use the templates below. Rules:
- Schedule in the platform's preferred format (cron string for Claude Routines, human "every weekday at 06:00" for ChatGPT Tasks, etc.).
- Prompt bodies stay under 500 tokens — these run on a schedule and pay per-token.
- Default to drafting, not acting. Routines append to a draft buffer; steward promotes.
- Specific names ("YARD-LINE-2026 Jira project", "#yardline-standup channel"), not placeholders.
### 4. Output as markdown blocks
```markdown
[routine: state-refresh]
... spec ...
```
```markdown
[routine: project-staleness-check]
... spec ...
```
```markdown
[routine: decisions-promotion]
... spec ...
```
### 5. Debrief
```
## Routines drafted
**Output:** three routine specs above, ready for paste into [platform name].
**Connectors needed:** [list]
**Connectors assumed but not confirmed:** [list — flag for human]
**Notification target:** [Slack DM to steward / email digest / etc.]
**Setup checklist (do once):**
1. Open [platform's] routines/tasks UI.
2. Create a routine for each spec. Paste schedule + prompt + connectors.
3. Test-run state-refresh once manually — confirm output lands in the right target.
4. Enable. Walk away. Tomorrow morning, the first state-refresh draft will be waiting.
**First-week shakedown:**
- Mon: review state-refresh draft. Note false positives or missing items.
- Wed: tighten the prompt if drafts are noisy.
- Fri: run decisions-promotion. Confirm draft entries before appending.
```
## Routine spec template (use for all three)
```markdown
[routine: <name>]
**Platform:** [Claude Routines / ChatGPT Tasks / Gemini Scheduled Actions / Workspace Agent]
**Schedule:** [cron or human — e.g. "0 2 * * *" or "every weekday at 02:00 UTC"]
**Trigger:** [scheduled / on-event / on-API]
**Connectors:** [GitHub: pickbits/repo, Jira: PROJ, Slack: #channel]
**Prompt body:**
"You are the <name> routine. Read yesterday's [sources]. Draft a [output type] for [target]. Format: [template]. If anything is ambiguous, flag in 'NEEDS REVIEW' section. Keep total output under [N] tokens."
**Expected output:** [a markdown block in ; or a Slack DM to ]
**Notification rule:** [silent unless NEEDS REVIEW present, then DM steward]
```
## Principles
- Hosted means trusting the platform with your sources. Audit connectors before enabling.
- Schedules drift; budget for 1–2 weeks of "tune the prompt" before they're reliably useful.
- The steward is still the human. Routines draft, humans approve.
- Cost matters. Cap tokens. Watch the bill the first month.
Start with Step 1, then Step 2 (questions).
› Show the Path B prompt // for cron · Task Scheduler · launchd · GitHub Actions
Act as my Routines builder. ## Safety contract (Path B — self-hosted scheduler) - Read only from the repo / folder I've given you access to. - Write only inside `routines/` (the prompts) and the `team-brain/` artifacts the routine targets. - Output is a `routines/` folder structure: one `.prompt.md` per routine + one scheduler config (cron entries, Task Scheduler XML, or `.github/workflows/*.yml`). - Routines must NEVER write to source systems (git push to anything other than my own branch is forbidden; no Jira API writes, no Slack posts that aren't to a steward DM). - Log every read scope and write target in the debrief. ## What to build Three routines, each as a pair (prompt + schedule): 1. **`state-refresh`** — nightly @ 02:00 local time. Reads yesterday's git log / Jira sync / standup notes. Writes tomorrow's `state-shared.md` block. 2. **`project-staleness-check`** — Sunday 22:00. Diffs `project-shared.md` against live sources. Flags stale lines. 3. **`decisions-promotion`** — Friday 18:00. Scans the week. Drafts `decisions.md` entries. Plus the platform-specific scheduler config (cron / Task Scheduler / launchd / GitHub Actions). ## Steps ### 1. Inventory silently Scan the repo. What CLI agent is most likely available? (Claude Code, Codex CLI, Aider — look for `~/.claude`, `~/.codex`, `aider` config.) What scheduler should I assume? (macOS → launchd or cron; Linux → systemd timer or cron; Windows → Task Scheduler; CI-only team → GitHub Actions.) ### 2. Ask 4–6 short questions 1. Which CLI agent should the routine call? (claude, codex, aider, custom script.) 2. Which scheduler — cron / Task Scheduler / launchd / GitHub Actions? 3. Local repo path (or remote repo URL if running in CI)? 4. Source-of-truth tools (GitHub repo, Jira project, Slack channel)? 5. Who's the steward and how should they be notified — Slack DM, email, a `routines-inbox/` folder? 6. Anything OFF-LIMITS to read? ### 3. Draft routines/ Create `routines/` with: - `routines/state-refresh.prompt.md` - `routines/project-staleness-check.prompt.md` - `routines/decisions-promotion.prompt.md` - `routines/schedule.` (cron tab, plist, .yml workflow, etc.) - `routines/README.md` — install steps + first-run checklist. Rules: - Each prompt under 500 tokens. - Drafts only — no source-system writes. - Use environment variables for paths (`$REPO_ROOT`, `$TEAM_BRAIN`). ### 4. Save (no overwrites) If `routines/` already exists, write each file as ` .new.md` and tell me to merge. ### 5. Debrief ``` ## Routines built **Created:** - routines/state-refresh.prompt.md (N lines) - routines/project-staleness-check.prompt.md (N lines) - routines/decisions-promotion.prompt.md (N lines) - routines/<scheduler>. (cron / plist / yaml) - routines/README.md **Files read:** [paths] **Sources assumed:** [GitHub repo / Jira project / etc.] **Steward notification:** [target] **Install steps:** 1. Install [CLI agent] if not present. 2. Edit `routines/.env` with your paths and tokens. 3. Run `routines/README.md`'s "first-run dry test" — manual `state-refresh` once to confirm output. 4. Register the schedule: `crontab routines/schedule.cron` (or import the plist / commit the workflow). 5. Walk away. Check the team-brain/ folder tomorrow morning. **Token budget:** ~10–30k tokens per nightly run. Weekly runs ~5–10k. Sanity-check the first week's bill. ``` ## Routine prompt template ```markdown # <name> routine **Schedule:** [scheduler-specific] **CLI:** $CLAUDE_CLI / $CODEX_CLI / $AIDER_CLI **Repo root:** $REPO_ROOT **Team brain:** $TEAM_BRAIN ## Read scope - [git log --since=yesterday] - [Jira: GET /rest/api/3/search?jql=updated >= -1d AND project=...] - [Slack: read #channel since yesterday] ## Task You are the <name> routine. Read the scope. Draft a [output type]. ## Write target $TEAM_BRAIN/state-shared.md (append today's block) — or: $TEAM_BRAIN/routines-inbox/<date>-<name>.md (notify steward via Slack DM) ## Constraints - Output under [N] tokens. - If ambiguous, mark "NEEDS REVIEW" and stop. - No source-system writes. ``` ## Principles - Cron is local. If your laptop sleeps, the routine doesn't run. Use a server, a cloud VM, or GitHub Actions for true overnight reliability. - Tokens add up. Watch the bill the first month. - Drafts only. Routines should NEVER push to git, comment on Jira, or post in Slack channels. Start with Step 1, then Step 2 (questions).
› Show the Path C prompt // for teams not ready to automate · saved prompts the steward runs
Act as my Routines builder.
## Safety contract (Path C — manual ritual)
- Read only from what I've attached to this chat.
- Output three saved-prompt packs as labeled markdown blocks. I'll save them to a `prompt-pack/` folder and run by hand on cadence.
- The steward — not a schedule — fires these prompts. The schedule is the steward's calendar.
## What to build
Three saved-prompt packs:
1. **`morning-brief.prompt.md`** — steward runs each morning (~5 min). Pastes yesterday's PR list + Jira changes + standup notes; agent drafts today's `state-shared.md` block.
2. **`friday-sync.prompt.md`** — steward runs Friday end-of-week (~10 min). Pastes the week's signals; agent drafts `decisions.md` entries + flags `project-shared.md` staleness.
3. **`scope-drift-check.prompt.md`** — steward runs ad-hoc when something feels off (~3 min). Pastes the latest project-shared.md + the live roadmap; agent flags discrepancies.
## Steps
### 1. Inventory silently
What's the team's source-of-truth tool? (Jira / Linear / a roadmap doc.) What's the standup format? (Slack channel / async doc / live meeting.)
### 2. Ask 3–5 short questions
1. Which AI tool is the steward using? (claude.ai / ChatGPT / Gemini.)
2. Where does the steward paste sources from — Slack standup channel, Jira board, GitHub PR list?
3. Steward's available time — 5/10/15 min per ritual?
4. Any sources that are too sensitive to paste? (Embargoed work, NDA.)
### 3. Draft three prompt packs
```markdown
[file: morning-brief.prompt.md]
... saved prompt, ready to paste each morning ...
```
```markdown
[file: friday-sync.prompt.md]
... saved prompt for Friday end-of-week ...
```
```markdown
[file: scope-drift-check.prompt.md]
... saved prompt for ad-hoc check ...
```
### 4. Debrief
```
## Prompt pack built
**Output:** three prompts above. Save to `prompt-pack/`.
**Steward's daily ritual:** ~5 min mornings, ~10 min Friday.
**When to consider Path A or B:** if the steward is consistently skipping the morning ritual, or if the team grows beyond ~6 people, the manual cadence breaks. Hosted (Path A) or self-hosted (Path B) is the upgrade.
```
## Prompt template
```markdown
# <ritual name>
You are the <ritual> helper. I'll paste sources below. Draft a [target] in this format:
[exact format spec — what state-shared.md / decisions.md should look like]
## Sources I'll paste
- Yesterday's PR list (paste GitHub PR titles)
- Jira changes (paste Jira "updated yesterday" filter)
- Standup notes (paste #channel since yesterday)
## Output format
[a markdown block I can drop directly into team-brain/state-shared.md]
## Constraints
- Specific over generic.
- "[TBD]" when something's ambiguous.
- Flag anything that looks like a decision — I'll promote to decisions.md myself.
```
## Principles
- Manual is fine. The 80% of value is the structure, not the schedule.
- Skipping a day is not a failure. Skipping a week is — at that point, automate.
Start with Step 1, then Step 2 (questions).
For teams already on M365, the routines layer ships through Copilot Studio — the agent builder that runs on Microsoft's cloud and writes directly into the team's SharePoint / OneNote / Teams surfaces. Same three routines from above; the schedule and the connectors live in your tenant.
// microsoft 365 copilot · copilot studio
Build each routine as a Copilot Studio agent with a scheduled trigger.
Copilot Studio agents accept a Scheduled trigger (cron-style cadence) plus connectors to SharePoint, OneNote, Teams, Outlook, Planner, Loop, and any Power Platform connector your tenant licenses. The routine prompt is the agent's instructions; the write target is a connector action; the schedule fires it.
Create the agent
Open copilotstudio.microsoft.com. New agent › paste the routine prompt body as the agent's Instructions. Add knowledge sources: the SharePoint site that holds the team-brain.
Add a Scheduled trigger
Triggers tab › Add trigger › Scheduled. Pick cadence (nightly 02:00 for state-refresh, Friday 18:00 for decisions-promotion). Set the action: write a Word/Loop page or post to a Teams channel.
Publish + monitor
Publish to your tenant. Steward gets a Teams DM the first morning the routine fires. Watch the Analytics tab for run-success rate and token consumption (counts against your Copilot capacity SKUs).
Why this matters: stays inside your Microsoft tenant boundary — data residency, audit logs, conditional access, and DLP all apply automatically. For regulated environments where "the data can't leave the tenant" is a hard line, this is the right path. The trade: Copilot Studio's schedule granularity is coarser than cron (15-min minimum), and agent runs count against your purchased Copilot capacity.
If your team already runs everything through GitHub, GitHub Actions is the cron tab and GitHub Copilot CLI is the agent. Same three routines; the schedule lives in .github/workflows/, the agent runs on a hosted runner, and the diff lands as a PR you review.
// github copilot · actions + copilot cli
Routines as scheduled workflows that open PRs.
Each routine is a .github/workflows/<name>.yml with a schedule: trigger plus a step that calls the Copilot CLI (gh copilot). The agent runs against the repo, drafts updates to team-brain/state-shared.md, and the workflow opens a PR for the steward to merge in the morning.
Add the Copilot CLI to the runner
In your workflow:
- uses: actions/checkout@v4
- run: gh extension install \
github/gh-copilot
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Add the cron trigger
At the top of the workflow:
on:
schedule:
- cron: '0 9 * * *'
workflow_dispatch:
UTC. Runs nightly at 09:00 UTC. workflow_dispatch lets you fire it manually for testing.
Run the routine, open a PR
Step calls the agent with the routine prompt; agent writes to team-brain/state-shared.md; final step opens a PR with peter-evans/create-pull-request labeled routine. Steward reviews + merges = approval pass.
Why this matters: every routine run is a reviewable diff. Audit trail = git history. Steward approval = PR merge. No "agent wrote to prod silently" failure mode — the PR is the human-in-the-loop gate. Pair with branch protection on team-brain/ and routines literally cannot bypass review.
Routines run on cadence; you maintain them. Two habits keep them useful:
Steward's morning approval pass
Open the routines-inbox (or the platform's draft queue). Skim the night's state-refresh draft. Approve, edit, or reject. Promote to state-shared.md. Notify the team if anything material shipped.
Routine tune-up
Review the month's drafts. Are any consistently noisy? Tighten the prompt. Are any consistently empty? Either kill the routine or fix the source connector. Watch the token bill — cap budgets that crept up.