From 66c196cea94b5e7358b7d861271fabbbe6cad589 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Sat, 6 Dec 2025 13:01:02 -0600 Subject: [PATCH 1/5] docs: clarify architecture and code organization; document partial CLI-to-crate unification and export duplication in AGENTS.md --- AGENTS.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 930f786..ae4139e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,7 +1,8 @@ # Copilot Instructions for RUST Project ## General -- **Entry Point:** Maintain source as `src/main.rs`. +- **Entry Point:** Maintain CLI source as `src/main.rs` and library core as `src/lib.rs`. +- **Binary Structure:** CLI uses feature flag `cli` and entry point is built via default features or explicit `--features=cli`. - **Comments:** - Do not remove or modify comments unless the related code is changed. - Only add comments that explain code functionality; no AI instructional comments. @@ -10,6 +11,18 @@ - **Build Quality:** Ensure `cargo build --release` has no errors or warnings. - **File Editing:** Always edit files inline; do not use `cat` to write to files. +## Architecture & Code Organization +- **Library-first design:** Core logic in `src/lib.rs` and CLI entry point in `src/main.rs`. + - **Shared code:** Parser modules (`src/parser/`) are used by both library and CLI (`parse_frames`, `parse_headers_from_text`). + - **Duplicated code:** Export implementations exist separately in `src/export.rs` (library) and `src/main.rs` (CLI). CLI does NOT use library export functions. + - **Current state:** **Partial unification** — parsing shared, export duplicated (~1800 lines in `src/main.rs`). +- **Decision criteria:** "Is this needed by crate consumers?" determines placement — shared logic in library, CLI-only logic in `src/main.rs`. +- **Feature flags:** `csv`, `cli`, `json`, `serde` control optional dependencies; default: `csv` + `cli`. +- **CRATE_USAGE.md reference:** See `CRATE_USAGE.md` for library API examples with feature flags. +- **Code quality goals:** Reduce duplication by migrating CLI export logic to use library `export_to_csv()`, `export_to_gpx()`, `export_to_event()` functions. +- **Testing:** 37 test attributes total; 26 unit tests passing; mostly in `src/main.rs` and `src/conversion.rs`. +- **Public API:** `parse_bbl_file()`, `parse_bbl_bytes()`, `BBLLog`, `ExportOptions`, conversion utilities, parser helpers. + ## Algorithms - **Method Selection:** - When choosing math or scientific methods, compare alternatives for accuracy and efficiency. From 4b8a4be77642287d3e91031d4ee195a2974f3709 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Sat, 6 Dec 2025 13:51:10 -0600 Subject: [PATCH 2/5] docs: correct test attribute statistics and per-file counts in AGENTS.md; remove unsupported passing claim --- AGENTS.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index ae4139e..bee439b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -11,7 +11,6 @@ - **Build Quality:** Ensure `cargo build --release` has no errors or warnings. - **File Editing:** Always edit files inline; do not use `cat` to write to files. -## Architecture & Code Organization - **Library-first design:** Core logic in `src/lib.rs` and CLI entry point in `src/main.rs`. - **Shared code:** Parser modules (`src/parser/`) are used by both library and CLI (`parse_frames`, `parse_headers_from_text`). - **Duplicated code:** Export implementations exist separately in `src/export.rs` (library) and `src/main.rs` (CLI). CLI does NOT use library export functions. @@ -20,7 +19,7 @@ - **Feature flags:** `csv`, `cli`, `json`, `serde` control optional dependencies; default: `csv` + `cli`. - **CRATE_USAGE.md reference:** See `CRATE_USAGE.md` for library API examples with feature flags. - **Code quality goals:** Reduce duplication by migrating CLI export logic to use library `export_to_csv()`, `export_to_gpx()`, `export_to_event()` functions. -- **Testing:** 37 test attributes total; 26 unit tests passing; mostly in `src/main.rs` and `src/conversion.rs`. +- **Testing:** 42 test attributes total; per-file: 13 in `src/main.rs`, 14 in `src/conversion.rs`, 7 in `src/parser/stream.rs`, 8 in `src/parser/helpers.rs`. - **Public API:** `parse_bbl_file()`, `parse_bbl_bytes()`, `BBLLog`, `ExportOptions`, conversion utilities, parser helpers. ## Algorithms From d56e3fa8f0bb7bf13d8426ae7ce0fb00d84606fa Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Sat, 6 Dec 2025 14:05:25 -0600 Subject: [PATCH 3/5] docs: fix coderabbitAI inaccuracy --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index bee439b..8d35c0c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -19,7 +19,7 @@ - **Feature flags:** `csv`, `cli`, `json`, `serde` control optional dependencies; default: `csv` + `cli`. - **CRATE_USAGE.md reference:** See `CRATE_USAGE.md` for library API examples with feature flags. - **Code quality goals:** Reduce duplication by migrating CLI export logic to use library `export_to_csv()`, `export_to_gpx()`, `export_to_event()` functions. -- **Testing:** 42 test attributes total; per-file: 13 in `src/main.rs`, 14 in `src/conversion.rs`, 7 in `src/parser/stream.rs`, 8 in `src/parser/helpers.rs`. +- **Testing:** 37 test attributes total; per-file: 11 in `src/main.rs`, 13 in `src/conversion.rs`, 6 in `src/parser/stream.rs`, 7 in `src/parser/helpers.rs`. - **Public API:** `parse_bbl_file()`, `parse_bbl_bytes()`, `BBLLog`, `ExportOptions`, conversion utilities, parser helpers. ## Algorithms From 0e8615ad1362e8504364a14d7ab1aaa820887067 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Sat, 6 Dec 2025 14:11:01 -0600 Subject: [PATCH 4/5] docs: clarify test coverage in AGENTS.md, remove statistics - Remove explicit test counts from architecture section - Add statement about comprehensive test coverage across key modules - No changes to code or logic --- AGENTS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 8d35c0c..62451e8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -11,6 +11,7 @@ - **Build Quality:** Ensure `cargo build --release` has no errors or warnings. - **File Editing:** Always edit files inline; do not use `cat` to write to files. +## Architecture & Code Organization - **Library-first design:** Core logic in `src/lib.rs` and CLI entry point in `src/main.rs`. - **Shared code:** Parser modules (`src/parser/`) are used by both library and CLI (`parse_frames`, `parse_headers_from_text`). - **Duplicated code:** Export implementations exist separately in `src/export.rs` (library) and `src/main.rs` (CLI). CLI does NOT use library export functions. @@ -19,7 +20,7 @@ - **Feature flags:** `csv`, `cli`, `json`, `serde` control optional dependencies; default: `csv` + `cli`. - **CRATE_USAGE.md reference:** See `CRATE_USAGE.md` for library API examples with feature flags. - **Code quality goals:** Reduce duplication by migrating CLI export logic to use library `export_to_csv()`, `export_to_gpx()`, `export_to_event()` functions. -- **Testing:** 37 test attributes total; per-file: 11 in `src/main.rs`, 13 in `src/conversion.rs`, 6 in `src/parser/stream.rs`, 7 in `src/parser/helpers.rs`. +- **Testing:** Comprehensive tests distributed across `src/main.rs`, `src/conversion.rs`, `src/parser/stream.rs`, and `src/parser/helpers.rs`. - **Public API:** `parse_bbl_file()`, `parse_bbl_bytes()`, `BBLLog`, `ExportOptions`, conversion utilities, parser helpers. ## Algorithms From 5861dba9a171ef2b8861aacd915d975a4d066e43 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Sat, 6 Dec 2025 14:15:30 -0600 Subject: [PATCH 5/5] docs: fix minor formatting in Documentation section of AGENTS.md --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 62451e8..a5fb952 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -30,7 +30,7 @@ ## Documentation - **Readme:** Maintain a proper `README.md` file. -- **Overview** Maintain a proper `OVERVIEW.md` file +- **Overview:** Maintain a proper `OVERVIEW.md` file - **Summaries:** - Output final summaries to `./INFORMATION/*.md` (not in git). - Use date-prefixed, uppercase filenames (e.g., `2025-06-25_SUMMARY.md`).