# AGLA

Ars Generalis Llull Applied

## Chat Assistant Parsing Protocol

This repository is a structured AGLA workspace. Chat assistants should parse it conservatively, using Git and the registered project files as the source of truth.

### 1. Start Here

Before interpreting project content, read this root `README.md`.

Then inspect:

- `AGLA_ArsGeneralisLlullApplied/STRUCTURE_REPORT.md`
- `AGLA_ArsGeneralisLlullApplied/_00_Documentation/CONTEXT_FOLDER_RULES.md`
- `AGLA_ArsGeneralisLlullApplied/00_ROOT_CLASS_LAWS/SYSTEM_INDEX_CURRENT.md`

These files orient folder meaning, context boundaries, and system-index discipline.

### 2. Authority Rule

Do not infer runtime authority from file presence alone.

Runtime authority for LLM systems must come from registered, loaded, and admitted AGLA artifacts under the relevant system index, class laws, and context rules.

Development-only documentation may support drafting, evaluation, navigation, and review. It must not be treated as hidden runtime context or execution authority.

### 3. Context Boundaries

Use `_00_Documentation/CONTEXT_FOLDER_RULES.md` before relying on documentation files.

Default interpretation:

- `_00_Documentation/00_Sources`: source storage for documentation material.
- `_00_Documentation/01_CONTEXT_Development_Only`: developer-only routing and reference context.
- `_00_Documentation/02_CONTEXT_Execution_Allowed`: documentation allowed to support execution/control-plane context when otherwise permitted.

Development-only context cannot execute OPERAE and cannot fill missing runtime logic by inference.

### 4. File Type Handling

Use file extension as a handling signal, not an authority grant.

Default precedence:

- `.md`: normal project text and artifact carrier; authority depends on registration and placement.
- `.json`: usually deployment, configuration, manifest, or structured integration support.
- `.txt`: usually experimental, provisional, local, or explanatory.
- `.csv`: same default status as `.txt`.
- Google Docs, Sheets, Slides, Office documents, and PDFs: reference-only by default; usable for inference enhancement, review, and drafting, not runtime authority.
- Source code files such as `.py`, `.cs`, `.js`, `.ts`, `.java`, `.cpp`, `.rs`, `.go`, `.sql`: integration material by default; not LLM runtime authority unless explicitly admitted.

For the detailed developer-only rule, see:

`AGLA_ArsGeneralisLlullApplied/_00_Documentation/00_Sources/01_CONTEXT_Development_Only/FILE_TYPE_PRECEDENCE_DEVELOPER_ONLY.md`

### 5. Git And Google Drive

Git is the version-control source of truth.

Google Drive may be used as a synchronized sharing layer for assistant access and remote work. Drive-originated changes to tracked files must remain visible to Git and should be reviewed before staging.

Temporary Drive sync artifacts are ignored by the root `.gitignore`:

```gitignore
*.tmp
.tmp/
.tmp.*
```

For the detailed developer-only workflow, see:

`AGLA_ArsGeneralisLlullApplied/_00_Documentation/00_Sources/01_CONTEXT_Development_Only/GIT_PIPELINE_DEVELOPER_ONLY.txt`

### 6. Parsing Discipline

When answering questions or making edits:

1. Identify the requested scope.
2. Read the smallest relevant set of indexed files.
3. Respect context folder rules.
4. Distinguish canonical artifact content from reference material.
5. Avoid reconstructing missing authority from notes, PDFs, code, or development-only sources.
6. Preserve existing project structure and naming conventions.
7. Report uncertainty when authority is not established by indexed project files.

### 7. Editing Discipline

When editing this repository:

- Keep changes scoped to the requested task.
- Prefer existing folder conventions and index files.
- Add documentation sources under `_00_Documentation/00_Sources` when documentation rules require source storage.
- Update local reference indexes when adding routed documentation.
- Do not treat Google Drive shortcuts, PDFs, or local notes as canonical runtime material without explicit promotion.

### 8. Final Rule

Parse first by structure.

Interpret second by context.

Execute only by explicit authority.
