Skip to content

Fix hard-coded facts, spelling, and terminology drift (COR-19) - #51

Merged
thiagooak merged 2 commits into
mainfrom
fix/cor-19-consistency-sweep
Sep 21, 2026
Merged

thiagooak merged 2 commits into
mainfrom
fix/cor-19-consistency-sweep

Conversation

@thiagooak

Copy link
Copy Markdown
Owner

Summary

Global consistency sweep addressing issue #32 (COR-19): hard-coded facts that a query could supply, inconsistent spelling/terminology, and duplicated content across chapters.

  • Text-only numbers → :ui/value: Charizard's base stat total (rules.edn), the speed>100 count in a try-tip (predicates.edn). The hard-coded legendary Pokemon name list in negation.edn is now a runnable query instead (:ui/value only handles scalars, not name lists).
  • Removed the hard-coded "The first games had 15 types" claim in time-travel.edn, which also gave away the answer to the question asked two sentences later.
  • Spelling: standardized on "Pokemon" — index.edn had the only remaining "Pokémon" occurrences.
  • cardinality/many isn't a real keyword: fixed to :db.cardinality/many in negation.edn, and to prose "cardinality-many" in cardinality-many.edn.
  • Terminology: "pattern clause" → "data pattern" (Datomic's own term) in negation.edn; "entity ID" → lowercase "entity id" in querying.edn, matching every other chapter.
  • Formatting: fixed padded predicate spacing [( > ?speed 100 )] → [(> ?speed 100)] in predicates.edn.
  • De-duplication: or-clauses.edn's try-tip no longer repeats the same "add a third branch for Electric" suggestion twice; cardinality-many.edn no longer repeats the full :pokemon/type schema already shown in modeling-data.edn (the existing cross-reference link covers it).

All numeric claims were verified against the live dataset via the REPL before wrapping them in :ui/value (Charizard's total = 534, speed>100 count = 17, matching the ticket's own arithmetic check).

Does not touch anything from #39 (still open/unmerged per request) — src/app/db.clj, the friends dataset, and "super-effective" naming were left untouched.

Closes #32

Test plan

  • clojure -X:test — 32 tests, 503 assertions, 0 failures, 0 errors
  • Validated EDN syntax of every edited chapter file
  • Verified hard-coded numeric claims against the dataset via REPL before replacing them

🤖 Generated with Claude Code

thiagooak and others added 2 commits September 21, 2026 13:31
- Replace text-only numbers that a query could supply with :ui/value:
  Charizard's base stat total in rules.edn, the speed>100 count in
  predicates.edn's try-tip, and the legendary Pokemon list in
  negation.edn (now a runnable query instead of a hard-coded name list).
- Remove the hard-coded "15 types" claim in time-travel.edn, which also
  spoiled the query right below it.
- Standardize spelling on "Pokemon" (index.edn had the only remaining
  "Pokémon" occurrences).
- Fix malformed "cardinality/many" to the real keyword
  ":db.cardinality/many" (negation.edn) or "cardinality-many" as prose
  (cardinality-many.edn).
- Use Datomic's own term "data pattern" instead of "pattern clause"
  (negation.edn).
- Standardize "entity ID" to lowercase "entity id" in querying.edn,
  matching every other chapter.
- Fix padded predicate spacing in predicates.edn's code sample.
- De-duplicate try-tips: or-clauses.edn no longer repeats the same
  "Electric" suggestion twice, and cardinality-many.edn no longer
  repeats the :pokemon/type schema already shown in modeling-data.edn
  (now just cross-references it).

Closes #32

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@thiagooak
thiagooak merged commit 19ce422 into main Sep 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

COR-19: Hard-coded facts, spelling, and terminology drift

1 participant