# mrojas-mx/pine-script-v6-kb architecture

> Architecture diagram of the GitHub repository mrojas-mx/pine-script-v6-kb, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mrojas-mx/pine-script-v6-kb
- Repository: https://github.com/mrojas-mx/pine-script-v6-kb

## Overview

This repository is an offline Pine Script v6 documentation knowledge base, not a Pine runtime. A typical user looks up a symbol or concept, follows the indexed path to a reference or guide page, and gets a signature, explanation, or working example. The major content branches cover language learning, reference lookup, migration, examples, errors, and FAQs; lookup and context-pack utilities expose the material to people and agents. Source excerpts show the lookup and packing tools, while README statements establish the documented content routes; unsampled content internals are not inferred.

Main entry points: [`reference/ta/_index.md`](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/reference/ta/_index.md) (Namespace digests), [`scripts/find.py`](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/scripts/find.py) (Name search), [`guide/_index.md`](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/guide/_index.md) (Practical guide), [`reference/_index.md`](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/reference/_index.md) (Reference index)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning content"]
  node_guide["Practical guide<br/>[_index.md]"]
  node_examples["Runnable examples<br/>[_index.md]"]
  node_migration["Version migration"]
  node_faq["Frequently asked<br/>[_index.md]"]
end

subgraph group_reference["Reference content"]
  node_reference_index["Reference index<br/>[_index.md]"]
  node_namespace_digest["Namespace digests<br/>[_index.md]"]
  node_member_pages["Entity pages<br/>[sma.md]"]
  node_bundles["Namespace bundles<br/>[ta.md]"]
  node_errors["Error fixes<br/>[_index.md]"]
end

subgraph group_access["Lookup and agent access"]
  node_find["Name search<br/>[find.py]"]
  node_entity_index["Entity index<br/>[entities.jsonl]"]
  node_keyword_index["Keyword index<br/>[keywords.json]"]
  node_pack["Context packs<br/>[pack.py]"]
  node_agent_data["Agent data<br/>[entrypoints.json]"]
end

node_user(("Developer or agent"))

node_user -->|"searches"| node_find
node_find -->|"looks up"| node_entity_index
node_find -->|"searches"| node_keyword_index
node_user -->|"requests context"| node_pack
node_pack -->|"selects task files"| node_agent_data
node_user -->|"browses"| node_reference_index
node_reference_index -->|"opens namespace"| node_namespace_digest
node_namespace_digest -->|"opens details"| node_member_pages
node_namespace_digest -->|"offers bundle"| node_bundles
node_user -->|"learns language"| node_guide
node_guide -->|"pairs with examples"| node_examples
node_user -->|"migrates scripts"| node_migration
node_user -->|"checks questions"| node_faq
node_user -->|"finds fixes"| node_errors

click node_find "https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/scripts/find.py"
click node_entity_index "https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/.llm/entities.jsonl"
click node_keyword_index "https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/.llm/keywords.json"
click node_pack "https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/scripts/pack.py"
click node_agent_data "https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/.llm/entrypoints.json"
click node_guide "https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/guide/_index.md"
click node_examples "https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/examples/_index.md"
click node_migration "https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/migration/to-pine-version-6.md"
click node_faq "https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/faq/_index.md"
click node_reference_index "https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/reference/_index.md"
click node_namespace_digest "https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/reference/ta/_index.md"
click node_member_pages "https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/reference/ta/sma.md"
click node_bundles "https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/dist/bundles/ta.md"
click node_errors "https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/errors/_index.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_guide,node_examples,node_migration,node_faq toneBlue
class node_reference_index,node_namespace_digest,node_member_pages,node_bundles,node_errors toneAmber
class node_find,node_entity_index,node_keyword_index,node_pack,node_agent_data toneMint
class node_user toneIndigo
```

## Components

### Learning content

- [Practical guide](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/guide/_index.md): `guide/_index.md`
- [Runnable examples](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/examples/_index.md): `examples/_index.md`
- [Version migration](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/migration/to-pine-version-6.md): `migration/to-pine-version-6.md`
- [Frequently asked](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/faq/_index.md): `faq/_index.md`

### Reference content

- [Reference index](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/reference/_index.md): `reference/_index.md`
- [Namespace digests](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/reference/ta/_index.md): `reference/ta/_index.md`
- [Entity pages](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/reference/ta/sma.md): `reference/ta/sma.md`
- [Namespace bundles](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/dist/bundles/ta.md): `dist/bundles/ta.md`
- [Error fixes](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/errors/_index.md): `errors/_index.md`

### Lookup and agent access

- [Name search](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/scripts/find.py): `scripts/find.py`
- [Entity index](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/.llm/entities.jsonl): `.llm/entities.jsonl`
- [Keyword index](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/.llm/keywords.json): `.llm/keywords.json`
- [Context packs](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/scripts/pack.py): `scripts/pack.py`
- [Agent data](https://github.com/mrojas-mx/pine-script-v6-kb/blob/main/.llm/entrypoints.json): `.llm/entrypoints.json`

### Other components

- **Developer or agent**

## Connections

- Developer or agent → Name search: searches (evidence: `README.md`)
- Name search → Entity index: looks up (evidence: `scripts/find.py`)
- Name search → Keyword index: searches (evidence: `scripts/find.py`)
- Developer or agent → Context packs: requests context (evidence: `README.md`)
- Context packs → Agent data: selects task files (evidence: `scripts/pack.py`)
- Developer or agent → Reference index: browses (evidence: `README.md`)
- Reference index → Namespace digests: opens namespace (evidence: `README.md`)
- Namespace digests → Entity pages: opens details (evidence: `README.md`)
- Namespace digests → Namespace bundles: offers bundle (evidence: `README.md`)
- Developer or agent → Practical guide: learns language (evidence: `README.md`)
- Practical guide → Runnable examples: pairs with examples (evidence: `README.md`)
- Developer or agent → Version migration: migrates scripts (evidence: `README.md`)
- Developer or agent → Frequently asked: checks questions (evidence: `README.md`)
- Developer or agent → Error fixes: finds fixes (evidence: `README.md`)
