Commands #
bun run checkis the read-only gate. It never rewrites files.bun run fixapplies lint autofixes and formatting.- CI:
.github/workflows/ci.ymlrunsbun run checkon every push and pull request, andmainshould require itscheckjob before merging.checkis skipped only when thechangesjob reports documentation-only changes; ifchangesfails,checkstill runs..github/workflows/release.ymlreleases onv<version>tags. README.mdlists every script and the documented exceptions.
Project memory #
This project uses machine-memory with a shared remote Worker-backed database.
Remote credentials are stored in the OS keychain. To change them, use machine-memory remote setup; to provision a new Alchemy D1 stack, use machine-memory remote provision with optional --stack-name, --database-name, and --api-name.
Every database-backed command requires exactly one backend flag. Use --remote for this repository and do not pass both flags.
Run machine-memory doctor during maintenance, not every task. Do not create or rely on a local machine-memory.db for this repository.
⚠️ MANDATORY: Complete the memory scan BEFORE any code changes. Skipping it causes rework, regressions, and duplicated decisions.
Required pre-workflow (DO NOT SKIP) #
Before touching code, complete this scan from the repository root. Every database command must include the backend flag shown below:
- Known files:
machine-memory suggest --files "path/a.ts,path/b.ts" --remote --json-min - Known topic:
machine-memory query "topic" --remote --json-min - Broad audit:
machine-memory list --tags "area:..." --remote --json-min
If results look relevant, fetch full records before editing: machine-memory get <id> --remote or machine-memory get <id,id,...> --remote.
One-sweep workflow (use this every task) #
- Scan relevant context fast. Run exactly one focused
suggest,query, orlistcommand before code changes; repeat only if the touched paths or scope materially changes. - Verify uncertain context before acting. Use
machine-memory verify <id> "<inferred fact>" --remoteormachine-memory diff <id> "<proposed updated wording>" --remotewhen an inference may conflict with existing memory. - Maintain memory while implementing. Prefer
machine-memory update --match "topic query" "new canonical content" --remote; if no reliable match exists, usemachine-memory add "..." --upsert-match "topic query" --remote. - Write for retrieval. Put commands, API paths, file paths, keys, routes, thresholds, and exact feature keywords in the first sentence.
- Use path-driven tags. Prefer
--pathandtag-map; use scoped tags such asarea:cli,topic:backend,kind:decisionwhen no mapping exists. - Capture third-party quirks. Always add a
--type gotchamemory for surprising library or tool behavior, leading with the library name, behavior, and fix. - Keep status hygiene. Status memories are for transient progress, should include
--expires-after-days, and should be updated rather than duplicated. Reviewdoctorsuggestions semantically before applying deprecations or updates. - Separate durable and transient facts. Use
decision,reference, orgotchafor reusable knowledge; usestatusonly for short-lived snapshots. - At task end, persist every durable decision, constraint, preference, non-obvious gotcha, and verified status future sessions need. Use
machine-memory add ... --remoteor update the canonical record withmachine-memory update ... --remote. Do not store obvious code facts, routine test results, temporary progress, or duplicates.
Checklist (verify before proceeding) #
Project preference: replace obsolete systems when practical; preserve backwards compatibility only when it is explicitly required.