iftypeset/AGENTS.md
codex e92f1c3b93
Some checks are pending
ci / ci (push) Waiting to run
iftypeset: document CI pipeline + Playwright + font contract
2026-01-08 18:10:41 +00:00

2.7 KiB
Raw Export PDF Blame History

AGENTS.md — iftypeset working rules

These instructions apply to the entire iftypeset/ tree.

  • Do not OCR/transcribe Chicago/Bringhurst into the repo. Rules are paraphrases only with pointer refs (e.g., CMOS18 §6.2 p377 (scan p10)).
  • OCR is allowed only ephemerally (stdout or temp files deleted) to locate pointers.
  • Prefer deterministic, measurable rules. If it cant be automated, mark it as manual via tags: ["manual_checklist=true"] and ensure it lands in the checklist output.

“Dont lose work” operating practice

  • Trust the filesystem, not the chat transcript.
  • Use ./scripts/audit.sh to capture current state.
  • Use ./scripts/ci.sh as the fastest sanity check.
  • After meaningful changes, create a restore point: ./scripts/checkpoint.sh "short note".
  • Checkpoints are recorded in docs/CHECKPOINTS.md.

Session ID hygiene (required)

Codex CLI shows a session_id via /status (look for the Session: line). To prevent two terminals from sharing/overwriting one session state:

  • Run /status at session start and copy the Session: value.
  • When claiming a task in docs/13-task-board.md, include it in owner (example: codex-cli (gpt-5.2) [sid: 019b…]).
  • Also include it in your row in /root/docs/SESSION_STATE.md (either in who or notes).
  • If you ever see two live terminals with the same session_id, stop one and start a fresh session (new session_id).

Fallback (if /status is unavailable):

day_dir=/root/.codex/sessions/$(date -u +%Y/%m/%d)
latest=$(ls -1t "$day_dir"/rollout-*.jsonl | head -n 1)
python3 - <<'PY' "$latest"
import json,sys
print(json.loads(open(sys.argv[1]).readline())["payload"]["id"])
PY

If multiple sessions are active, run this immediately after starting your session so “latest” corresponds to your own launch.

When adding rules

  • Follow spec/schema/rule.schema.json strictly; run PYTHONPATH=src python3 -m iftypeset.cli validate-spec --spec spec --build-indexes.
  • Keep rule_text short and paraphrased; never paste long passages.
  • Prefer adding new batches (e.g., v1_links_004.ndjson) over editing old IDs; deprecate instead of mutating IDs.

When changing code

  • Keep dependencies minimal (currently requirements.txt is intentionally small).
  • Update app/CLI_SPEC.md and STATUS.md when behavior or counts change.
  • Ensure ./scripts/ci.sh passes before handing off.

Typography baseline (house default)

  • Default body font size is 12pt for reader-facing PDFs; do not go below 12pt unless the profile description explicitly justifies it (e.g., slide decks, constrained one-page CVs).
  • Prefer fixing density with margins/spacing/layout before shrinking type.