This repository is the runnable companion to I Built an AI Agent That Remembers What I Did All Week.
The workflow reconstructs one client week from an explicit GitHub and Slack allowlist, normalizes the source events, produces an outcome-based draft, validates every citation, and renders a reviewable Markdown report.
The fixture demo contains no private repositories, Slack messages, client names, or credentials.
npm install
npm run demoThe report is written to runs/latest.md. Open the links in the fixture output to see how every claim preserves its source URL.
cp .env.example .env
# Set OPENAI_API_KEY
npm run demo:openaiThe model receives the bounded evidence pack. Deterministic code still owns the client manifest, date range, source allowlists, identity filters, citation validation, and draft-only state.
Create a manifest based on fixtures/client-manifest.json, then use least-privilege read tokens:
GITHUB_TOKEN=... \
SLACK_BOT_TOKEN=... \
npx tsx src/cli.ts \
--mode live \
--provider openai \
--manifest path/to/client-manifest.jsonThe starter intentionally collects a narrow first slice. Production implementations should add pull-request reviews, checks, deployments, Slack thread replies, pagination checkpoints, source caching, identity mapping, and provider-specific rate-limit handling.
- The model never chooses the client boundary.
- Events from unlisted repositories and channels are excluded before synthesis.
- Every claim requires valid evidence IDs.
- The output is always a draft.
- There is no email, Slack post, client portal, or send tool.
flowchart LR
MANIFEST["Client + date manifest"] --> COLLECT["Read-only collectors"]
COLLECT --> EVENTS["Normalized work events"]
EVENTS --> SYNTH["Bounded synthesis"]
SYNTH --> CITE["Citation validation"]
CITE --> DRAFT["Reviewable Markdown draft"]
npm run check
npm test
npm run buildMIT. See LICENSE.