# Sequence Flow

### Legend <a href="#legend" id="legend"></a>

```
: Object/Area
> method
< procedure
>> background method
<< background procedure
? condition
```

### Run Action <a href="#run-action" id="run-action"></a>

```
: Interface
    > command
        : Core
            > run
                > server
                > generate
                    > createProgress
                    > createRengerateTimer
                    > generatePrepare

                        ? if reset is true
                            ? if source directory doesn't exist
                                < error
                            > resetCollections
                                < reset database
                            > populateCollections
                                > parseDirectory documentsPath
                                > parseDirectory filesPath
                                > parseDirectory layoutsPaths
                                > emitSerial "populateCollectionsBefore"
                                    : Tumblr Plugin
                                        > fetchTumblrData
                                            < json data from tumblr api
                                        < add each tumblr post into docpad database
                            < use all models

                        ? if reset is false
                            < use changed models

                        > emitSerial "generateAfter"

                    > generateLoad
                        > loadFiles opts.collection
                        < add references and layout children to opts.collection

                    > generateRender
                        > contextualizeFiles
                            > emitSerial "contextualizeBefore"
                            > file.contextualize
                                < meta data normalized
                                < layout determined
                            > emitSerial "conextualizeAfter"

                        > renderFiles
                            > emitSerial "renderBefore"
                            > renderCollection(referencesOthers:false)
                            + renderCollection(referencesOthers:true) < for each render pass
                                > file.render
                                    > emitSerial "render"
                                    > emitSerial "renderDocument"
                            > emitSerial "renderAfter"
                        > writeFiles

                    > generatePostpare
                        > emitSerial "generateAfter"


                > watch
                    >> watchr.watch config.reloadPaths
                        >> docpad.load
                            >> docpad.generate reset:true
                    >> watchr.watch config.regeneratePaths
                        >> docpad.generate reset:true
                    >> watchr.watch config.srcPath
                        >> docpad.generate
```


---

# Agent Instructions: 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:

```
GET https://docpad.bevry.me/core/sequence.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
