facekom-v2 discovery workflows

Re-runnable Claude Code Workflow scripts that generated this knowledge base (2026-05-30). Run via Workflow({scriptPath: "<file>"}), in order.

  1. discover-facekom-v2.workflow.js — clones the 16 core missing repos (source-only, GIT_LFS_SKIP_SMUDGE=1 --depth 1) into /Users/levander/coding/facekom-v2-clones/, then writes one source-verified repos/<repo>.md per repo (24 total: 8 local + 16 cloned). Caveat: its original run also attempted the client / cross-cutting / verify phases using a schema return contract — that proved unreliable for write-heavy agents (they finish the file write but skip the StructuredOutput call, failing the run), so those phases were split into script 2.
  2. complete-facekom-v2.workflow.js — schema-free. 22 active-client branch analyses (read-only git diff --name-status / --dirstat; full git diff is forbidden — client branches change up to ~140k lines) → customization-clients.md; 11 cross-cutting docs; INDEX.md; 19 adversarial verifications → VERIFICATION.md.
  3. fix-and-verify-facekom-v2.workflow.js — re-derives every verifier-flagged count from source and patches the doc in place; adversarially verifies the remaining 17 docs (fixing issues); updates VERIFICATION.md.

Design rules learned the hard way

  • Agents are READ-ONLY on every source repo — no checkout/fetch/build; git -C reads only. Clones go to a sibling scratch dir so /Users/levander/coding/facekom/ stays pristine.
  • Do NOT use the schema return option for file-writing agents — they complete the write then skip StructuredOutput, and the run fails after nudges. Return plain text; confirm file existence from the main thread.
  • Counts are unreliable under the rtk proxy (it zeroes find|wc -l / |grep -c). Use git ls-tree + two cross-checked count methods + a visible listing. See ../VERIFICATION.md → “Final independent tie-break”.
  • Embed config as a literal object in the script — the Workflow args global did not deserialize reliably in this environment.