<codebase name="{{ root.title() }}"
{%- if opts.include_source_details -%}
path_to_codebase="{{ root.path.display() }}"
{%- endif -%}
>
# CODEBASE CONTENT: {{ root.title() }}
{%- if !opts.omit_summary %}
## Purpose
This artifact represents a structured abstraction of the entire codebase. It is optimized for automated analysis, code generation, refactoring, and agent-based reasoning. The layout herein is intended to faithfully reproduce the file hierarchy, highlight file relationships, and annotate any pertinent metadata to support accurate inquiry and decision-making.
## Notes
- The representation is read-only; modifications must be applied to the original source files.
- File paths are provided to disambiguate similarly named components.
- Certain files might have been omitted per .gitignore or other filtering rules.
{%- endif %}
{%- if opts.include_tree_outline %}
## Directory Outline
```bash
{% match get_tree_outline() %}
{%- when Ok(val) -%}
{{ val }}
{%- when Err(err) -%}
[Error: Outline omitted due to "{{ err }}"]
{%- endmatch %}
```
{%- endif %}
{%- if !opts.omit_file_contents -%}
## File Contents
{% for file in root.get_files() %}
### FILE: ./{{ file.path.display() }}{{ format_metadata(file.metadata) }}
{% match file.content %}
{%- when Some(content) %}
{% match file.extension() -%}
{% when "md" -%}
~~md
{{ content }}
~~
{%- when ext -%}
```{{ ext }}
{{ content }}
```
{%- endmatch %}
{%- else %}
{% endmatch %}
{%- endfor %}
{%- endif %}
</codebase> <!-- END OF `{{ root.name }}` CODEBASE-->