- 
        Couldn't load subscription status. 
- Fork 34
docs: add AGENTS.md and mark deprecated APIs for cleanup #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
        
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            11 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      da68b92
              
                docs: add contributor guide, document memory limitations, and mark de…
              
              
                maksymar 2a98e4a
              
                Update AGENTS.md
              
              
                maksymar 96809ec
              
                Merge branch 'main' into maksym/agents
              
              
                maksymar 01168a7
              
                Merge branch 'maksym/agents' of github.com:dfinity/stable-structures …
              
              
                maksymar e6a10bb
              
                Update src/btreemap.rs
              
              
                maksymar 8796dc5
              
                Update AGENTS.md
              
              
                maksymar fa7d058
              
                .
              
              
                maksymar 9fa4380
              
                .
              
              
                maksymar 3d98a32
              
                Update src/memory_manager.rs
              
              
                maksymar c29f537
              
                chore: use AGENTS title
              
              
                maksymar 1a8b5d6
              
                Merge branch 'main' into maksym/agents
              
              
                maksymar File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # AGENTS | ||
|  | ||
| ## Overview | ||
|  | ||
| This repository provides stable data structures for the Internet Computer that persist across canister upgrades. These structures do not require `pre_upgrade` or `post_upgrade` hooks. | ||
|  | ||
| The main modules include: | ||
|  | ||
| - `BTreeMap` — key-value storage | ||
| - `BTreeSet` — sets | ||
| - `Vec` — growable arrays | ||
| - `Cell` — single values | ||
| - `Log` — append-only data | ||
| - `MinHeap` — priority queues | ||
| - `MemoryManager` — coordinates multiple structures in stable memory | ||
|  | ||
| ## Index | ||
|  | ||
| Key entry points for understanding and using this library: | ||
|  | ||
| - `README.md` — quick start and basic usage patterns | ||
| - `docs/` — mdBook with concepts, design principles, and tutorials | ||
| - `src/lib.rs` — crate-level documentation and public API overview | ||
| - `examples/` — production-ready examples showing real-world usage | ||
| - `src/btreemap.rs`, `src/btreeset.rs`, `src/vec.rs`, etc. — individual module documentation | ||
| - `Cargo.toml` — version and dependency information | ||
|  | ||
| ## Source of truth | ||
|  | ||
| Code defines behavior. Documentation must accurately reflect the current implementation. When making changes: | ||
|  | ||
| - update documentation in the same PR as code changes | ||
| - ensure examples compile and run correctly | ||
| - keep API documentation synchronized with function signatures | ||
| - update book chapters when changing core concepts | ||
|  | ||
| ## Reading path | ||
|  | ||
| Follow this sequence to understand the library: | ||
|  | ||
| 1. `README.md` for overview and quick examples | ||
| 1. `docs/src/introduction/` for concepts and design principles | ||
| 1. `docs/src/concepts/` for `Memory` trait and `MemoryManager` details | ||
| 1. module documentation (`src/*.rs`) for specific data structure APIs | ||
| 1. `examples/` for production usage patterns | ||
| 1. code comments for implementation details | ||
|  | ||
| ## Checklist | ||
|  | ||
| When changing public APIs: | ||
|  | ||
| - describe scope of changes in PR description | ||
| - update module-level documentation for affected types | ||
| - add or update runnable examples demonstrating the change | ||
| - update book chapters if concepts change | ||
| - verify `cargo doc` builds without warnings | ||
| - verify `mdbook build` succeeds | ||
| - test examples compile and run | ||
|  | ||
| ## Quality bar | ||
|  | ||
| Every public type and module must have: | ||
|  | ||
| - short overview explaining purpose and use cases | ||
| - basic usage example that compiles | ||
| - links to related documentation or examples | ||
| - clear parameter and return value descriptions | ||
| - complexity information where relevant | ||
| - error conditions and panics documented | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.