Skip to content

Commit a4fe300

Browse files
committed
chore: comprehensive code improvements and test updates
1 parent 492f313 commit a4fe300

File tree

220 files changed

+11638
-18173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+11638
-18173
lines changed

.augment/rules/build-all.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,30 @@
22
type: "manual"
33
---
44

5-
Build the complete project from scratch and systematically fix all encountered issues. This should include:
5+
# Complete Atom Project Build
66

7-
1. **Initial Assessment**: First analyze the current project structure and identify the build system being used (e.g., CMake, XMake etc.)
7+
Build the entire Atom project from scratch using the CMake build system.
8+
During the build process:
89

9-
2. **Dependency Resolution**: Install all required dependencies and resolve any version conflicts or missing packages
10+
1. Execute a complete build of all project components
11+
2. Identify and document every error, warning, or build failure
12+
3. For each issue encountered:
13+
- Investigate the root cause thoroughly using available tools
14+
- Implement a proper, complete fix (no placeholders, no TODOs)
15+
- Verify the fix resolves the issue
16+
4. Continue iterating through the build-fix cycle until the entire project
17+
builds successfully with zero errors
18+
5. Do not skip any errors or leave any issues unresolved
19+
6. Provide a summary of all issues found and how each was resolved
1020

11-
3. **Build Process**: Execute the full build process using the appropriate build commands for the project type
21+
## Requirements
1222

13-
4. **Error Identification**: Capture and categorize all build errors, warnings, and failures that occur during the build process
23+
- Use the existing CMake configuration in the project
24+
- Apply real, working solutions only - no temporary workarounds
25+
- Ensure all downstream changes are made (update all callers, tests)
26+
- Verify the final build completes successfully before concluding
1427

15-
5. **Systematic Fixes**: For each identified issue:
16-
- Analyze the root cause of the problem
17-
- Implement the appropriate fix (code changes, configuration updates, dependency adjustments)
18-
- Verify the fix resolves the specific issue without introducing new problems
28+
## Goal
1929

20-
6. **Iterative Building**: Re-run the build process after each fix to ensure progress and identify any remaining issues
21-
22-
7. **Final Verification**: Ensure the complete project builds successfully without errors or critical warnings
23-
24-
8. **Testing**: If applicable, run any existing tests to verify the build produces a functional application
25-
26-
Please provide detailed feedback on each issue encountered and the steps taken to resolve it, so I can track progress and understand the solutions implemented.
30+
A fully functional, clean build of the entire Atom project with all
31+
compilation issues genuinely resolved.

.augment/rules/build-examples-fix.md

Lines changed: 57 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,60 @@
22
type: "manual"
33
---
44

5-
Build all examples in the project completely and fix any issues encountered during the build process. Ensure that:
6-
7-
1. All example projects/demos compile successfully without errors
8-
2. All dependencies are properly resolved and installed
9-
3. Any build configuration issues are identified and corrected
10-
4. All functionality works as intended after the build
11-
5. Run tests (if available) to verify the examples work correctly
12-
6. Document any changes made to fix build issues
13-
14-
Please provide a summary of:
15-
- Which examples were built
16-
- What issues were encountered and how they were resolved
17-
- Verification that all functionality is working properly
5+
# Build All Example Projects
6+
7+
Build all example projects in the Atom repository's `example/` directory using
8+
the MSVC compiler and vcpkg dependency manager. For each example, perform a
9+
complete build cycle and systematically resolve any compilation, linking, or
10+
runtime issues encountered.
11+
12+
## Specific Requirements
13+
14+
1. **Discovery Phase:**
15+
- Identify all example projects/subdirectories within `example/`
16+
- Determine the build system used for each example (CMake targets, standalone projects, etc.)
17+
- Verify which Atom modules each example depends on
18+
19+
2. **Build Process:**
20+
- Configure and build each example using the MSVC toolchain with vcpkg
21+
- Use appropriate CMake presets or build commands consistent with the project's build system
22+
- Enable parallel compilation where possible
23+
- Build in both Debug and Release configurations if feasible
24+
25+
3. **Issue Resolution:**
26+
- Fix all compilation errors (syntax errors, missing headers, type mismatches)
27+
- Resolve all linking errors (missing libraries, undefined symbols)
28+
- Address MSVC-specific compatibility issues using conditional compilation
29+
- Ensure cross-platform compatibility is maintained (don't break GCC/Clang)
30+
- Install any missing dependencies through vcpkg or package managers
31+
32+
4. **Verification:**
33+
- Confirm each example executable builds successfully without errors
34+
- If the examples have associated tests, run them to verify correctness
35+
- If no automated tests exist, perform basic smoke testing by running each
36+
example binary to ensure it executes without crashing
37+
38+
5. **Documentation:**
39+
- Track all changes made to fix build issues (file paths, errors, solutions)
40+
- Note any new dependencies added or build configuration changes
41+
- Document any platform-specific workarounds implemented
42+
43+
## Expected Deliverables
44+
45+
Provide a comprehensive summary containing:
46+
47+
- **Examples Built:** Complete list of all example projects found and their
48+
build status (success/failure)
49+
- **Issues Encountered:** Detailed description of each build error, linking
50+
error, or runtime issue discovered
51+
- **Resolutions Applied:** Specific fixes implemented for each issue (code
52+
changes, dependency installations, configuration updates)
53+
- **Verification Results:** Confirmation that each example compiles, links,
54+
and runs successfully
55+
- **Build Artifacts:** Location of generated executables and any relevant
56+
build outputs
57+
- **Compatibility Notes:** Any MSVC-specific changes made and verification
58+
that cross-platform compatibility is preserved
59+
60+
Focus on achieving a complete, successful build of all examples while
61+
maintaining code quality and cross-platform compatibility.

.augment/rules/build-linux.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
type: "manual"
3+
---
4+
5+
# Linux-Style Build Configuration
6+
7+
Build the entire Atom project using Linux-style build configuration
8+
(GCC/Clang toolchain) on the current Windows environment. During the build
9+
process:
10+
11+
1. Configure the project to use a Linux-compatible build approach (e.g.,
12+
using MinGW, WSL, or similar Unix-like environment)
13+
2. Attempt a complete build of all modules and components
14+
3. Identify and fix ALL compilation errors, linking errors, and build
15+
failures that occur
16+
4. Pay special attention to platform-specific and compiler-specific
17+
compatibility issues between different toolchains (MSVC vs GCC/MinGW)
18+
5. When encountering compiler-specific incompatibilities, use preprocessor
19+
macros to conditionally compile code based on the compiler and platform:
20+
- Use `#ifdef _MSC_VER` for MSVC-specific code
21+
- Use `#ifdef __GNUC__` for GCC/MinGW-specific code
22+
- Use `#ifdef __clang__` for Clang-specific code
23+
- Use `#ifdef _WIN32` or `#ifdef __linux__` for platform-specific code
24+
6. Ensure that the fixes maintain cross-platform compatibility and don't
25+
break builds on other platforms/compilers
26+
7. Document any significant changes or workarounds needed for Linux-style
27+
build compatibility
28+
29+
## Goal
30+
31+
Achieve a successful, complete build of the Atom project using Linux-compatible
32+
build tools while maintaining compatibility with other build environments
33+
(especially MSVC) through appropriate use of conditional compilation.

.augment/rules/build-mingw.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
type: "manual"
3+
---
4+
5+
# MinGW64 Build Configuration
6+
7+
Build the entire Atom project using the MSYS2 (MinGW64) toolchain and resolve
8+
all compilation/linking issues that arise during the build process.
9+
10+
## Specific Requirements
11+
12+
1. **Build Configuration:**
13+
- Use the MSYS2 MinGW64 environment (not MSVC)
14+
- Configure CMake to use the MinGW64 compiler toolchain
15+
- Ensure all build presets and scripts work correctly with MinGW64
16+
17+
2. **Issue Resolution:**
18+
- Fix ALL compilation errors, warnings, and linking issues encountered
19+
- Address any platform-specific incompatibilities between MSVC and MinGW/GCC
20+
- Resolve any missing dependencies or library linking problems
21+
22+
3. **Cross-Compiler Compatibility:**
23+
- When encountering code that is incompatible between MSVC and MinGW/GCC,
24+
use preprocessor macros to distinguish between environments
25+
- Use appropriate compiler detection macros such as:
26+
- `#ifdef _MSC_VER` for MSVC-specific code
27+
- `#ifdef __GNUC__` or `#ifdef __MINGW64__` for MinGW/GCC-specific code
28+
- Ensure the codebase remains compatible with both MSVC and MinGW64
29+
30+
4. **Testing:**
31+
- Verify that the build completes successfully without errors
32+
- Ensure all modules compile and link correctly
33+
- Test that the built binaries function properly
34+
35+
## Expected Outcome
36+
37+
A fully functional build of the Atom project using MSYS2 MinGW64, with all
38+
compiler-specific issues resolved through appropriate conditional compilation
39+
directives, maintaining cross-platform compatibility.

.augment/rules/build-mix.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
type: "manual"
3+
---
4+
5+
# Cross-Compilation Build
6+
7+
Build the entire Atom project using cross-compilation mode and resolve all
8+
compilation, linking, and configuration issues that arise during the build
9+
process.
10+
11+
## Specific Requirements
12+
13+
1. **Cross-Compilation Setup:**
14+
- Identify and configure the appropriate cross-compilation toolchain
15+
- Set up CMake toolchain files for cross-compilation if needed
16+
- Configure build system to use cross-compiler instead of native
17+
18+
2. **Build Execution:**
19+
- Attempt a complete cross-compilation build of all modules
20+
- Use appropriate CMake configuration flags for cross-compilation
21+
- Example: `CMAKE_TOOLCHAIN_FILE`, `CMAKE_SYSTEM_NAME`,
22+
`CMAKE_SYSTEM_PROCESSOR`
23+
24+
3. **Issue Resolution:**
25+
- Fix ALL compilation errors during cross-compilation
26+
- Resolve linking errors related to cross-platform libraries
27+
- Address platform-specific incompatibilities (endianness, word size, ABI)
28+
- Handle missing or incompatible dependencies for target platform
29+
- Fix architecture-specific code issues (x86 vs ARM, 32-bit vs 64-bit)
30+
31+
4. **Platform Compatibility:**
32+
- Ensure proper handling of platform-specific code paths
33+
- Verify that all dependencies are available for target platform
34+
- Address system library differences between host and target
35+
36+
5. **Verification:**
37+
- Confirm cross-compilation build completes successfully
38+
- Verify all modules compile and link correctly for target platform
39+
- Document cross-compilation configuration and changes made
40+
41+
## Expected Outcome
42+
43+
A successful cross-compilation build of the Atom project for the target
44+
platform, with all cross-platform compatibility issues resolved and
45+
documented.

.augment/rules/build-msvc-vcpkg.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
type: "always_apply"
3+
---
4+
5+
# MSVC Build with vcpkg
6+
7+
Build the entire Atom project using MSVC (Microsoft Visual C++) compiler
8+
with vcpkg as the dependency manager. During the build process:
9+
10+
1. Configure the project to use MSVC toolchain and vcpkg for dependencies
11+
2. Attempt a complete build of all modules and components
12+
3. Identify and fix ALL compilation, linking, and build failures
13+
4. Pay special attention to platform-specific compatibility issues between
14+
MSVC and other compilers (MinGW, GCC, Clang)
15+
5. When encountering compiler-specific incompatibilities, use preprocessor
16+
macros to conditionally compile code based on the compiler being used
17+
(e.g., `#ifdef _MSC_VER` for MSVC, `#ifdef __GNUC__` for GCC/MinGW)
18+
6. Ensure that the fixes maintain cross-platform compatibility and don't
19+
break builds on other platforms
20+
7. Document any significant changes or workarounds needed for MSVC
21+
22+
## Goal
23+
24+
Achieve a successful, complete build of the Atom project using the MSVC +
25+
vcpkg toolchain while maintaining compatibility with other build
26+
environments through appropriate use of conditional compilation.

.augment/rules/commit-fix.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
type: "manual"
3+
---
4+
5+
# Complete Git Commit and Push
6+
7+
Complete the git commit and push to the remote repository, fixing all
8+
pre-commit hook issues that arise during the process.
9+
10+
## Requirements
11+
12+
1. Stage all current changes for commit
13+
2. Attempt to commit the changes
14+
3. If pre-commit hooks fail, analyze and fix ALL issues reported by the hooks
15+
(including but not limited to: linting errors, formatting issues, test
16+
failures, type checking errors)
17+
4. Re-run the commit after fixes until pre-commit hooks pass successfully
18+
5. Push the committed changes to the remote repository
19+
6. Ensure that ALL existing functionality remains intact - do not break any
20+
current features or tests while fixing pre-commit issues
21+
22+
## Constraints
23+
24+
- Use appropriate git commands for staging, committing, and pushing
25+
- Apply fixes that align with the project's coding standards and conventions
26+
- If pre-commit hooks include formatters (like clang-format, black, etc.),
27+
allow them to auto-fix when possible
28+
- Verify that all tests still pass after applying fixes
29+
- Do not skip or bypass pre-commit hooks - all issues must be properly
30+
resolved
31+
32+
Note: The instruction is in Chinese. Translation: "Complete this commit to
33+
remote, and fix all pre-commit issues encountered, without affecting existing
34+
functionality"
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
type: "manual"
3+
---
4+
5+
# Complete Missing Standard Files
6+
7+
Complete all standard files required for a professional GitHub repository for
8+
the Atom project. Ensure the following:
9+
10+
## Essential GitHub Files
11+
12+
Create or update as needed:
13+
14+
- `.gitignore` - Comprehensive ignore patterns for C++, Python, CMake build
15+
artifacts, IDE files, and platform-specific files
16+
- `LICENSE` - Appropriate open-source license file (if not already present)
17+
- `CONTRIBUTING.md` - Contribution guidelines including code style, commit
18+
conventions, PR process, and testing requirements
19+
- `CODE_OF_CONDUCT.md` - Community code of conduct
20+
- `.github/ISSUE_TEMPLATE/` - Issue templates for bug reports and feature
21+
requests
22+
- `.github/PULL_REQUEST_TEMPLATE.md` - Pull request template
23+
- `CHANGELOG.md` - Version history and release notes (if applicable)
24+
25+
## Quality Standards
26+
27+
- All files should follow industry best practices and conventions
28+
- Content should be accurate, professional, and reflect the actual project
29+
structure
30+
- Reference existing project documentation (README.md, AGENTS.md, CLAUDE.md,
31+
STYLE_OF_CODE.md) for consistency
32+
- Ensure all templates and guidelines align with the project's C++/Python
33+
nature and CMake build system
34+
35+
## Verification
36+
37+
- Review existing files first to avoid duplication
38+
- Ensure all content is relevant to the Atom astronomical software library
39+
project
40+
- Maintain consistency with the project's existing coding standards
41+
42+
Do NOT create files that already exist with adequate content. Only create or
43+
update files that are missing or incomplete.

.augment/rules/remove-useless.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
type: "manual"
3+
---
4+
5+
# Remove Unnecessary Files
6+
7+
Review the Atom project directory structure and identify files that should be
8+
removed. Specifically:
9+
10+
1. **Process/procedural documentation files** - Remove any temporary or
11+
intermediate documentation files (`*.md`, `*.txt`) that were created during
12+
development processes but are not part of the official project
13+
documentation (keep official docs in `docs/` and `doc/` directories)
14+
15+
2. **Unnecessary files** - Identify and remove:
16+
- Temporary build artifacts not covered by .gitignore
17+
- Duplicate files
18+
- Obsolete configuration files
19+
- Unused scripts or tools
20+
- Any files that don't serve a current purpose in the project
21+
22+
## Important Constraints
23+
24+
- Do NOT remove any files from `docs/`, `doc/`, `tests/`, `atom/`, `python/`,
25+
`cmake/`, `scripts/`, or `example/` directories unless they are clearly
26+
duplicates or obsolete
27+
- Do NOT remove official documentation (README.md, CONTRIBUTING.md, LICENSE)
28+
- Do NOT remove any source code, test files, or build configuration files
29+
- Before deleting any file, explain why it's considered unnecessary and get
30+
confirmation
31+
32+
First, scan the project directory to identify candidates for removal, then
33+
present a list with justification for each file before proceeding with any
34+
deletions.

0 commit comments

Comments
 (0)