Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8533a59
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 11, 2025
b451c7d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 11, 2025
8e6b2fe
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 17, 2025
ff9fb1b
merge: integrate origin/chore/build-fixes-2025-08-21
AstroAir Mar 14, 2026
0b5c96a
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 11, 2025
465cf78
merge: integrate origin/pre-commit-ci-update-config (filtered)
AstroAir Mar 14, 2026
7268bdd
test(meta): add test_refl_field and raise coverage to >=90%
MaxQian888 Jun 11, 2026
c96b792
fix(meta): repair ffi CallbackRegistry crash and Lazy getHandle
MaxQian888 Jun 11, 2026
7f37a7a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 11, 2026
8fccabe
docs(components): add optimization design spec
MaxQian888 Jun 11, 2026
32b3eef
docs(components): add optimization implementation plan
MaxQian888 Jun 11, 2026
258f866
refactor(components): clean up ComponentPerformanceStats formatting
MaxQian888 Jun 11, 2026
5ff63e1
refactor(components): replace component.template arity ladder with in…
MaxQian888 Jun 11, 2026
7ecd9a0
refactor(components): replace operator macros with concept-constraine…
MaxQian888 Jun 11, 2026
08d93d8
refactor(components): stop leaking global json alias from dispatch.hpp
MaxQian888 Jun 11, 2026
d24d4a7
perf(components): demote per-call logging to trace/debug
MaxQian888 Jun 11, 2026
0b1469e
fix(components): format exception messages instead of concatenating
MaxQian888 Jun 11, 2026
473891d
fix(components): make module macros compile and re-enable types_and_m…
MaxQian888 Jun 11, 2026
4087be7
feat(components): complete and enable the component event system
MaxQian888 Jun 11, 2026
37bf7cb
refactor(components)!: delete unimplemented type_conversion interface
MaxQian888 Jun 11, 2026
1ff1259
refactor(components): remove abseil dependency from package.hpp
MaxQian888 Jun 11, 2026
388a901
@
MaxQian888 Jun 11, 2026
b2682aa
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 48 additions & 16 deletions .augment/rules/file-and-code-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,43 @@ type: "manual"
---

# FILE AND CODE MANAGEMENT PROTOCOLS

## STRICT RULES FOR FILE OPERATIONS AND CODE CHANGES

### FILE SIZE AND ORGANIZATION MANDATE

#### Rule 1: Reasonable File Size Management

- You MUST keep files at reasonable sizes for good workspace organization
- Large files SHOULD be split into multiple logical files for ease of use
- You MUST verify file sizes using `wc -c filename` when working with large content
- If a file becomes unwieldy, you MUST suggest splitting it into multiple files

#### Rule 2: File Organization Best Practices

**MANDATORY APPROACH for file management:**

1. Calculate planned content size for new files
2. If creating large content: consider logical file splitting
3. For existing files: check current size with `wc -c filename`
4. If file is becoming too large: propose splitting strategy to user
5. Maintain logical organization and clear file purposes

#### Rule 3: Size Monitoring and Reporting

**MANDATORY SEQUENCE for large file operations:**

1. `wc -c filename` to check current file size
2. Report file size when working with substantial content
3. Suggest file splitting when content becomes unwieldy
4. Maintain good workspace organization principles

### FILE CREATION PROTOCOLS

#### New File Creation Requirements:
#### New File Creation Requirements

**MANDATORY SEQUENCE - NO DEVIATIONS:**

1. `view` directory to confirm file doesn't exist
2. `codebase-retrieval` to understand project structure and conventions
3. Calculate character count of planned content
Expand All @@ -45,7 +53,8 @@ type: "manual"

**SKIPPING ANY STEP = IMMEDIATE TASK TERMINATION**

#### File Creation Reporting Format:
#### File Creation Reporting Format

```
FILE CREATION REPORT:
FILENAME: [exact filename]
Expand All @@ -60,8 +69,10 @@ COMPLIANCE STATUS: [COMPLIANT/VIOLATION]

### FILE MODIFICATION PROTOCOLS

#### Existing File Modification Requirements:
#### Existing File Modification Requirements

**MANDATORY SEQUENCE - NO DEVIATIONS:**

1. `view` file to examine current contents and structure
2. `wc -c filename` to get current size
3. `codebase-retrieval` to understand context and dependencies
Expand All @@ -77,7 +88,8 @@ COMPLIANCE STATUS: [COMPLIANT/VIOLATION]

**SKIPPING ANY STEP = IMMEDIATE TASK TERMINATION**

#### File Modification Reporting Format:
#### File Modification Reporting Format

```
FILE MODIFICATION REPORT:
FILENAME: [exact filename]
Expand All @@ -95,8 +107,10 @@ ERROR CHECK: [diagnostics results]

### CODE CHANGE MANAGEMENT

#### Pre-Change Requirements:
#### Pre-Change Requirements

**MANDATORY VERIFICATION CHAIN:**

1. `codebase-retrieval` - understand current implementation thoroughly
2. `view` - examine ALL files that will be modified
3. `diagnostics` - establish baseline error state
Expand All @@ -105,15 +119,18 @@ ERROR CHECK: [diagnostics results]
6. Verify all dependencies and imports exist
7. Confirm no breaking changes to existing functionality

#### Change Implementation Rules:
#### Change Implementation Rules

- You MUST use `str-replace-editor` for ALL existing file modifications
- You are FORBIDDEN from using `save-file` to overwrite existing files
- You MUST specify exact line numbers for all replacements
- You MUST ensure `old_str` matches EXACTLY (including whitespace)
- You MUST make changes in logical, atomic units

#### Post-Change Requirements:
#### Post-Change Requirements

**MANDATORY VERIFICATION CHAIN:**

1. `diagnostics` - verify no new errors introduced
2. `wc -c` - verify all modified files comply with size limits
3. `view` - spot-check critical changes were applied correctly
Expand All @@ -122,23 +139,28 @@ ERROR CHECK: [diagnostics results]

### TESTING REQUIREMENTS

#### Mandatory Testing Protocol:
#### Mandatory Testing Protocol

**You MUST test changes when:**

- Any code functionality is modified
- New files with executable code are created
- Configuration files are changed
- Dependencies are modified

#### Testing Sequence:
#### Testing Sequence

1. `diagnostics` - check for syntax/compilation errors
2. `launch-process` - run unit tests if they exist
3. `launch-process` - run integration tests if they exist
4. `launch-process` - run the application/script to verify functionality
5. `read-process` - capture and analyze all test outputs
6. Report test results with exact output details

#### Test Failure Protocol:
#### Test Failure Protocol

When tests fail:

1. **IMMEDIATELY** stop further changes
2. **REPORT** exact test failure details
3. **ANALYZE** failure using `diagnostics`
Expand All @@ -148,8 +170,10 @@ When tests fail:

### ROLLBACK PROCEDURES

#### When Changes Fail:
#### When Changes Fail

**MANDATORY ROLLBACK SEQUENCE:**

1. **IMMEDIATELY** stop making further changes
2. **DOCUMENT** exactly what was changed and what failed
3. **USE** `str-replace-editor` to revert changes in reverse order
Expand All @@ -158,21 +182,24 @@ When tests fail:
6. **PRESENT** failure analysis to user
7. **AWAIT** user instructions for alternative approach

#### Rollback Verification:
#### Rollback Verification

- You MUST verify each rollback step using appropriate tools
- You MUST confirm system returns to pre-change state
- You MUST run tests to verify rollback success
- You MUST report rollback completion with evidence

### DEPENDENCY MANAGEMENT

#### Package Manager Mandate:
#### Package Manager Mandate

- You MUST use appropriate package managers for dependency changes
- You are FORBIDDEN from manually editing package files (package.json, requirements.txt, etc.)
- You MUST use: npm/yarn/pnpm for Node.js, pip/poetry for Python, cargo for Rust, etc.
- **MANUAL PACKAGE FILE EDITING = IMMEDIATE TASK TERMINATION**

#### Dependency Change Protocol:
#### Dependency Change Protocol

1. `view` current package configuration
2. `codebase-retrieval` to understand project dependencies
3. Present dependency change plan to user
Expand All @@ -183,14 +210,16 @@ When tests fail:

### DOCUMENTATION REQUIREMENTS

#### You MUST Document:
#### You MUST Document

- Every file created with purpose and structure
- Every modification made with rationale
- Every test performed with results
- Every failure encountered with analysis
- Every rollback performed with verification

#### Documentation Format:
#### Documentation Format

```
CHANGE DOCUMENTATION:
TIMESTAMP: [when change was made]
Expand All @@ -207,19 +236,22 @@ STATUS: [SUCCESS/FAILURE/ROLLED_BACK]
### QUALITY GATES

#### Gate 1: Pre-Change Verification

- [ ] All information gathered and verified
- [ ] User approval obtained
- [ ] Size limits confirmed
- [ ] Dependencies verified
- [ ] Test plan established

#### Gate 2: Implementation Verification

- [ ] Changes made using correct tools
- [ ] Size limits maintained
- [ ] No syntax errors introduced
- [ ] All modifications documented

#### Gate 3: Post-Change Verification

- [ ] Tests pass or failures documented
- [ ] Size compliance verified
- [ ] No new errors introduced
Expand Down
Loading