|
| 1 | +--- |
| 2 | +argument-hint: <bucket-type> |
| 3 | +description: Analyze a bucket type implementation to identify all behaviors and configurations |
| 4 | +--- |
| 5 | + |
| 6 | +Given the bucket type ID "$ARGUMENTS" (e.g., "json", "mdx", "typescript"), analyze the implementation code to identify ALL bucket-specific behaviors, configurations, and characteristics. |
| 7 | + |
| 8 | +## Instructions |
| 9 | + |
| 10 | +1. **Locate where this bucket type is processed** in the codebase by searching for the bucket type string. Start with the main loader composition/pipeline code. |
| 11 | + |
| 12 | +2. **Trace the complete execution pipeline** for this bucket: |
| 13 | + |
| 14 | + - List every function/loader in the processing chain, in order |
| 15 | + - For each function/loader, read its implementation to understand: |
| 16 | + - Input parameters it receives |
| 17 | + - Transformations it performs on the data |
| 18 | + - Output format it produces |
| 19 | + - Any side effects or file operations |
| 20 | + |
| 21 | +3. **Identify configuration parameters** by: |
| 22 | + |
| 23 | + - Finding which variables are passed into the loaders (e.g., lockedKeys, ignoredKeys) |
| 24 | + - Tracing these variables back to their source (configuration parsing) |
| 25 | + - Determining if they're bucket-specific or universal |
| 26 | + |
| 27 | +4. **Analyze file I/O behavior**: |
| 28 | + |
| 29 | + - How are file paths constructed? |
| 30 | + - Does the path pattern contain locale placeholders that would create separate files? |
| 31 | + - What file operations are performed (read, write, create, delete)? |
| 32 | + - Are files overwritten or are new files created? |
| 33 | + - **IMPORTANT**: Note that "overwrites existing files completely" and "[locale] placeholder support" are mutually exclusive in practice: |
| 34 | + - If a bucket type stores all locales in a single file (like CSV with columns per locale), it overwrites that single file and does NOT support `[locale]` placeholders |
| 35 | + - If a bucket type creates separate files per locale using `[locale]` placeholders, each locale file is overwritten individually |
| 36 | + - Clarify which pattern the bucket type follows |
| 37 | + |
| 38 | +5. **Examine data transformation logic**: |
| 39 | + |
| 40 | + - How is the file content parsed? |
| 41 | + - What internal data structures are used? |
| 42 | + - How is the data serialized back to file format? |
| 43 | + - Are there any format-preserving mechanisms? |
| 44 | + |
| 45 | +6. **Identify special behaviors** by examining: |
| 46 | + |
| 47 | + - Conditional logic specific to this bucket |
| 48 | + - Error handling unique to this format |
| 49 | + - Any validation or normalization steps |
| 50 | + - Interactions between multiple loaders in the pipeline |
| 51 | + |
| 52 | +7. **Determine constraints and capabilities**: |
| 53 | + |
| 54 | + - What data types/structures are supported? |
| 55 | + - Are there any size or complexity limitations? |
| 56 | + - What happens with edge cases (empty files, malformed content)? |
| 57 | + |
| 58 | +## Required Depth |
| 59 | + |
| 60 | +- Read the ACTUAL implementation of each loader/function |
| 61 | +- Follow all function calls to understand the complete flow |
| 62 | +- Don't make assumptions - verify behavior in the code |
| 63 | +- Consider the order of operations in the pipeline |
| 64 | + |
| 65 | +## Output Format |
| 66 | + |
| 67 | +List all findings categorized as: |
| 68 | + |
| 69 | +- Configuration parameters (with their types and defaults) |
| 70 | +- Processing pipeline (ordered list of transformations) |
| 71 | +- File handling behavior |
| 72 | +- Data transformation characteristics |
| 73 | +- Special capabilities or limitations |
| 74 | +- Edge case handling |
0 commit comments