> 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

Single-writer pipelines, state machines, identity-based records, caching, timing, and bytecode-aware design.

<figure><img src="https://611779084-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyIhlDMEOMB6JOWTfU9zr%2Fuploads%2FCpV7RvrvdDPf30kkSOUD%2Freport-cycle%20(1).svg?alt=media&amp;token=344fb1e8-26b2-4bd6-a43e-acba8ab1d85a" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
