Skip to content

Document American spelling for new identifiers; keep Analyse* APIs - #383

Merged
tameware merged 8 commits into
dds-bridge:developfrom
tameware:americanization-part-two
Sep 16, 2026
Merged

tameware merged 8 commits into
dds-bridge:developfrom
tameware:americanization-part-two

Conversation

@tameware

@tameware tameware commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Document American-spelling preference for new identifiers in AGENTS.md and C++ naming instructions.
  • Leave legacy public APIs unchanged (AnalysePlay*, Python analyse_*_pbn, related filenames/targets).
  • Align examples/README with the AnalysePlayBin Bazel target.
  • Keep American Analyze in AnalysePlay* @brief prose so docblocks stay internally consistent.

Test plan

  • Spot-check that AnalysePlay* / analyse_*_pbn symbols and filenames are unchanged
  • Confirm agent/C++ naming docs state American for new code, British for legacy APIs
  • Confirm examples/README lists AnalysePlayBin

Rename internal symbols and example/test targets to American forms
while leaving legacy Analyse*/analyse_*_pbn public APIs unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

examples/README documents //examples:analyze_play_bin, but the Bazel target remains //examples:AnalysePlayBin.

Pull request overview

This pull request standardizes American spelling for internal identifiers, filenames, targets, and documentation while preserving legacy public APIs.

Changes:

  • Renames internal play-analysis symbols, sources, tests, and targets.
  • Updates Bazel, WASM, Visual Studio, and documentation references.
  • Adds spelling guidance for future contributions.
File summaries
File Description
wasm/BUILD.bazel Renames the WASM target.
specs/wasm-emscripten.md Updates WASM documentation.
specs/examples-cli.md Updates example names and targets.
solution/Solution.slnx Updates project paths.
solution/DDS.vcxproj Updates analyzer paths.
solution/dds_native.vcxproj.filters Updates filtered source paths.
solution/dds_native.vcxproj Updates native project paths.
solution/analyze_play_pbn.vcxproj.filters Updates PBN source paths.
solution/analyze_play_pbn.vcxproj Updates PBN source paths.
solution/analyze_play_bin.vcxproj.filters Updates binary source paths.
solution/analyze_play_bin.vcxproj Updates binary source paths.
solution/analyze_all_plays_bin.vcxproj.filters Updates batch source paths.
solution/analyze_all_plays_bin.vcxproj Updates batch source paths.
python/utilities/tests/create_list_for_dtest_test.py Updates test references.
python/tests/test_analyze.py Renames test identifiers.
python/BUILD.bazel Renames the Python test target.
library/tests/solve_board/BUILD.bazel Renames the C++ test target and source.
library/tests/solve_board/analyze_play_consistency.cpp Updates test references.
library/src/solver_if.hpp Renames the internal declaration.
library/src/solver_if.cpp Renames the internal implementation.
library/src/play_analyzer.hpp Renames the analyzer header.
library/src/play_analyzer.cpp Updates includes and internal calls.
library/src/init.cpp Updates the analyzer include.
examples/README Updates documented example names.
examples/BUILD.bazel Renames example sources and targets.
examples/analyze_play_pbn.cpp Renamed PBN example.
examples/analyze_play_bin.cpp Renamed binary example.
examples/analyze_all_plays_pbn.cpp Renamed batch PBN example.
examples/analyze_all_plays_bin.cpp Renamed batch binary example.
docs/wasm_build.md Updates WASM target documentation.
doc/dll-description.md Clarifies legacy API naming.
doc/dll-description.html Clarifies legacy API naming.
AGENTS.md Documents spelling guidance.
.github/instructions/cpp.instructions.md Documents naming guidance.
Review details

Suppressed comments (1)

examples/README:31

  • analyze_play_bin is not a Bazel target: examples/BUILD.bazel still defines this binary as //examples:AnalysePlayBin (and all_examples uses that label). As a result, following the newly listed name with bazelisk build/run //examples:analyze_play_bin fails. Keep the documented name aligned with the existing target, or rename the target and all of its WASM references together.
- analyze_play_bin, analyze_play_pbn
  • Files reviewed: 29/34 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tameware tameware self-assigned this Sep 15, 2026
The README listed a non-existent //examples:analyze_play_bin label;
the binary example target remains AnalysePlayBin to match the legacy API.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tameware

Copy link
Copy Markdown
Collaborator Author

Addressed Copilot feedback on examples/README: the play-bin example is built as //examples:AnalysePlayBin (legacy API name), not analyze_play_bin. The README now lists AnalysePlayBin and notes the source file analyze_play_bin.cpp.

tameware and others added 4 commits September 15, 2026 08:51
Restore analyse_* / play_analyser naming and Analyse wording in
play-analysis docs; document AnalysePlayBin in examples/README.

Co-authored-by: Cursor <cursoragent@cursor.com>
Prefer American forms for new code and non-API names; leave existing
British public-API names such as AnalysePlay* unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The advertised internal/file renames and build references are missing, and documentation wording corrections remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (4)

examples/README:31

  • The PR summary says the non-API example/test filenames and targets are being renamed to American spelling, but this change still exposes the British analyse_play_bin.cpp/analyse_play_pbn names (and the corresponding BUILD targets and internal analyse_* symbols remain unchanged). Please either complete that rename across the build/project references or narrow the PR description to the documentation-only policy change.
- AnalysePlayBin (source `analyse_play_bin.cpp`), analyse_play_pbn

library/src/play_analyser.cpp:244

  • The public function name must remain AnalysePlayPBN, but this @brief is prose and the same docblock still uses American spelling in @param dlPBN ... analyze below. Switching only the brief to Analyse makes the API documentation internally inconsistent; keep Analyze here.
 * @brief Analyse a sequence of played cards (PBN format) and determine the tricks taken.

python/src/bindings.cpp:714

  • This is docstring prose, not the legacy AnalysePlayPBN identifier. Changing Analyze to Analyse regresses the existing American wording and makes the Python-facing documentation inconsistent with the spelling policy; keep Analyze here while preserving the C API name below.
        "Analyse a played deal: double-dummy trick count after each card played.\n\n"

python/src/bindings.cpp:795

  • This is docstring prose rather than an API identifier, so the new British spelling is not needed here and is inconsistent with the American wording used elsewhere in the Python documentation. Please keep Analyze in this description.
        "Analyse multiple played deals in one batched call.\n\n"
  • Files reviewed: 5/5 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread AGENTS.md
Comment thread library/src/play_analyser.cpp Outdated
Public symbol names stay British; docblock prose should match the
existing American @PARAM wording in the same comments.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tameware tameware changed the title Prefer American spelling in non-API identifiers and filenames Document American spelling for new identifiers; keep Analyse* APIs Sep 15, 2026
@tameware
tameware requested a lite review from Copilot September 15, 2026 07:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are documentation-focused, preserve legacy APIs, and only have non-blocking spelling nits.

Review details

Suppressed comments (2)

python/src/bindings.cpp:714

  • The Analyse exception applies to legacy API identifiers, but this string is user-facing prose. Changing it from Analyze introduces British spelling into the Python documentation and diverges from the American @brief prose retained for the same AnalysePlay* API; please keep this sentence as Analyze ... while leaving the binding name unchanged.
        "Analyse a played deal: double-dummy trick count after each card played.\n\n"

python/src/bindings.cpp:795

  • This is also prose rather than the legacy C API identifier, so the rename to Analyse is inconsistent with the American spelling retained in the corresponding AnalysePlay* documentation. Please keep the sentence as Analyze multiple ... and preserve AnalyseAllPlaysPBN only where it names the API.
        "Analyse multiple played deals in one batched call.\n\n"
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

User-facing prose follows American spelling; leave analyse_*_pbn
binding names and Analyse* C API references unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tameware

Copy link
Copy Markdown
Collaborator Author

Addressed the suppressed spelling nits in python/src/bindings.cpp: restored American Analyze in the user-facing docstrings at lines 714 and 795. Binding names (analyse_*_pbn) and C API references (AnalysePlay* / AnalyseAllPlaysPBN) are unchanged.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Documentation-only changes preserve legacy APIs and contain no blocking issues.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@tameware tameware added the Clean Copilot review Copilot reviewed and had neither new comments nor new suppressed comments. label Sep 15, 2026
@tameware
tameware requested a review from zzcgumn September 15, 2026 07:40

@zzcgumn zzcgumn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

@tameware
tameware merged commit a1e6399 into dds-bridge:develop Sep 16, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Clean Copilot review Copilot reviewed and had neither new comments nor new suppressed comments.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants