AGENTS.md

August 19, 2026 ยท View on GitHub

Product invariants

  • Runtime conversion is local-only: no network, telemetry, model, or API calls.
  • Never execute content from a session, tool call, ZIP, or attachment.
  • Redaction defaults to auto; reasoning and request headers never become scenes.
  • Render from a sanitized intermediate Moment[], never directly from raw events.
  • --json stdout is machine-only. Diagnostics belong on stderr.
  • Never delete an output directory. --overwrite may replace only fixed generated filenames.
  • Fixtures are synthetic and must not contain a real user session or credential.

Repository map

PathPurpose
src/parser.tsZIP/raw/Zstd input and packed-row adapter
src/moments.tsSemantic event selection and reasoning exclusion
src/redact.tsSanitization rules and counts
src/render.tsDeterministic SVG โ†’ WebP/GIF/PNG rendering
src/cli.tsPublic CLI/help/exit-code contract
schemas/Machine-readable stable output contract
examples/Synthetic DSH-shaped fixtures
docs/CLI, format, security, and design references

Commands

npm install
npm run typecheck
npm run lint
npm test
npm run build
npm run demo
npm run pack:check
npm run check

Use Node.js 22.19 or newer. npm run check is the release gate.

Change synchronization

When changingAlso update
CLI flag/help/exit codedocs/cli.md, both README language sections, CLI tests, changelog
Result JSONschemas/result.schema.json, tests, docs/cli.md, schema version when breaking
DSH format adapterdocs/session-format.md, pinned-source link, parser fixtures/tests
Redaction ruledocs/security.md, tests; never add a real secret fixture
Generated artifact setREADME output trees, CLI help, result schema, smoke tests
User-visible behaviorEnglish and Chinese README sections, changelog
Package versionpackage.json, src/meta.ts, lockfile, changelog, release tag

Generated assets

assets/hero.webp, assets/hero.gif, assets/poster.png, and assets/social-preview.png must be produced by the released CLI from examples/session.jsonl. Do not edit binary outputs manually.

Security review

Check archive limits, path handling, SVG escaping, secret propagation into manifests, stdout purity, and output conflicts for every parser/renderer change. Fail closed on malformed committed data. Prefer a warning only for explicit best-effort compatibility cases documented in docs/session-format.md.