n., archaic. seven nights; a week.
Your week is a git repo. You text a bot what happened; every six hours a scheduled agent reads your messages, replans the rest of the week, admits what will not fit, and commits. No app, no database, no service.
This repo is the copyable concept, in the spirit of micrograd: small enough to read in one sitting, made to be forked into your own life. Nothing here runs for you. The live landing page is at sennight.agentlab.in.
index.html,CNAME: the landing page, not part of the system.template/: the entire system. This is the part you copy.
| file | role | lines |
|---|---|---|
CLAUDE.md |
the brain: standing instructions the agent follows each run | 97 |
config.yaml |
your life: waking span, anchors, weekly quotas, priorities | 78 |
overrides.yaml |
this week's deviations; they expire with the week | a few |
tasks.yaml |
one-off deadline tasks | a few |
activities/<id>.json |
optional: a locked long-running program for one activity | a few |
logs/<week>.yaml |
append-only ledger of what actually happened | grows |
scripts/check_plan.py |
the auditor: deterministic checks the agent cannot argue with | 237 |
schema/plan.schema.json |
the frozen contract between agent and page | 93 |
.github/workflows/plan.yml |
the heartbeat: cron, agent, commit | 53 |
index.html |
the board: renders plan.json, no build step | 218 |
Counts are for the starting template. A copy that has been lived in for a while runs about half as long again: the brain grows as house rules accumulate, and so does the auditor. That is the system working, not rotting.
The config, logs, and plan.json in the template describe a fictional but
realistic student week, so the board renders something the moment you open
it. Replace all of it with your own life.
Telegram and Discord both ship wired up. Set up either one, or both, and the
agent reads from and digests back to whatever it has secrets for. Neither is a
dependency: any other HTTP messaging API (Slack, email, a webhook) is a bullet
in CLAUDE.md and two repo secrets away; no code changes.
-
Create a private repo from this template (
gh repo create my-sennight --private --template agentlab-in/sennight), movetemplate/*to the repo root, delete the rest. -
Rewrite
config.yamlwith your real anchors and quotas. Adjust the activity-specific checks near the bottom ofscripts/check_plan.pyto match (the auditor knows your constraints by name; that is a feature). -
Add
CLAUDE_CODE_OAUTH_TOKEN(claude setup-token) as a repo secret, then wire at least one transport:- Telegram: make a bot with @BotFather, get
your chat id, add
TELEGRAM_BOT_TOKENandTELEGRAM_CHAT_ID. - Discord: make an application and bot at
discord.com/developers,
invite it somewhere you share, open a DM with it, and (with Developer Mode
on) copy the DM channel id. Add
DISCORD_BOT_TOKENandDISCORD_CHANNEL_ID.
Set up both if you want both; the agent uses whatever it has secrets for and silently skips the rest.
- Telegram: make a bot with @BotFather, get
your chat id, add
-
Enable Actions. Enable Pages (deploy from branch, root) if you want the board on the web; keep the repo private and skip Pages if you do not.
-
Text your bot. The next run picks it up.
- Logs are append-only. Corrections are new entries with negative hours, never edits.
- Shortfalls are declared, not hidden. If the week does not fit, the plan says so, with a reason.
- Anchors cannot be silently dropped. A cancelled class is declared in
overrides.yaml; a plan that just deletes one and refills the window fails the audit. - The newest message wins. Contradictions resolve forward.
- The schema is frozen. The agent proposes changes in
questions.md; it does not silently reshape its own contract. - Silence is forbidden. Every run that changed anything sends a digest.
cd template
pip install pyyaml jsonschema
python3 scripts/check_plan.py
# OK plan.json is arithmetically sound.
MIT