> For the complete documentation index, see [llms.txt](https://guide.cronuszen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.cronuszen.com/gpcscripting/gpc-script-guide/advanced-architecture.md).

# Advanced Architecture

<figure><img src="/files/PuOdjwQ1d330z6xi0Pp1" alt=""><figcaption></figcaption></figure>

Scale a working script with single-writer pipelines, state machines, identity-based records, caching, timing, and bytecode-aware design.

***

Work through these pages in order the first time. Return directly to any page later as a reference.

* [Design around one-cycle state transitions](/gpcscripting/gpc-script-guide/advanced-architecture/design-around-one-cycle-state-transitions.md)
* [Single-writer output pipeline](/gpcscripting/gpc-script-guide/advanced-architecture/single-writer-output-pipeline.md)
* [State machines](/gpcscripting/gpc-script-guide/advanced-architecture/state-machines.md)
* [Exclusive state routing](/gpcscripting/gpc-script-guide/advanced-architecture/exclusive-state-routing.md)
* [Edit, view, and save are different operations](/gpcscripting/gpc-script-guide/advanced-architecture/edit-view-and-save-are-different-operations.md)
* [Keep settings with the right object](/gpcscripting/gpc-script-guide/advanced-architecture/keep-settings-with-the-right-object.md)
* [Table-driven behavior](/gpcscripting/gpc-script-guide/advanced-architecture/table-driven-behavior.md)
* [Fixed-point calculations](/gpcscripting/gpc-script-guide/advanced-architecture/fixed-point-calculations.md)
* [Cumulative path/pattern calculations](/gpcscripting/gpc-script-guide/advanced-architecture/cumulative-path-pattern-calculations.md)
* [Detection/state precedence](/gpcscripting/gpc-script-guide/advanced-architecture/detection-state-precedence.md)
* [Timing without blocking loops](/gpcscripting/gpc-script-guide/advanced-architecture/timing-without-blocking-loops.md)
* [Event-driven input routing](/gpcscripting/gpc-script-guide/advanced-architecture/event-driven-input-routing.md)
* [Dirty flags and caching](/gpcscripting/gpc-script-guide/advanced-architecture/dirty-flags-and-caching.md)
* [Function boundaries](/gpcscripting/gpc-script-guide/advanced-architecture/function-boundaries.md)
* [Performance budget](/gpcscripting/gpc-script-guide/advanced-architecture/performance-budget.md)
* [Bytecode-aware optimization](/gpcscripting/gpc-script-guide/advanced-architecture/bytecode-aware-optimization.md)
* [Advanced review checklist](/gpcscripting/gpc-script-guide/advanced-architecture/advanced-review-checklist.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://guide.cronuszen.com/gpcscripting/gpc-script-guide/advanced-architecture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
