Imported from watson/daily-focus (
AGENTS.md). Install upstream withnpx skills add watson/daily-focus. Copyright stays with the author.
AGENTS.md
Keep this file short. Add guidance only for mistakes an agent is likely to make or facts that are costly to rediscover. Keep feature details in code comments and tests. See CONTRIBUTING.md for setup, commands, and the code map.
The morning briefing agents never read this file. Their instructions belong in
prompts/morning-brief-work.md and
prompts/morning-brief-personal.md, one per
DAILY_FOCUS_PROFILE, installed as a symlink in the private store. Payload fields
belong in schema/items.schema.json. Update both prompts
when changing what a briefing agent must produce or understand.
Private data and store ownership
- Use invented names, accounts, ticket keys, and content in tracked files, fixtures,
screenshots, and commit messages. A real brief is private data, even as a fixture.
Personal configuration belongs in the store or gitignored
.env. - The default store is
~/.daily-focus. For development, setDAILY_FOCUS_DATAto a temporary directory or gitignored./data. Do not put real briefs at the repo root. - The server must never open
sources.md. Send focus text to the browser only throughtoPublicFocus, which strips everything after<!-- agent-only -->.
Each store file has one writer. There is no locking, so preserve these boundaries:
| Writer | Files |
|---|---|
| Briefing agent | items.json |
| Dashboard | actions.jsonl, sessions.jsonl, session.json, archive/, prs.json, tickets.json, calendar.json |
| User | focus.md, sources.md |
npm run init |
prompt.md, items.schema.json symlinks |
Never compact or rewrite actions.jsonl or sessions.jsonl. Do not write dashboard
records on the briefing agent's behalf. Integration caches use a sibling temporary
file and rename; they store facts, not computed board classifications.
npm run seed writes a sample brief. It refuses to replace an existing items.json
unless given --force; never pass --force against a real store. Always give it a
throwaway store:
DAILY_FOCUS_DATA=$(mktemp -d) npm run seed
Behavior to preserve
- Keep new brief fields optional and parsing forgiving. One malformed item must not prevent the rest of the brief from rendering.
- Treat item IDs as opaque and stable. Match with
canonicalId;fingerprintIdis only for drift warnings. The action log decides whether a brief item is handled, never upstream read status or absence from a query. PR and Jira boards deliberately ignoredoneanddismissbecause they show upstream state. - A failed integration read is not an empty result. Preserve the last successful data or use the documented fallback, and surface the failure.
transitionTicketis the only external write. It moves one Jira ticket to one status after a user click. Do not add automatic transitions or other external writes without an explicit scope change.
Checks
Run npm run typecheck and npm test for code changes. Keep tests independent of
live accounts and calendar permission prompts.
npm run audit checks the brief in the selected store, not the code.
test/docs-contract.test.ts checks prompt/schema, configuration, and board-label
consistency. New settings must appear in src/config.ts, .env.example, and SETUP.md.